ShaderType vs = compile vs_2_0 psmain();
or
ShaderType ShaderName [= asm { ShaderAssemblyInstructions }];
where:
ShaderType | Can be either vertexshader or pixelshader. |
ShaderName | An ASCII string that uniquely identifies the name of a variable within a shader. |
ShaderAssemblyInstructions | Optional. Any set of assembly instructions. For vertex shader and pixel shader assembly instructions, see Asm Shader Reference. |
A vertexshader object represents a vertex shader object. While no operation within a shader function directly accepts vertex shaders, a vertex shader can be set to the device from within a technique.
Literal vertexshader values can be expressed as an assembly block in one line,
vertexshader vs = asm { vs.2.0 mov oC0, c0 };
or across several lines,
vertexshader vs = asm { vs_2_0 mov oC0, c0 };
or as a compile call.
vertexshader vs = compile vs_2_0 psmain();
A pixelshader object represents a pixel shader object. While no operation within a shader function directly accepts pixel shaders, a pixel shader can be set to the device from within a technique.
Literal pixelshader values can be expressed as an assembly block in one line,
pixelshader ps = asm { ps.2.0 mov oC0, c0 };
or across several lines,
pixelshader ps = asm { ps_2_0 mov oC0, c0 };
or as a compile call.
pixelshader ps = compile ps_2_0 psmain();