]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix some errors in the shader library
authorMikko Rasa <tdb@tdb.fi>
Sat, 13 Mar 2021 14:00:36 +0000 (16:00 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 13 Mar 2021 14:14:32 +0000 (16:14 +0200)
shaderlib/common.glsl
shaderlib/msp_interface.glsl

index bac82fc131150bf0895db30d975c71cb398ae56d..eb191e45dc7f6e03ce31473b81eba73449241c40 100644 (file)
@@ -89,5 +89,5 @@ vec3 get_reflection(vec3 normal, vec3 look)
 vec3 apply_fog(vec3 color)
 {
        float fog_value = exp(fog_coord*fog_density);
-       return mix(fog_color, color, fog_value);
+       return mix(fog_color.rgb, color, fog_value);
 }
index ba6f3178cc5ca9954ffd5d6c5e66df43965aece4..1c3029ef343cbddb9a295951864300f9ac627b56 100644 (file)
@@ -60,6 +60,7 @@ uniform Lighting
 uniform sampler2D diffuse_map;
 uniform sampler2D specular_map;
 uniform sampler2D shininess_map;
+uniform sampler2D reflectivity_map;
 uniform sampler2D base_color_map;
 uniform sampler2D metalness_map;
 uniform sampler2D roughness_map;
@@ -80,7 +81,7 @@ uniform EnvMap
        mat3 env_eye_matrix;
 };
 
-const int max_clip_planes = 0;
+layout(constant_id=auto) const int max_clip_planes = 0;
 uniform Clipping
 {
        ClipPlane clip_planes[max_clip_planes];