From 82154abdd55914d53a5ffa735bb2b02327eb965a Mon Sep 17 00:00:00 2001 From: "sl1nk3.s" Date: Wed, 10 Jun 2009 02:47:02 +0000 Subject: [PATCH] Postprocessing - quick fix for mad_world shader failing to compile (ATI cards only ?) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3403 8ced0084-cf51-0410-be5f-012b33b47a6e --- Data/User/Shaders/mad_world.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Data/User/Shaders/mad_world.txt b/Data/User/Shaders/mad_world.txt index c4870ce0e5..1f7184fe67 100644 --- a/Data/User/Shaders/mad_world.txt +++ b/Data/User/Shaders/mad_world.txt @@ -2,17 +2,16 @@ uniform samplerRECT samp0 : register(s0); void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0) { - float4 emboss = (texRECT(samp0, uv0+1).rgba - texRECT(samp0, uv0-1).rgba); + float4 emboss = (texRECT(samp0, uv0+1).rgba - texRECT(samp0, uv0-1).rgba)*2.0f; emboss -= (texRECT(samp0, uv0+float2(1,-1)).rgba - texRECT(samp0, uv0+float2(-1,1)).rgba); float4 color = texRECT(samp0, uv0).rgba; - if (color.r > 0.9 && color.b + color.b < 0.2) + if (color.r > 0.8 && color.b + color.b < 0.2) ocol0 = float4(1,0,0,0); else { color += emboss; - float4 bright = dot(color.rgb, float3(0.3, 0.5, 0.2)); - if (bright > 0.5) + 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