Ian, some new ideas for self-illuminated (= luminous) polys or: "another chapter of my never-ending arm wrestling with the Real3D odd light model".

Given that fixed shading value is a drop-in replacement for the NdotL result, as we already found out this summer, the general formula for a basic illuminated polygon can be expressed with:

- Code: Select all
`// Pseudo-code`

if (fixedShaded)

shade = fixedShadingValue;

else

shade = NdotL;

// Basic lightning formula

fragment.rgb *= (diffuse * shade) + ambient;

Now, extending the concept to luminous polygons (the ones which aren't affected by lightning, as stated in the devguide), we can rewrite the above like this:

- Code: Select all
`// Pseudo-code`

if (lightEnabled) {

if (fixedShaded)

shade = fixedShadingValue;

else

shade = NdotL;

}

else

shade = 1.0;

// Basic lightning formula

fragment.rgb *= (diffuse * shade) + ambient;

This seems to give the correct results especially in Scud. But there's a catch: sometimes the brightness of luminous polys can be excessive (compared with real Model3 footage) so here comes into play the

intensityClamp uniform. By settings that like this:

for step 1.0 games: always

true;

for step 1.5 games: always

false;

for step 2.x games: always

true only for luminous polygons;

We obtain the correct brightness in seemingly every cases. As always I didn't played every game 'till the end, but it's worth a try.