Skip to content

Commit

Permalink
Reworked shader compilation intermediate format.
Browse files Browse the repository at this point in the history
  • Loading branch information
facundo-villa committed Aug 2, 2023
1 parent 3292461 commit b4df9a4
Show file tree
Hide file tree
Showing 20 changed files with 1,442 additions and 1,021 deletions.
5 changes: 5 additions & 0 deletions resources/cube.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "raw",
"vertex": "shaders/vertex.besl",
"fragment": "shaders/fragment.besl"
}
3 changes: 3 additions & 0 deletions resources/shaders/fragment.besl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
main: fn () -> void {
out_color = get_debug_color(in_instance_index);
}
8 changes: 0 additions & 8 deletions resources/shaders/fragment.glsl

This file was deleted.

5 changes: 5 additions & 0 deletions resources/shaders/vertex.besl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
main: fn () -> void {
position: vec4 = pc.camera.view_projection * pc.meshes[gl_InstanceIndex].model * vec4(in_position, 1.0);
gl_Position = position;
out_instance_index = gl_InstanceIndex;
}
2 changes: 1 addition & 1 deletion src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ impl Application for GraphicsApplication {
let visibility_render_domain_handle = orchestrator.spawn_entity(render_domain::VisibilityWorldRenderDomain::new);

orchestrator.spawn_entity(rendering::render_orchestrator::RenderOrchestrator::new);
orchestrator.spawn_entity(resource_manager::ResourceManager::new_as_system);
orchestrator.spawn_system(resource_manager::ResourceManager::new_as_system);

GraphicsApplication { application, file_tracker_handle: file_tracker_handle, window_system_handle, input_system_handle, mouse_device_handle, visibility_render_domain_handle, tick_count: 0, render_system_handle }
}
Expand Down
Loading

0 comments on commit b4df9a4

Please sign in to comment.