/*============================================================================= OfStencilShader.cg: Shaders for calculating flat water stencil Revision history: * Created by Wenle Wang. =============================================================================*/ #include "Common.cg" #include "NoUserShader.cg" #include "VertexFactory.cg" float4x4 ViewProjectionMatrix : register(VIEWPROJ_MATRIX_REG); struct vertexShaderOutput { float4 Position : POSITION; }; float4 pixelshader(float4 Pos:POSITION) : COLOR0 { return float4(100,0,0,1); } vertexShaderOutput vertexshader(vertexInput Input) { vertexFactoryInterpolants Interpolants; vertexShaderOutput Result; float FadeFactor; float4 world_position = vertexFactoryGetWorldPosition(Input, Interpolants, FadeFactor); Result.Position = _mul(ViewProjectionMatrix, world_position); return Result; } float4 vertexshader_dp(vertexInput Input) : POSITION { vertexFactoryInterpolants Interpolants; vertexShaderOutput Result; float FadeFactor; Result.Position = _mul(ViewProjectionMatrix,vertexFactoryGetWorldPosition(Input, Interpolants, FadeFactor)); return Result.Position; }