SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding => Topic started by: {AR}MetalKiller on January 09, 2025, 07:39:20 AM

Title: Problems with shadow volumes
Post by: {AR}MetalKiller on January 09, 2025, 07:39:20 AM
Hi,

I recently encountered some issues with shadow volumes:

1.
I duplicated an objects geometry and used it as shadow volume.
Loading the map, the renderer seems to have an issue with Z-layering the object which results in flickering shadows:
flicker.gif
I kind of solved the problem by shrinking the shadow volume by 1%, but this results in inaccurate shadows.
It is also way harder to solve for donut shaped objects.

2.
To have the terrain throw a shadow I approximated the dimensions of a mountain to cover it completly.
Again, after loading the map, the shadow volume does not show properly.
I tried, covering the mountain and also having the shadow volume enclosed by the mountain with the same result.
The mountain contains more objects with shadow volumes, which might influence the rendering.
I also tried combining the shadow volume of the mountain with the other objects shadow volumes.
However, nothing was successful:
shadow.png
Some part of the shadow volume is rendered correctly, but not complete.

Any idea, what causes either of the problems or how I could fix them?

Cheers!
EhPortal 1.34 © 2025, WebDev