Constant Float Register

Pixel shader input register for a 4D floating-point constant.

They can be set using def - ps or IDirect3DDevice9::SetPixelShaderConstantF.

The behavior of shader constants has changed between Direct3D 8 and Direct3D 9.

Examples

Here is an example declaring two floating-point constants within a shader.

def c40, 0.0f,0.0f,0.0f,0.0f;

These constants are loaded every time IDirect3DDevice9::SetPixelShader is called.

If you are setting constant values with the API, there is no shader declaration required.