does anyone know how to do shader reflection in UE4?
I have a global shader that I’d like to get the constant buffers by name
thanks
f
does anyone know how to do shader reflection in UE4?
I have a global shader that I’d like to get the constant buffers by name
thanks
f
When you make an FShader, you will get the constructor called after compilation that looks like this
FDistanceFieldBuildTileListCS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
: FGlobalShader(Initializer)
{
ViewDimensionsParameter.Bind(Initializer.ParameterMap, TEXT("ViewDimensions"));
}
Initializer.ParameterMap contains all the parameters that were obtained by the shader reflection interface for that platform