Here we go. Today I started integrating Lokoyd’s tree meshes.
7,8 million… it’s the rought approximative number of trees I need to display per planet. Even if – due to planets size – I know that any kind of number has to be huge… that’s still creepy !! Maybe I should think of shader instancing !? I’ll see later… At this time I must find a way to generate nice trees coordonates. That’s nothing but stupid random forest right now…
1- Stencil: I need to fix shadows. Until today, I had great tight shadows… but… stencil shadows. And here, since sun’s light is moving according to daytime, it’s completely, irremediably, impossible to ask any CPU to generates stencils (I tried… and rendering dropped down from 180 to an absurd 12 FPS).
2- Texture: texture based… not much better. Standard texture shadows do retro-projection, that’s nothing but a hack. Not a big issue in box space like rooms, or in a scene where light comes from above… but the main goal is to place shadows on cities’ buildings.
3- Z-depth: Shaders depth shadow. Well that’s the picture above. On massive scale scenes like Nyne does there is no more left than 4×4 pixel for closest objets on a 1024×1024 texture. And I do not plan to use 8192² alpha texture (65 Mb!!) to get a poor 32×32 definition shadow.
4- PSSM: at the end of the day, I can’t skip using parallel split shadows (PSSM). The main idea is to use only a couple of textures to isolate closest objets which need detailed shadows, and further objets. This idea is pretty smart…
A quite complete Gems3 paper: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html