Thursday, September 22, 2022
HomeGame Developmentglsl - How you can cross voxel information to shader?

glsl – How you can cross voxel information to shader?


I’m engaged on a voxel sport, and I approached the purpose the place I would like so as to add day/evening in my world. Apparently, I ought to simply be capable to cross the torch and daylight values into my shader and multiply the daylight variable by the quantity of daylight I’ve.

I do not know how to do that. I do know you’ll be able to solely cross the identical variables for all vertex/fragments, however how will you cross 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 will not be?
  • Moreover, does every fragment know what voxel corresponds to it when the shader solely has a data of its 2D placement on the display?
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments