I am trying to convert an small hlsl shader to Cg and use it in Unity, any help would be appreciated: Code (CSharp): texture m_MyTexture; float m_XCenter; float m_YCenter; sampler2D samplerState = sampler_state { Texture = ; MinFilter = Point; MagFilter = Point; MipFilter = Linear; AddressU = CLAMP; AddressV = CLAMP; }; struct VS_OUTPUT { float4 Position : POSITION; float2 TexCoords : TEXCOORD0; }; float4 multiply (VS_OUTPUT Input) : COLOR0 { float4 colour = tex2D(samplerState, Input.TexCoords); return colour; } technique Main { pass P0 { PixelShader = compile ps_2_0 multiply(); } } PS: If input isn't possible to happen, it's not a problem, it's mainly so I can give it a go at converting it
Should that shader actually do something special..? You can download builtin shader sources from there to see examples: http://unity3d.com/get-unity/download/archive