It's possible they did something dumb like ..
1.0 * 128 = 128.0
Which of course would overflow a signed it. Not really sure what happens with signed overflow, probably undefined.
Negative would be okay since signed int 8 is -128 -> 127
// Pseudo-code
if (fixedShaded)
shade = fixedShadingValue;
else
shade = NdotL;
// Basic lightning formula
fragment.rgb *= (diffuse * shade) + ambient;
// Pseudo-code
if (lightEnabled) {
if (fixedShaded)
shade = fixedShadingValue;
else
shade = NdotL;
}
else
shade = 1.0;
// Basic lightning formula
fragment.rgb *= (diffuse * shade) + ambient;
currentMesh->fixedShading = ph.FixedShading();
[...]
if (ph.FixedShading()) {
[...]
HarryTuttle wrote:I apply specular in fragment shader regardless of shading type
// Pseudo-code
if (fixedShaded)
shade = fixedShadingValue;
else
shade = NdotL;
// Compute diffuse factor for sunlight
if(fixedShading) {
sunFactor = fsFixedShade;
}
else {
sunFactor = dot(sunVector, fsViewNormal);
}
Users browsing this forum: No registered users and 1 guest