//**************************************************************************/ // Copyright (c) 2012 Autodesk, Inc. // All rights reserved. // // These coded instructions, statements, and computer programs contain // unpublished proprietary information written by Autodesk, Inc., and are // protected by Federal copyright law. They may not be disclosed to third // parties or copied or duplicated in any form, in whole or in part, without // the prior written consent of Autodesk, Inc. //**************************************************************************/ // World-view-projection transformation. float4x4 gWVPXf : WorldViewProjection < string UIWidget = "None"; >; // The single filter input, i.e. the image to be filtered. texture gInputTex : InputTexture < string UIName = "Input Texture"; >; // Filter input sampler. sampler2D gInputSampler = sampler_state { Texture = ; MinFilter = Point; MagFilter = Point; MipFilter = Point; }; // Vertex shader input structure. struct VS_INPUT { float4 Pos : POSITION; float3 UV : TEXCOORD0; }; // Vertex shader output structure. struct VS_TO_PS { float4 HPos : POSITION; float3 UV : TEXCOORD0; }; // Vertex shader. VS_TO_PS VS_Copy(VS_INPUT In) { VS_TO_PS Out; // Transform the position from object space to clip space for output. Out.HPos = mul(gWVPXf, In.Pos); // Pass the texture coordinates unchanged. Out.UV = In.UV; return Out; } // Pixel shader. float4 PS_Copy(VS_TO_PS In) : COLOR0 { float4 output = tex2D(gInputSampler, In.UV); return 1.0 - output; } // The main technique. technique Main { pass p0 { VertexProgram = compile glslv VS_Copy(); FragmentProgram = compile glslf PS_Copy(); } }