Skip to content

Added first implementation of ground shadow rendering for all actors.

Thorwin Vogt requested to merge thorwin.vogt/met.3d:GroundShadows into master

This implementation allows all actors to cast ground shadows or render ground shadows from other actors.

The shadow map is rendered per scene once, or whenever an actor requests to update the shadow map. It is just a modified ray caster shadow map, that is now handled in the scene view instead of per actor. This means, that any actor could write to the shadow map, or read it. A new function to render ground shadows was added to the actors, which can be implemented to render ground shadows of that actor.

It was implemented to allow the surface topography actor to receive shadows from the volume ray caster.

The ray casters shadow settings were also refactored to have more logical placement in the property list. The shadow map resolution setting was moved to the scene settings, as it is now handled per scene.

One downside of this method of rendering ground shadows per scene is, that we cant use the bounds of the volume ray caster, but assume global bounds for the shadow map. This means that the UV coordinates of it map to global bounds and not actor specific bounds. When implementing for other actors, this needs to be taken into account, so that the correct UV coordinates can be used, for the bounds of the actor.

Merge request reports