Fully implemented lighting

Two types of light sources are currently supported: directional lights
and point lights. A scene can have only one directional light and up to
1024 point lights.
This commit is contained in:
Lorenzo Torres 2025-08-08 03:18:08 +02:00
parent 214317e0bf
commit 503ed33aec
7 changed files with 181 additions and 48 deletions

14
src/rendering/lights.zig Normal file
View file

@ -0,0 +1,14 @@
pub const DirectionalLight = extern struct {
direction: [3]f32 align(16),
ambient: [3]f32 align(16),
diffuse: [3]f32 align(16),
specular: [3]f32 align(16),
};
pub const PointLight = extern struct {
position: [3]f32 align(16),
ambient: [3]f32 align(16),
diffuse: [3]f32 align(16),
specular: [3]f32 align(16),
data: [3]f32 align(16),
};