(a bit more than a technical demo this time)
After finishing the work on shadows, it was time to play with the different materials possibilities.
To explain a bit what you are seeing:
- at the top left, the 3 textures containing the shadow maps;
- transparent walls (wireframes) are not take into account in the shadow map because they are using a specific material called invisible_for_shadows, i think the name is obvious;
- the foggy volume above the ground is made of a stack of 25 thin boxes, using another cool material: solid_shadows_no_cast, they receive shadows but don’t cast them;
- and the balls, using the solid_shadows material and having the standard behavior, but in wireframe, implying that fog is hollowed when you look through them.
A cool feature is the ability to set the alpha of the shadows material per material. For the jelly fog, the material is looking like this:
material screen_mat : solid_shadows_no_cast
diffuse 0.6 0.7 0.95 0.2
emissive 0.2 0.3 0.45 0.4
param_named shadow_alpha float 0.2
The speed control over the physic simulation (when everything freeze) is modifying the time multiplier of bullet. The call is looking like this:
Complete projects is accessible in the engine, under samples/0.1/example.pssm_shadows.
I need to rest a bit, it has been a harsh road to get this packed. The last part of the job is to ensure the compatibility low opengl versions!