So I want to add a pass to terra to calculate greeble visibility. (greeble = grass/tree)
Basically, I want to fill a texture (heightmap.x * heightmap.y) with 1 or 0s depending on if the greeble at (x,y,z) is visible or not.
What I want to do is have terra run and generate its vertex data, and have backface culling occur, then pass into a shader which fills up a greeble visibility texture.
Is this possible to do?
My thinking right now, is add an additional channel to terra, and set it to the greeble texture. Then, add a compositor/pass which uses the greeble occulsion material/pixel shader.
In this material, I need to write out to the greeble texture which will be referenced from c++. A question is, can I get the x/y/z from the tex coords and height map? I'm sort of confused on translating the terra geometry into a quad/texture. Terra is rendered from a camera direction, which creates occulsion data, while the texture would be rendered top-down and represent where that occlusion data is on the heightmap.
I am sort of confused about what I'm doing or how to proceed, if I could get some guidance please.
Guidance on adding terra pass
-
Nickak2003
- Goblin
- Posts: 272
- Joined: Thu Jun 10, 2004 4:19 am
- x 26
-
Nickak2003
- Goblin
- Posts: 272
- Joined: Thu Jun 10, 2004 4:19 am
- x 26
Re: Guidance on adding terra pass
maybe I can render terra, but instead of outputting a color to the texture, I output a x,y,z instead. Then I could reference this texture to obtain visible vertices?