From 826810fa88810e5f43cbeb945ae9ef4bc5c5e539 Mon Sep 17 00:00:00 2001 From: mittorn Date: Tue, 16 Feb 2021 20:46:00 +0000 Subject: [PATCH] glsl: fix invalid optional argument syntax --- glsl/deferred/bsptrace.h | 2 +- glsl/deferred/light_fp.glsl | 2 +- glsl/deferred/scene_all_fp.glsl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/glsl/deferred/bsptrace.h b/glsl/deferred/bsptrace.h index 27840cb..ee9693c 100644 --- a/glsl/deferred/bsptrace.h +++ b/glsl/deferred/bsptrace.h @@ -47,7 +47,7 @@ vec4 fetchNode( float number ) return texture2DRect( u_BspNodesMap, ivec2( x, y )); } -float traceRay( const in vec3 p0, const in vec3 p1, float nodenum = 0.0 ) +float traceRay( const in vec3 p0, const in vec3 p1, float nodenum ) { #if defined( GLSL_gpu_shader4 ) vec3 stack_p1[MAX_STACK_DEPTH]; diff --git a/glsl/deferred/light_fp.glsl b/glsl/deferred/light_fp.glsl index ad19bcc..5668a09 100644 --- a/glsl/deferred/light_fp.glsl +++ b/glsl/deferred/light_fp.glsl @@ -136,7 +136,7 @@ void main( void ) #if defined( BSPTRACE_BMODELS ) if( add > EQUAL_EPSILON && bool( traceRay2( pos, delta ))) #else - if( add > EQUAL_EPSILON && bool( traceRay( pos, delta ))) + if( add > EQUAL_EPSILON && bool( traceRay( pos, delta, 0.0 ))) #endif { shadowmap[i] += (first) ? 0.5 : 0.25; diff --git a/glsl/deferred/scene_all_fp.glsl b/glsl/deferred/scene_all_fp.glsl index 6d857d4..41c01de 100644 --- a/glsl/deferred/scene_all_fp.glsl +++ b/glsl/deferred/scene_all_fp.glsl @@ -168,7 +168,7 @@ void main( void ) #if defined( BSPTRACE_BMODELS ) add *= traceRay2( pos, delta ); #else - add *= traceRay( pos, delta ); + add *= traceRay( pos, delta, 0.0 ); #endif // unroll styles if( styles[0] == 255.0 )