With the per object shadow feature, custom shadow maps can be assigned to select objects. This can result in increased shadow quality due to higher world space shadow texel density and reduced depth range.
The drawbacks are increased memory consumption of the additional shadow maps and increased shadow filtering cost. As an example, the additional cost amounted to approximately 0.25ms for the main protagonist in Ryse on XboxOne.
Left: In-game shadows, right: Per Object shadows
There are currently two ways to assign a per object shadow map:
Create a PerEntityShadows node and assign the target entity to the 'entity' slot. The trigger input will apply the settings to the engine.
Note that the node is stateless w.r.t. the entity, so you can add multiple PerEntityShadow nodes for the same entity. The last one to trigger will be in effect.
There are various configurable settings to tweak the shadow appearance:
The following functions can be called from anywhere in game code. Function parameters are equivalent to the parameters of the flow graph node. Please see above for a short description.
Per object shadows are subject to a number of restrictions:
e_ShadowsPerObject: 0=0ff, 1=on, -1=don't draw object shadows.