Postprocesing: New nightvision shader. Yay?

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3941 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Marcus Wanners 2009-08-05 17:05:27 +00:00
parent d7cc049921
commit 43adc4f194
1 changed files with 29 additions and 0 deletions

View File

@ -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);
}