Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- RAMP SHADER
- -->
- <shader language="HLSL">
- <source><![CDATA[
- //These variables will get set automatically
- texture rubyTexture;
- sampler s0 = sampler_state { texture = <rubyTexture>; };
- float ramp(float c)
- {
- return c > 0.5 ? c : 0.24*c + 2.22*c*c - 1.4*c*c*c;
- }
- float4 NormalColourPass( in float2 Tex : TEXCOORD0 ) : COLOR0
- {
- float4 color = tex2D( s0, Tex );
- color.a = 1;
- color.r = ramp(color.r);
- color.g = ramp(color.g);
- color.b = ramp(color.b);
- return color;
- }
- Technique T0
- {
- pass p0 { PixelShader = compile ps_2_0 NormalColourPass(); }
- }
- ]]></source>
- </shader>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement