From 5633d217a62f781619c04fbd8ad5cf39f24ff2b2 Mon Sep 17 00:00:00 2001 From: samuncle Date: Mon, 11 Mar 2019 21:41:49 +0100 Subject: [PATCH] Reset the shader to fix the minimap --- data/shaders/combine_diffuse_color.frag | 5 ++--- data/shaders/sp_solid.frag | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/data/shaders/combine_diffuse_color.frag b/data/shaders/combine_diffuse_color.frag index a870b16be..3afbec781 100644 --- a/data/shaders/combine_diffuse_color.frag +++ b/data/shaders/combine_diffuse_color.frag @@ -28,12 +28,11 @@ void main() vec3 SpecularComponent = texture(specular_map, tc).xyz; vec3 diffuse_color_for_mix = diffuseMatColor.xyz * 4.0; - vec3 metallicMatColor = mix(vec3(0.5), diffuse_color_for_mix, metallicMapValue); + vec3 metallicMatColor = mix(vec3(0.04), diffuse_color_for_mix, metallicMapValue); vec3 tmp = DiffuseComponent * mix(diffuseMatColor.xyz, vec3(0.0), metallicMapValue) + (metallicMatColor * SpecularComponent); vec3 emitCol = diffuseMatColor.xyz + (diffuseMatColor.xyz * diffuseMatColor.xyz * emitMapValue * emitMapValue * 10.0); vec4 color_1 = vec4(tmp * ao + (emitMapValue * emitCol), 1.0); - //color_1 = vec4(tmp, 1.); // Fog float depth = texture(depth_stencil, tc).x; @@ -59,5 +58,5 @@ void main() color_2.g = ls.g + color_1.g * (1.0 - ls.a); color_2.b = ls.b + color_1.b * (1.0 - ls.a); color_2.a = ls.a + color_1.a * (1.0 - ls.a); - o_final_color = vec4(color_2.rgb, 1.0); + o_final_color = color_2; } diff --git a/data/shaders/sp_solid.frag b/data/shaders/sp_solid.frag index b57f7e2c8..9a68416ed 100644 --- a/data/shaders/sp_solid.frag +++ b/data/shaders/sp_solid.frag @@ -39,7 +39,6 @@ void main(void) o_normal_color.xy = 0.5 * EncodeNormal(normalize(normal)) + 0.5; o_normal_color.zw = layer_2.xy; - o_normal_color.z = 0.5; #else o_diffuse_color = vec4(final_color, 1.0); #endif