and yet more cleanup...
This commit is contained in:
parent
26e855369d
commit
cf43538518
16 changed files with 80 additions and 107 deletions
|
|
@ -458,13 +458,7 @@ u8 demo3d_bsp_light_at(const demo3d_bsp* bsp, f32 x, f32 y, f32 z, u8 ambient) {
|
|||
}
|
||||
}
|
||||
|
||||
if (best_idx >= bsp->num_vertex_lights) return 255;
|
||||
|
||||
u32 packed = bsp->vertex_lights[best_idx];
|
||||
u8 direct = (packed >> 24) & 0xFF;
|
||||
u8 ao = (packed >> 16) & 0xFF;
|
||||
f32 combined = (f32)direct + ((f32)ambient / 255.0f) * (f32)ao;
|
||||
return (u8)(combined > 255.0f ? 255.0f : combined);
|
||||
return demo3d_bsp_vertex_light(bsp, best_idx, ambient);
|
||||
}
|
||||
|
||||
demo3d_bsp_lightmap_sample demo3d_bsp_sample_lightmap(const demo3d_bsp* bsp, u32 face_idx, f32 u, f32 v) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue