Hi everyone

This week I decided to go and learn about geometry shaders. For reference, geometry shaders are shaders that let you actually create new triangles and verts instead of just manipulating them like in traditional shaders. To practice, I made a grass shader that creates a field of grass from tiled degenerate meshes. Each blade's xz position is determined by a hash of the floor'd coordinates of the tile (this is to prevent blades from changing position as tiles shift) with the y positon determined by a sampling a world heightmap. Wind is generated map-wide and then sampled at each blade point in order to have a nice looking "ripple" effect as wind blows across the map. Does basic dynamic LOD based on camera distance to each grass tile point. 

Since the wind map is rendered to a texture, I also have some light wind noise playing that varies in volume based on the wind intensity at each point in the world, which *should* sync up with the grass. Ideally it should vary in pitch as well but I haven't looked too much into audio and idk if that's even possible. 

Currently doing some shitter-tier batching; I get 120fps in vr on my 1080ti but I expect that some more optimization work would need to be done to make sure it can run on lower end gpus without ruining frame time. 

side note: detailed grass movement annihilates your webm bitrate

thanks for reading my blog