Open kvark opened 8 years ago
We could go 2 ways about the model lighting:
unsigned char color_offset = COLORS_VALUE_TABLE[color_id*2];
unsigned char color_shift = COLORS_VALUE_TABLE[color_id*2 + 1];
unsigned c = color_offset + (((unsigned)normals[0] -> I_8 + normals[1] -> I_8 + normals[2] -> I_8) >> color_shift)/3;
where I_8
is computed by fast_calc_intensity()
We could greatly enhance the looks and enrich the volume by adding simple phong lighting. Models already come with normals and solid colors, so these are trivial to light. Problem comes from the terrain: