;**************************************************************************************** ; PinkGas.NVP ; A shader for tinting an image pink; used in the Kewlett psych-gas grenade effect. ; Works by converting the image to greyscale, and using the brightness as a blend ; factor between two other colors. So, if the greyscale is white, it will pick ; color #1, if it is black it will pick color #2. ; TimS, Sept 7 2004 ;**************************************************************************************** ps.1.1 ; Declare pixel shader version def c1, 0.21f, 0.715f, 0.072f, 0.0f ; luminance conversion constant ;def c3, 0.99f, 0.81f, 0.85f, 1.0f ; Pink ;def c4, 0.15f, 0.06f, 0.10f, 1.0f ; dark Pink def c3, 0.97f, 0.44f, 0.98f, 1.0f ; Bright def c4, 0.14f, 0.0f, 0.55f, 1.0f ; Dark tex t0 ; Fetch the texture we'll be tinting dp3 r1.rgba, t0, c1 ; Convert the image to greyscale, stored in r1 lrp r0.rgb, r1, c3, c4 ; Use the greyscale as a blend factor between the colours in c3 and c4 mul r0, r0, c2 ; Multiply in program-supplised RGBA's