From d8188cf90bfc22b2ccce4799782312829fae11c5 Mon Sep 17 00:00:00 2001 From: Robert Beckebans Date: Sat, 10 Apr 2021 16:55:54 +0200 Subject: [PATCH] Fixed problems with Mesa GLSL compiler --- base/renderprogs/builtin/SSAO/AmbientOcclusion_AO.ps.hlsl | 2 +- .../renderprogs/builtin/lighting/ambient_lighting_IBL.ps.hlsl | 2 +- neo/renderer/RenderProgs_embedded.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/base/renderprogs/builtin/SSAO/AmbientOcclusion_AO.ps.hlsl b/base/renderprogs/builtin/SSAO/AmbientOcclusion_AO.ps.hlsl index 98b039a6..b3ca5e5e 100644 --- a/base/renderprogs/builtin/SSAO/AmbientOcclusion_AO.ps.hlsl +++ b/base/renderprogs/builtin/SSAO/AmbientOcclusion_AO.ps.hlsl @@ -407,7 +407,7 @@ void main( PS_IN fragment, out PS_OUT result ) #endif #if 1 - float randomPatternRotationAngle = BlueNoise( ssP.xy, 10.0 ) * 10.0; + float randomPatternRotationAngle = BlueNoise( float2( ssP.xy ), 10.0 ) * 10.0; //float randomPatternRotationAngle = InterleavedGradientNoise( ssP.xy ) * 10.0; #else diff --git a/base/renderprogs/builtin/lighting/ambient_lighting_IBL.ps.hlsl b/base/renderprogs/builtin/lighting/ambient_lighting_IBL.ps.hlsl index 7a9d27bf..ce85289a 100644 --- a/base/renderprogs/builtin/lighting/ambient_lighting_IBL.ps.hlsl +++ b/base/renderprogs/builtin/lighting/ambient_lighting_IBL.ps.hlsl @@ -166,7 +166,7 @@ void main( PS_IN fragment, out PS_OUT result ) float3 rayStart = fragment.texcoord7.xyz; // we can't start inside the box so move this outside and use the reverse path - rayStart += reflectionVector * 10000; + rayStart += reflectionVector * 10000.0; if( AABBRayIntersection( bounds, rayStart, -reflectionVector, hitScale ) ) { diff --git a/neo/renderer/RenderProgs_embedded.h b/neo/renderer/RenderProgs_embedded.h index 316311e3..eaceab4a 100644 --- a/neo/renderer/RenderProgs_embedded.h +++ b/neo/renderer/RenderProgs_embedded.h @@ -4654,7 +4654,7 @@ static const cgShaderDef_t cg_renderprogs[] = " float3 rayStart = fragment.texcoord7.xyz;\n" "\n" " // we can't start inside the box so move this outside and use the reverse path\n" - " rayStart += reflectionVector * 10000;\n" + " rayStart += reflectionVector * 10000.0;\n" "\n" " if( AABBRayIntersection( bounds, rayStart, -reflectionVector, hitScale ) )\n" " {\n" @@ -9397,7 +9397,7 @@ static const cgShaderDef_t cg_renderprogs[] = "#endif\n" "\n" "#if 1\n" - " float randomPatternRotationAngle = BlueNoise( ssP.xy, 10.0 ) * 10.0;\n" + " float randomPatternRotationAngle = BlueNoise( float2( ssP.xy ), 10.0 ) * 10.0;\n" " //float randomPatternRotationAngle = InterleavedGradientNoise( ssP.xy ) * 10.0;\n" "#else\n" "\n"