.
Use a triple slash comments to add additional metadata information to the effect the generation of the code. They are all optional.
/// <description>A simple color blending shader for WPF.</description>
/// <target>WPF</target>
/// <profile>ps_2_0</profile>
/// <DdxUvDdyUvRegisterIndex>-1</DdxUvDdyUvRegisterIndex>
//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------
/// <summary>The brightness offset.</summary>
/// <type>Color</type>
/// <defaultValue>255,0,0,0</defaultValue>
float4 BlendColor : register(c0);
//-----------------------------------------------------------------------------
// Samplers
//-----------------------------------------------------------------------------
/// <summary>The implicit input sampler passed into the pixel shader by WPF.</summary>
/// <samplingMode>Auto</samplingMode>
sampler2D Input : register(s0);
//-----------------------------------------------------------------------------
// Pixel Shader
//-----------------------------------------------------------------------------
float4 main(float2 uv : TEXCOORD) : COLOR
{
// TODO: add your pixel shader code here.
return BlendColor * BlendColor.a + tex2D(Input, uv) * (1.0 - BlendColor.a);
}
Tag | Options | Description |
summary | ... | The text you want to appear inside the summary comment that is generated in the code. |
samplingMode | Auto, NearestNeighbor, Bilinear | The texture sampling mode to use, this is only valid on samplers, Auto is the default. |
type | (bool) (int, uint, sbyte, byte, char, short, ushort, long, ulong) (float, double) (Point, Size, Vector) (Point3D, Vector3D) (Point4D, Color) | The type you would like to override the default generated type that is exposed to C#, the ones in bold in a group represent the default for that set. |
defaultValue | bool = (true, false), float = ..., float[] = ...,... | The default value to set for the register when the C# code is generated. |