From 134fdd0ef71fbea84037e5815314508faf5f64d5 Mon Sep 17 00:00:00 2001 From: myownfriend Date: Tue, 20 May 2014 23:52:32 -0400 Subject: [PATCH] Update mad_world.glsl --- Data/Sys/Shaders/mad_world.glsl | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/Data/Sys/Shaders/mad_world.glsl b/Data/Sys/Shaders/mad_world.glsl index 2e627abb57..63e46ecc39 100644 --- a/Data/Sys/Shaders/mad_world.glsl +++ b/Data/Sys/Shaders/mad_world.glsl @@ -7,16 +7,20 @@ uniform vec4 resolution; void main() { - float4 emboss = (texture(samp9, uv0+resolution.zw) - texture(samp9, uv0-resolution.zw))*2.0; - emboss -= (texture(samp9, uv0+float2(1,-1)*resolution.zw).rgba - texture(samp9, uv0+float2(-1,1)*resolution.zw).rgba); - float4 color = texture(samp9, uv0).rgba; - if (color.r > 0.8 && color.b + color.b < 0.2) - ocol0 = float4(1,0,0,0); - else { - color += emboss; - if (dot(color.rgb, float3(0.3, 0.5, 0.2)) > 0.5) - ocol0 = float4(1,1,1,1); - else - ocol0 = float4(0,0,0,0); - } -} \ No newline at end of file + float4 emboss = (texture(samp9, uv0+resolution.zw) - texture(samp9, uv0-resolution.zw))*2.0; + emboss -= (texture(samp9, uv0+float2(1,-1)*resolution.zw).rgba - texture(samp9, uv0+float2(-1,1)*resolution.zw).rgba); + float4 color = texture(samp9, uv0).rgba; + + if (color.r > 0.8 && color.b + color.b < 0.2) + { + ocol0 = float4(1,0,0,0); + } + else + { + color += emboss; + if (dot(color.rgb, float3(0.3, 0.5, 0.2)) > 0.5) + ocol0 = float4(1,1,1,1); + else + ocol0 = float4(0,0,0,0); + } +}