Change directional light to point light

This commit is contained in:
Abdelrahman Said 2024-08-24 23:15:38 +01:00
parent 22edc89593
commit 62aa2fbc3b
2 changed files with 5 additions and 5 deletions

View File

@ -33,11 +33,11 @@ struct phong_material {
f32 shininess;
};
typedef struct directional_light DirectionalLight;
struct directional_light {
typedef struct point_light PointLight;
struct point_light {
V3f diffuse_intensity;
V3f specular_intensity;
V3f direction;
V3f position;
};
typedef struct model Model;

View File

@ -22,10 +22,10 @@ internal Shader perspective = {0};
internal Shader orthographic = {0};
internal V3f g_ambient_light = {0.6f, 0.45f, 0.55f};
internal DirectionalLight g_directional_light = {
internal PointLight g_directional_light = {
.diffuse_intensity = {0.9f, 1.0f, 1.0f},
.specular_intensity = {1.0f, 0.8f, 2.0f},
.direction = {0.0f, 0.0f, 1.45f},
.position = {1.05f, 0.9f, 1.2f},
};
internal V3f g_eye = {0.2f, 0.1f, 0.75f};
internal V3f g_target = {0};