VEX Shadow shader

The rayshadow shader generates shadows based on one of four different techniques.

The rayshadow shader generates shadows based on one of four different techniques.

Z-Depth shadows use a z-depth map (rendered from a light source). Deep shadows generate a deep shadow map for a light source. Filtered shadows evaluate the occluding objects surface to compute the opacity. Thus, filtered shadows allow for transparent shadows. Fast shadows assume that all occluding objects are opaque.

The shadow bias can be used to prevent self shadowing of a surface The shadow intensity is a scale on the shadow intensity. Decreasing this value to zero will result in no shadows. At one, the shadow will occlude all light from the source.

Z-Depth softness makes the z-depth shadows softer.

Z-Depth quality improves the noise around penumbras.

Z-Depth fog quality controls the quality when shadows are evaluated from within a volume (fog) shader. This is a scale on the overall quality.

Shadow map filter controls the filtering to be used for deep shadow maps.

Mipmap interpolation controls whether shadow samples interpolate mipmap levels for deep shadow maps. Setting this value to true can reduce seam artifacts where the renderer switches from one mipmap level to another. However, it can reduce performance as additional samples must be taken.

Depth interpolation controls the mode in which depth samples are interpolated for deep shadow maps. Discrete interpolation should be used for surface samples, while linear interpolation should be used for volume samples.

Note

All z-depth parameters also apply to deep shadow maps.

Usages in other examples

Example name Example for