From: Mikko Rasa Date: Sat, 13 Mar 2021 14:00:36 +0000 (+0200) Subject: Fix some errors in the shader library X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=713ff9619daa858ffbd428f7699cd57598563dbd Fix some errors in the shader library --- diff --git a/shaderlib/common.glsl b/shaderlib/common.glsl index bac82fc1..eb191e45 100644 --- a/shaderlib/common.glsl +++ b/shaderlib/common.glsl @@ -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); } diff --git a/shaderlib/msp_interface.glsl b/shaderlib/msp_interface.glsl index ba6f3178..1c3029ef 100644 --- a/shaderlib/msp_interface.glsl +++ b/shaderlib/msp_interface.glsl @@ -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];