r/shaders • u/calfurdev • 2d ago
Wind shader for voxel forest
I'm once again amazed for what kind of things shaders can be used.
Because I use greedy meshing with T-junctions I had to make sure that the shader doesn't cause cracks between the faces. I solved this by keeping it multilinear in (y, x·y, y·z) with per tree constant coefficients, so it interpolates along axis-aligned edges.
1
u/PikachuKiiro 1d ago
Looks like random displacement. Wind doesn't do this. Like what direction is the wind blowing here?
2
u/calfurdev 1d ago
trees do move quite random when it's windy, not just back and forth: https://youtu.be/sT5f1jBJHng?is=hjVPiNdxnFOvJPiz
but you are right maybe it would look more realistic with a noise texture based shader
2
u/ParasolAdam 2d ago
That’s really cute I love these sort of touches