Shadow volume i'ts good, but destroy the gouraud shading

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
Noiecity
Posts: 424
Joined: Wed Aug 23, 2023 7:22 pm
Contact:

Shadow volume i'ts good, but destroy the gouraud shading

Post by Noiecity »

Gouraud shading is beautiful; it shades according to the angle of the face’s normal. When applied to a sphere, it produces very smooth shadows (even more so if you set the light attenuation to values that give a smooth result)... but when you add shadow volume, everything gets muddled; the smoothness of Gouraud is lost, and it’s practically replaced by triangles that are either completely opaque or completely illuminated... (It’s not that it actually does that, but that’s the visual result in many cases with curved geometry.) However, Gouraud shading on its own cannot produce cast shadows like shadow volume does. I came across several posts attempting to resolve this; I can’t remember the others, but I saved this link:

https://community.khronos.org/t/suppres ... s/36999/10

https://web.archive.org/web/20060614060 ... olumes.txt

By the way, these are the best shaders – combining Gouraud with shadow volume. They’re very cheap. In modern engines, when shadow maps are used, a lot of artefacts and inaccuracies are generated, and it’s very costly to fix them (limiting the shadow distance usually sorts everything out), but Gouraud shading + shadow volume are only superior if both are blended well… Irrlicht on its own can’t do it; you’d probably have to use custom shaders to achieve the best effect.

Posts relating to shadow volumes, but not necessarily relating to combining them with Gouraud shading:


https://dl.acm.org/doi/pdf/10.1145/2070781.2024187

https://inria.hal.science/inria-00390534v1
Irrlicht is love, Irrlicht is life, long live to Irrlicht
Post Reply