Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- texture ScreenTexture;
- sampler TextureSampler = sampler_state
- {
- Texture = <ScreenTexture>;
- };
- float4 PixelShaderFunction(float2 TextureCoordinate : TEXCOORD0) : COLOR0
- {
- float4 color = tex2D(TextureSampler, TextureCoordinate);
- color = mul ( color, 255 );
- if ( color.r > 127 )
- {
- color.r = 255;
- }
- else
- {
- color.r = 0;
- }
- if ( color.g > 127 )
- {
- color.g = 255;
- }
- else
- {
- color.g = 0;
- }
- if ( color.b > 127 )
- {
- color.b = 255;
- }
- else
- {
- color.b = 0;
- }
- color = mul ( color, 1/255 );
- return color;
- }
- technique ShopColors
- {
- pass Pass1
- {
- PixelShader = compile ps_2_0 PixelShaderFunction();
- }
- }
Add Comment
Please, Sign In to add comment