Fix NO_SHADING

This commit is contained in:
Miloslav Číž 2018-09-28 14:38:53 +02:00
parent e24231ea84
commit 175ea1ef85

View file

@ -951,6 +951,7 @@ int16_t intensity = 0;
color = pixel->isFloor ? cFloor: cCeiling;
#endif
#ifndef NO_SHADING
#ifndef NO_MIRROR
intensity = pixel->isFloor ?
2 - (pixel->depth - mirror * 128) / RCL_UNITS_PER_SQUARE : 0;
@ -959,6 +960,8 @@ int16_t intensity = 0;
#endif
color = addIntensity(color,intensity);
#endif
mirror++;
}
@ -1006,7 +1009,10 @@ int16_t intensity = 0;
color = pixel->depth > TEXTURE_MAX_DISTANCE_FLOOR ?
textureAverageColors[0] :
sampleImage(textures[0],pixel->texCoords.x / FLOOR_TEXTURE_SCALE,pixel->texCoords.y / FLOOR_TEXTURE_SCALE);
#ifndef NO_SHADING
color = addIntensity(color,intensity);
#endif
putSubsampledPixel(pixel->position.x,RESOLUTION_Y - pixel->position.y - 1,color);
}
#endif