Skip to content

Commit

Permalink
[GL3+] Fix Terrain shader compiler error
Browse files Browse the repository at this point in the history
Even though Terrain doesn't (yet?) use alpha hashing nor the blue noise
texture, OpenGL backend wants to set the blueNoiseTex variable (because
we derive from HlmsPbs)

Thanks user segfaulting for spotting this bug
https://forums.ogre3d.org/viewtopic.php?t=97329
  • Loading branch information
darksylinc committed Aug 30, 2024
1 parent 10f4d42 commit 396f229
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Samples/Media/Hlms/Terra/GLSL/PixelShader_ps.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ in block

@insertpiece( DeclPlanarReflTextures )
@insertpiece( DeclAreaApproxTextures )
@insertpiece( DeclBlueNoiseTexture )

@property( hlms_vpos )
in vec4 gl_FragCoord;
Expand Down
1 change: 1 addition & 0 deletions Samples/Media/Hlms/Terra/HLSL/PixelShader_ps.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ struct PS_INPUT

@insertpiece( DeclPlanarReflTextures )
@insertpiece( DeclAreaApproxTextures )
@insertpiece( DeclBlueNoiseTexture )

Texture2D<float3> terrainNormals : register(t@value(terrainNormals));
Texture2D<float4> terrainShadows : register(t@value(terrainShadows));
Expand Down
1 change: 1 addition & 0 deletions Samples/Media/Hlms/Terra/Metal/PixelShader_ps.metal
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ fragment @insertpiece( output_type ) main_metal

@insertpiece( DeclPlanarReflTextures )
@insertpiece( DeclAreaApproxTextures )
@insertpiece( DeclBlueNoiseTexture )


@property( irradiance_volumes )
Expand Down

0 comments on commit 396f229

Please sign in to comment.