Remove extra intensity calculation

This commit is contained in:
Abdelrahman Said 2024-08-18 21:08:59 +01:00
parent 690eb3d317
commit caa8c416a9

View File

@ -80,7 +80,7 @@ internal FragmentResult phong_shader_fragment(void *shader, V3f normal,
V2f tex_coords, V2f tex_coords,
const Colour *colour, const Colour *colour,
const Model *model) { const Model *model) {
f32 intensity = get_intensity(&normal); f32 intensity;
if (model->normal) { if (model->normal) {
u64 nm_x = tex_coords.u * model->normal->width; u64 nm_x = tex_coords.u * model->normal->width;
u64 nm_y = (1.0f - tex_coords.v) * model->normal->height; u64 nm_y = (1.0f - tex_coords.v) * model->normal->height;