We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1857d14 commit 0d2dc31Copy full SHA for 0d2dc31
3dsystem/3d_gen.cpp
@@ -256,7 +256,14 @@ static void phd_PutEnvmapPolygons(__int16 *ptrEnv) {
256
// make sure that reflection will be drawn after normal poly
257
PhdVBuf[i].zv -= (double)(W2V_SCALE/2);
258
// set lighting that depends only from fog distance
259
- PhdVBuf[i].g = (LsAdder + 0x1000) / 2;
+ PhdVBuf[i].g = 0x1000;
260
+ int depth = PhdMatrixPtr->_23 >> W2V_SHIFT;
261
+#ifdef FEATURE_VIEW_IMPROVED
262
+ PhdVBuf[i].g += CalculateFogShade(depth);
263
+#else // !FEATURE_VIEW_IMPROVED
264
+ if( depth > DEPTHQ_START ) // fog begin
265
+ PhdVBuf[i].g += depth - DEPTHQ_START;
266
+#endif // FEATURE_VIEW_IMPROVED
267
CLAMP(PhdVBuf[i].g, 0x1000, 0x1FFF); // reflection can be darker but not brighter
268
269
// rotate normal vectors for X/Y, no translation
0 commit comments