- Home /
Shader: Mesh with Grass and Wind
So, I have a functioning voxel engine that creates smoothed terrain in chunks of 1x1x1 meter in a 1024 radius around my player. I wanted to create a geometry shader that not only continues to texture the ground appropriately, but also creates grass (preferably waving with the wind). I have found some basic billboard geometry shaders to get me started, but they seem to cause the mesh to stop texturing. Is there anyway to do both from one shader? Do I pass the mesh triangles and the new grass triangles on to the fragment shader with a flag?
I have written some shaders before in OpenGL, but my experience is still around intermediate.
Thanks in advance!
Answer by Guitar80EP · Feb 24, 2016 at 01:32 AM
The solution was to use a multi-pass shader, where the first pass was a surface shader and the follow up pass was to use a vertex->geometry->fragment shader for the grass with billboarding.
Your answer
Follow this Question
Related Questions
Marching Cubes terrain deformation problem 2 Answers
GameObjects vs. Submeshes 2 Answers
Voxel Terrains 0 Answers
Can a dynamic mesh be made NOT readable? to save mem 1 Answer
Disable Culling for Terrain 0 Answers