
[ad_1]
I’m engaged on a voxel sport, and I approached the purpose the place I want so as to add day/evening in my world. Apparently, I ought to simply have the ability to go the torch and daylight values into my shader and multiply the daylight variable by the quantity of daylight I’ve.
I don’t know how to do that. I do know you possibly can solely go the identical variables for all vertex/fragments, however how will you go a whole array of voxel information right into a shader?
- How would I do know what voxel information is seen by the shader, and what information just isn’t?
- Furthermore, does every fragment know what voxel corresponds to it when the shader solely has a data of its 2D placement on the display screen?
[ad_2]