3 ms·
It is worth to note that lightning model is trivial and only maps given directions of faces to given amount of bright. But other than that the bright is adjuste
by antirez 14y ago
It is worth to note that lightning model is trivial and only maps given directions of faces to given amount of bright. But other than that the bright is adjusted by distance.
It is pretty cool to see how a trivial lightning model like that can produce a pretty looking result.
If you want to see just the brightness of faces without texture to see more easily how light is used, just change the line:
var cc = texmap[u + v * 16 + tex * 256 * 3];
Into:
var cc = 255+(255<<8)+(255<<16);
To also remove the "distant is less bright" effect just add:
ddist = 255;
Before:
var r = ((col >> 16) ...