Files
UnrealEngineUWP/Engine/Shaders
chris kulla 7e3c9ba2ee Add support for per instance random in ray tracing shaders and the path tracer
The logic for fetching RandomID from instances was only active when instancing was setup for the vertex factory, which is not the case for raytracing (which handles instancing natively). I followed the pattern used for per instance custom data which was already supported. Since the per instance random value is constant per primitive, I simplified the logic and moved it out of the interpolated quantity PerInstanceParams (which is now a float3 instead of a float4).

Tweaked the logic that enables the RandomID field to only populate it when either PerInstanceRandom or dither fade is enabled (which are the only two cases that use it currently).

#jira UE-163215
#rb Yuriy.ODonnell,Graham.Wihlidal
#preflight 63223eb58838676d105e2d92

[CL 22016969 by chris kulla in ue5-main branch]
2022-09-14 17:20:41 -04:00
..