3 ms·
i was trying to figure out how the ground fog happens, and i still don't
by kragen 3y ago
i was trying to figure out how the ground fog happens, and i still don't
- Sharlin 3y agoThe value of v corresponds to how far away the intersection point is. At the horizon v=0 so the color value is just constant 0.2. The closer to the camera, the more the checker value (0 or 1) contributes. The exact values are probably chosen experimentally, but note the important property that -v*(checker/2+0.3)+0.2 is always between 0 and 1. Note also that 1 means black and 0 white here, as ultimately the value is negated at line 70.