Skip to content

Commit

Permalink
Fix d3d shader always being converted instead of loaded from file
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-bckl committed Dec 5, 2022
1 parent c497c89 commit fc2e08e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OpenGLDrv/Src/OpenGLRenderDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const FOpenGLShader* UOpenGLRenderDevice::GetShaderForMaterial(UMaterial* Materi

if(Material->IsA<UHardwareShader>()){
// Generate GLSL from D3D shader if no shader exists yet for the material or the source file is empty or deleted.
if(!Shader || (ShaderLoaded && ShaderText.Len() == 0)){
if((!Shader && !ShaderLoaded) || (ShaderLoaded && ShaderText.Len() == 0)){
ShaderText = GLSLShaderFromD3DHardwareShader(static_cast<UHardwareShader*>(Material));

if(bSaveShadersToDisk)
Expand Down

0 comments on commit fc2e08e

Please sign in to comment.