Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //--------------------------------------------------------------------------------------
- // Textures
- //--------------------------------------------------------------------------------------
- texture2D texColor;
- //--------------------------------------------------------------------------------------
- // Sampler Inputs
- //--------------------------------------------------------------------------------------
- sampler2D InputSampler = sampler_state
- {
- Texture = (texColor);
- MinFilter = POINT;
- MagFilter = POINT;
- MipFilter = POINT;
- AddressU = Clamp;
- AddressV = Clamp;
- SRGBTexture=FALSE;
- MaxMipLevel=0;
- MipMapLodBias=0;
- };
- struct VS_OUTPUT_POST {
- float4 vpos : POSITION;
- float2 txcoord : TEXCOORD0;
- };
- struct VS_INPUT_POST {
- float3 pos : POSITION;
- float2 txcoord : TEXCOORD0;
- };
- float pixelWidth;
- float pixelHeight;
- //--------------------------------------------------------------------------------------
- // Vertex Shader Input
- //--------------------------------------------------------------------------------------
- VS_OUTPUT_POST VS_PostProcess(VS_INPUT_POST IN)
- {
- VS_OUTPUT_POST OUT;
- float4 pos=float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
- OUT.vpos=pos;
- OUT.txcoord.xy=IN.txcoord.xy;
- return OUT;
- }
- //--------------------------------------------------------------------------------------
- // Pixel Shader
- //--------------------------------------------------------------------------------------
- float4 main(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
- {
- float4 color = tex2D(InputSampler, IN.txcoord);
- //START HERE WITH YOUR OWN MAGIC ;)
- color.w=1;
- return color;
- }
- //--------------------------------------------------------------------------------------
- // Compiler
- //--------------------------------------------------------------------------------------
- technique PostProcess
- {
- pass P0
- {
- VertexShader = compile vs_3_0 VS_PostProcess();
- PixelShader = compile ps_3_0 main();
- ZEnable=FALSE;
- CullMode=NONE;
- ALPHATESTENABLE=FALSE;
- SEPARATEALPHABLENDENABLE=FALSE;
- AlphaBlendEnable=FALSE;
- FogEnable=FALSE;
- SRGBWRITEENABLE=FALSE;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement