SetRayTracingFloatParam
Adds a command to set a float parameter on a RayTracingShader.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
SetRayTracingFloatParam(RayTracingShader, string, float)
Adds a command to set a float parameter on a RayTracingShader.
public void SetRayTracingFloatParam(RayTracingShader rayTracingShader, string name, float val)
Parameters
Remarks
Only shaders defined in the .raytrace file can access the float value you designate as the argument for this method. To make this float value accessible to all ray tracing shader types (closest hit, any hit, or miss, for example), call the CommandBuffer.SetGlobalFloat method instead.
SetRayTracingFloatParam(RayTracingShader, int, float)
Adds a command to set a float parameter on a RayTracingShader.
public void SetRayTracingFloatParam(RayTracingShader rayTracingShader, int nameID, float val)
Parameters
RayTracingShader to set parameter for.
Property name ID. Use Shader.PropertyToID to get this ID.
Value to set.
Remarks
Only shaders defined in the .raytrace file can access the float value you designate as the argument for this method. To make this float value accessible to all ray tracing shader types (closest hit, any hit, or miss, for example), call the CommandBuffer.SetGlobalFloat method instead.