SetShaderValue

Sets the value of a shader parameter.

Windows
MacOS
Linux

References

Module

RenderCore

Header

/Engine/Source/Runtime/RenderCore/Public/ShaderParameterUtils.h

Include

#include "ShaderParameterUtils.h"

Syntax

template<typename ShaderRHIParamRef, class ParameterType, typename TRHICmdList>
void SetShaderValue
(
    TRHICmdList & RHICmdList,
    const ShaderRHIParamRef & Shader,
    const FShaderParameter & Parameter,
    const ParameterType & Value,
    uint32 ElementIndex
)

Remarks

Sets the value of a shader parameter. Template'd on shader type A template parameter specified the type of the parameter value. NOTE: Shader should be the param ref type, NOT the param type, since Shader is passed by value. Otherwise AddRef/ReleaseRef will be called many times.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss