Point lights
This commit is contained in:
@@ -61,6 +61,15 @@ update_light_buffer :: () {
|
||||
light_data.light_matrix = light_matrix;
|
||||
|
||||
upload_data_to_buffer(engine.renderer, engine.directional_light_buffer, *light_data, size_of(Directional_Light_Buffer_Data));
|
||||
|
||||
point_light_array: Point_Light_Array;
|
||||
for light: engine.current_scene.by_type._Point_Light {
|
||||
shd_point_light := to_shader_point_light(light);
|
||||
point_light_array.point_lights[point_light_array.num_point_lights] = shd_point_light;
|
||||
point_light_array.num_point_lights += 1;
|
||||
}
|
||||
|
||||
upload_data_to_buffer(engine.renderer, engine.point_light_buffer, *point_light_array, size_of(Point_Light_Array));
|
||||
}
|
||||
|
||||
sync_engine_buffers :: () {
|
||||
|
||||
Reference in New Issue
Block a user