From 43adc4f194778fdd098cfd1c46217da9b6d29ecb Mon Sep 17 00:00:00 2001 From: Marcus Wanners Date: Wed, 5 Aug 2009 17:05:27 +0000 Subject: [PATCH] Postprocesing: New nightvision shader. Yay? git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3941 8ced0084-cf51-0410-be5f-012b33b47a6e --- Data/User/Shaders/nightvision2.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Data/User/Shaders/nightvision2.txt diff --git a/Data/User/Shaders/nightvision2.txt b/Data/User/Shaders/nightvision2.txt new file mode 100644 index 0000000000..95c67f51fb --- /dev/null +++ b/Data/User/Shaders/nightvision2.txt @@ -0,0 +1,29 @@ +uniform samplerRECT samp0 : register(s0); + +void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0) +{ + float4 c0 = texRECT(samp0, uv0).rgba; + float grey = ((0.2 * c0.r) + (0.7 * c0.g) + (0.1 * c0.b))*0.7; + if (grey > 0.7){ + ; + } + else if (grey > 0.55){ + grey = grey*1.5; + } + else if (grey > 0.4){ + grey = grey*2; + } + else if (grey > 0.3){ + grey = grey*2.5; + } + else if (grey > 0.2){ + grey = grey*3; + } + else if (grey > 0.1){ + grey = grey*3.5; + } + else{ + grey = grey*4; + } + ocol0 = float4(0, grey, 0, 1.0); +} \ No newline at end of file