Shader programs are used by OgreMax Passes. Before they can be used, however, the OgreMax environment needs to be configured:
void main
(
float4 position : POSITION,
float2 uv : TEXCOORD0,
out float4 outPosition : POSITION,
out float2 outUv : TEXCOORD0,
out float4 outColor : COLOR,
uniform float4x4 worldViewProj,
uniform float4 ambientColor
)
{
outPosition = mul(worldViewProj, position);
outUv = uv;
outColor = ambientColor;
}
vertex_program AmbientOneTexture_hlsl hlsl
{
source AmbientOneTexture_vs.hlsl
entry_point main
target vs_1_1
default_params
{
param_named_auto worldViewProj worldviewproj_matrix
param_named_auto ambientColor ambient_light_colour
}
}
Create an OgreMax material - Create an OgreMax material in the material editor, add a technique, then add a pass to the technique. In the pass you can select the programs to reference under one of the shader rollouts. Once a program is selected, its user interface controls will appear:
If there are no shader programs to select, or no user interface controls appear, it's because: