Navigate to the top level

Specular

Description
Tests handling of specular color with interesting combinations of lighting settings and specular params.
Suite class def

ControlFlags_FF

Demonstrates that SET_SPECULAR_ENABLE = false forces specular values to {0, 0, 0, 1}. Also demonstrates that failing to set SEPARATE_SPECULAR will cause the specular alpha to be set to 1 and failing to set ALPHA_FROM_MATERIAL_SPECULAR will pass through vertex specular RGB instead of performing the light calculation.

Renders two groups of two rows of 4 quads each with the fixed function pipeline. The first row is the specular component, the second is the diffuse. Lighting is enabled but with a directional light pointing at {1, 0, 1}.

Each quad has specular and diffuse colors of: UL = {1.f, 0.f, 0.f, 0.15f}, {0.f, 0.f, 0.5f, 1.f} UR = {1.f, 0.f, 0.f, 0.75f}, {0.f, 0.f, 0.75f, 1.f} LR = {0.f, 1.f, 0.f, 1.f}, {0.f, 0.f, 1.f, 1.f} LL = {0.f, 1.f, 0.f, 0.2f}, {0.f, 0.f, 0.25f, 1.f}

The upper row has SET_SPECULAR_ENABLE = false. The lower row has it true. The first column has SET_LIGHT_CONTROL = SEPARATE_SPECULAR + ALPHA_FROM_MATERIAL_SPECULAR The second has SET_LIGHT_CONTROL = SEPARATE_SPECULAR The third has SET_LIGHT_CONTROL = ALPHA_FROM_MATERIAL_SPECULAR The fourth has SET_LIGHT_CONTROL = 0

Because lighting is enabled, the diffuse alpha is entirely dictated by SET_MATERIAL_ALPHA, and RGB is entirely set by the lighting calculations.

Image with alpha
Test result for Specular::ControlFlags_FF
Image as seen on display
No alpha test result for Specular::ControlFlags_FF

ControlFlags_VS

Demonstrates that SET_SPECULAR_ENABLE = false forces specular values to {0, 0, 0, 1}. Also demonstrates that failing to set SEPARATE_SPECULAR will cause the specular alpha to be set to 1 and failing to set ALPHA_FROM_MATERIAL_SPECULAR will pass through vertex specular RGB instead of performing the light calculation.

Renders two groups of two rows of 4 quads each with the fixed function pipeline. The first row is the specular component, the second is the diffuse. Lighting is enabled but with a directional light pointing at {1, 0, 1}.

Each quad has specular and diffuse colors of: UL = {1.f, 0.f, 0.f, 0.15f}, {0.f, 0.f, 0.5f, 1.f} UR = {1.f, 0.f, 0.f, 0.75f}, {0.f, 0.f, 0.75f, 1.f} LR = {0.f, 1.f, 0.f, 1.f}, {0.f, 0.f, 1.f, 1.f} LL = {0.f, 1.f, 0.f, 0.2f}, {0.f, 0.f, 0.25f, 1.f}

The upper row has SET_SPECULAR_ENABLE = false. The lower row has it true. The first column has SET_LIGHT_CONTROL = SEPARATE_SPECULAR + ALPHA_FROM_MATERIAL_SPECULAR The second has SET_LIGHT_CONTROL = SEPARATE_SPECULAR The third has SET_LIGHT_CONTROL = ALPHA_FROM_MATERIAL_SPECULAR The fourth has SET_LIGHT_CONTROL = 0

Because lighting is enabled, the diffuse alpha is entirely dictated by SET_MATERIAL_ALPHA, and RGB is entirely set by the lighting calculations.

Image with alpha
Test result for Specular::ControlFlags_VS
Image as seen on display
No alpha test result for Specular::ControlFlags_VS

ControlFlagsLightDisable_FF

Demonstrates that SET_SPECULAR_ENABLE = false forces specular values to {0, 0, 0, 1}. Also demonstrates that failing to set SEPARATE_SPECULAR will cause the specular alpha to be set to 1.

Renders two groups of two rows of 4 quads each with the fixed function pipeline. The first row is the specular component, the second is the diffuse. Lighting is disabled.

Each quad has specular and diffuse colors of: UL = {1.f, 0.f, 0.f, 0.15f}, {0.f, 0.f, 0.5f, 1.f} UR = {1.f, 0.f, 0.f, 0.75f}, {0.f, 0.f, 0.75f, 1.f} LR = {0.f, 1.f, 0.f, 1.f}, {0.f, 0.f, 1.f, 1.f} LL = {0.f, 1.f, 0.f, 0.2f}, {0.f, 0.f, 0.25f, 1.f}

The upper two rows have SET_SPECULAR_ENABLE = false. The lower rows have it true. The first column has SET_LIGHT_CONTROL = SEPARATE_SPECULAR + ALPHA_FROM_MATERIAL_SPECULAR The second has SET_LIGHT_CONTROL = SEPARATE_SPECULAR The third has SET_LIGHT_CONTROL = ALPHA_FROM_MATERIAL_SPECULAR The fourth has SET_LIGHT_CONTROL = 0

Image with alpha
Test result for Specular::ControlFlagsLightDisable_FF
Image as seen on display
No alpha test result for Specular::ControlFlagsLightDisable_FF

ControlFlagsLightDisable_VS

Demonstrates that SET_SPECULAR_ENABLE = false forces specular values to {0, 0, 0, 1}. Also demonstrates that failing to set SEPARATE_SPECULAR will cause the specular alpha to be set to 1.

Renders two groups of two rows of 4 quads each with the fixed function pipeline. The first row is the specular component, the second is the diffuse. Lighting is disabled.

Each quad has specular and diffuse colors of: UL = {1.f, 0.f, 0.f, 0.15f}, {0.f, 0.f, 0.5f, 1.f} UR = {1.f, 0.f, 0.f, 0.75f}, {0.f, 0.f, 0.75f, 1.f} LR = {0.f, 1.f, 0.f, 1.f}, {0.f, 0.f, 1.f, 1.f} LL = {0.f, 1.f, 0.f, 0.2f}, {0.f, 0.f, 0.25f, 1.f}

The upper row has SET_SPECULAR_ENABLE = false. The lower row has it true. The first column has SET_LIGHT_CONTROL = SEPARATE_SPECULAR + ALPHA_FROM_MATERIAL_SPECULAR The second has SET_LIGHT_CONTROL = SEPARATE_SPECULAR The third has SET_LIGHT_CONTROL = ALPHA_FROM_MATERIAL_SPECULAR The fourth has SET_LIGHT_CONTROL = 0

Image with alpha
Test result for Specular::ControlFlagsLightDisable_VS
Image as seen on display
No alpha test result for Specular::ControlFlagsLightDisable_VS

ControlFlagsNoLight_FF

Demonstrates that SET_SPECULAR_ENABLE = false forces specular values to {0, 0, 0, 1}. Also demonstrates that failing to set SEPARATE_SPECULAR will cause the specular alpha to be set to 1 and failing to set ALPHA_FROM_MATERIAL_SPECULAR will pass through vertex specular RGB instead of performing the light calculation.

Renders two groups of two rows of 4 quads each with the fixed function pipeline. The first row is the specular component, the second is the diffuse. Lighting is enabled but no light exists.

Each quad has specular and diffuse colors of: UL = {1.f, 0.f, 0.f, 0.15f}, {0.f, 0.f, 0.5f, 1.f} UR = {1.f, 0.f, 0.f, 0.75f}, {0.f, 0.f, 0.75f, 1.f} LR = {0.f, 1.f, 0.f, 1.f}, {0.f, 0.f, 1.f, 1.f} LL = {0.f, 1.f, 0.f, 0.2f}, {0.f, 0.f, 0.25f, 1.f}

The upper row has SET_SPECULAR_ENABLE = false. The lower row has it true. The first column has SET_LIGHT_CONTROL = SEPARATE_SPECULAR + ALPHA_FROM_MATERIAL_SPECULAR The second has SET_LIGHT_CONTROL = SEPARATE_SPECULAR The third has SET_LIGHT_CONTROL = ALPHA_FROM_MATERIAL_SPECULAR The fourth has SET_LIGHT_CONTROL = 0

Because lighting is enabled, the diffuse alpha is entirely dictated by SET_MATERIAL_ALPHA, and RGB is entirely set by the lighting calculations.

Image with alpha
Test result for Specular::ControlFlagsNoLight_FF
Image as seen on display
No alpha test result for Specular::ControlFlagsNoLight_FF

ControlFlagsNoLight_VS

Demonstrates that SET_SPECULAR_ENABLE = false forces specular values to {0, 0, 0, 1}. Also demonstrates that failing to set SEPARATE_SPECULAR will cause the specular alpha to be set to 1 and failing to set ALPHA_FROM_MATERIAL_SPECULAR will pass through vertex specular RGB instead of performing the light calculation.

Renders two groups of two rows of 4 quads each with the fixed function pipeline. The first row is the specular component, the second is the diffuse. Lighting is enabled but no light exists.

Each quad has specular and diffuse colors of: UL = {1.f, 0.f, 0.f, 0.15f}, {0.f, 0.f, 0.5f, 1.f} UR = {1.f, 0.f, 0.f, 0.75f}, {0.f, 0.f, 0.75f, 1.f} LR = {0.f, 1.f, 0.f, 1.f}, {0.f, 0.f, 1.f, 1.f} LL = {0.f, 1.f, 0.f, 0.2f}, {0.f, 0.f, 0.25f, 1.f}

The upper row has SET_SPECULAR_ENABLE = false. The lower row has it true. The first column has SET_LIGHT_CONTROL = SEPARATE_SPECULAR + ALPHA_FROM_MATERIAL_SPECULAR The second has SET_LIGHT_CONTROL = SEPARATE_SPECULAR The third has SET_LIGHT_CONTROL = ALPHA_FROM_MATERIAL_SPECULAR The fourth has SET_LIGHT_CONTROL = 0

Because lighting is enabled, the diffuse alpha is entirely dictated by SET_MATERIAL_ALPHA, and RGB is entirely set by the lighting calculations.

Image with alpha
Test result for Specular::ControlFlagsNoLight_VS
Image as seen on display
No alpha test result for Specular::ControlFlagsNoLight_VS

SpecParams_FF_AllZero

Renders a number of meshes with a directional light and a point light, shading the specular channel only. LIGHT_CONTROL is set to SEPARATE_SPECULAR and SET_SPECULAR_PARAMS is set to the values displayed in the image.

Image with alpha
Test result for Specular::SpecParams_FF_AllZero
Image as seen on display
No alpha test result for Specular::SpecParams_FF_AllZero

SpecParams_FF_InvMechAssault

Renders a number of meshes with a directional light and a point light, shading the specular channel only. LIGHT_CONTROL is set to SEPARATE_SPECULAR and SET_SPECULAR_PARAMS is set to the values displayed in the image.

Image with alpha
Test result for Specular::SpecParams_FF_InvMechAssault
Image as seen on display
No alpha test result for Specular::SpecParams_FF_InvMechAssault

SpecParams_FF_MechAssault

Renders a number of meshes with a directional light and a point light, shading the specular channel only. LIGHT_CONTROL is set to SEPARATE_SPECULAR and SET_SPECULAR_PARAMS is set to the values displayed in the image.

Image with alpha
Test result for Specular::SpecParams_FF_MechAssault
Image as seen on display
No alpha test result for Specular::SpecParams_FF_MechAssault

SpecParams_FF_NinjaGaidenBlack

Renders a number of meshes with a directional light and a point light, shading the specular channel only. LIGHT_CONTROL is set to SEPARATE_SPECULAR and SET_SPECULAR_PARAMS is set to the values displayed in the image.

Image with alpha
Test result for Specular::SpecParams_FF_NinjaGaidenBlack
Image as seen on display
No alpha test result for Specular::SpecParams_FF_NinjaGaidenBlack

SpecParams_FF_Pow0_1

Image with alpha
Test result for Specular::SpecParams_FF_Pow0_1
Image as seen on display
No alpha test result for Specular::SpecParams_FF_Pow0_1

SpecParams_FF_Pow16_0

Image with alpha
Test result for Specular::SpecParams_FF_Pow16_0
Image as seen on display
No alpha test result for Specular::SpecParams_FF_Pow16_0

SpecParams_FF_Pow1_0

Image with alpha
Test result for Specular::SpecParams_FF_Pow1_0
Image as seen on display
No alpha test result for Specular::SpecParams_FF_Pow1_0

SpecParams_FF_Pow24_0

Image with alpha
Test result for Specular::SpecParams_FF_Pow24_0
Image as seen on display
No alpha test result for Specular::SpecParams_FF_Pow24_0

SpecParams_FF_Pow2_0

Image with alpha
Test result for Specular::SpecParams_FF_Pow2_0
Image as seen on display
No alpha test result for Specular::SpecParams_FF_Pow2_0

SpecParams_FF_Pow4_0

Image with alpha
Test result for Specular::SpecParams_FF_Pow4_0
Image as seen on display
No alpha test result for Specular::SpecParams_FF_Pow4_0

SpecParams_FF_Pow8_0

Image with alpha
Test result for Specular::SpecParams_FF_Pow8_0
Image as seen on display
No alpha test result for Specular::SpecParams_FF_Pow8_0