Today I finally completed the implementation of all three tiled deferred rendering systems. Now the system can switch between tiled and non-tiled depending on whether an object casts shadows.
The nasty bug I had yesterday was quite hard to track down. Basically the introspection in my shader class assigns a size to each type of uniform. However, I forgot to add the cube_shadow_map to the list, and so the point shadows were broken. This has always been a bug, but before I was storing uniforms into a map, and the value was stored in a unsafe area of memory, without ever giving problems. However, after changing the system to store uniforms in a contiguous area of memory, this led to overflows and overwrites with the other uniforms, making the problem evident.
In the evening I also changed the light formula for specular ligthing, as it was wrong to a certain extent as the diffuse light one. In the picture you can see all ligths working together in tiled mode.
Tomorrow I'll start to work on the culling for point lights. It seems fairly easy and I'm very curious about profiling the results.

Nessun commento:
Posta un commento