Hello!
I can no longer compile the “Create a New Global Shader as a Plugin” documentation graphics programming guide as of Unreal Engine 4.25.
There is an issue with the following code, it was previously working in 4.24.
// Get shaders.
TShaderMap<FGlobalShaderType>* GlobalShaderMap = GetGlobalShaderMap(FeatureLevel);
TShaderMapRef< FLensDistortionUVGenerationVS > VertexShader(GlobalShaderMap);
TShaderMapRef< FLensDistortionUVGenerationPS > PixelShader(GlobalShaderMap);
...
GraphicsPSOInit.BoundShaderState.VertexShaderRHI = GETSAFERHISHADER_VERTEX(*VertexShader);
GraphicsPSOInit.BoundShaderState.PixelShaderRHI = GETSAFERHISHADER_PIXEL(*PixelShader);
Error C2440 'initializing': cannot convert from 'FGlobalShaderMap *' to 'TShaderMap<FGlobalShaderType,FShaderMapPointerTable> *'
Error C2664 'TShaderMapRef<FLensDistortionUVGenerationVS>::TShaderMapRef(TShaderMapRef<FLensDistortionUVGenerationVS> &&)': cannot convert argument 1 from 'TShaderMap<FGlobalShaderType,FShaderMapPointerTable> *' to 'const FLensDistortionUVGenerationVS::ShaderMapType *'
Error C2664 'TShaderMapRef<FLensDistortionUVGenerationPS>::TShaderMapRef(TShaderMapRef<FLensDistortionUVGenerationPS> &&)': cannot convert argument 1 from 'TShaderMap<FGlobalShaderType,FShaderMapPointerTable> *' to 'const FLensDistortionUVGenerationPS::ShaderMapType *'
Error C3861 'GETSAFERHISHADER_VERTEX': identifier not found
Error C3861 'GETSAFERHISHADER_PIXEL': identifier not found
I cannot find a changelog documentation about it.