You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

13 lines
432 B

#ifndef RAY_TRACING_HELPERS_H_
#define RAY_TRACING_HELPERS_H_
#if defined(SHADER_STAGE_RAY_TRACING)
float EvaluateRayTracingBias(float3 positionRWS)
{
float distanceToCamera = length(positionRWS);
float blend = saturate((distanceToCamera - _ProjectionParams.y) / (_ProjectionParams.z - _ProjectionParams.y));
return lerp(_RayTracingRayBias, _RayTracingDistantRayBias, blend);
}
#endif
#endif // RAY_TRACING_HELPERS_H_