Letterbox, maintain render-resolution's aspect ratio

This commit is contained in:
2026-02-05 17:00:21 +01:00
parent 3b32097c56
commit cb19295575
6 changed files with 153 additions and 47 deletions

View File

@@ -4,7 +4,7 @@ import "core:mem"
import "core:log"
import "core:fmt"
PIPELINE_MAX_PASSES :: 8
PIPELINE_MAX_PASSES :: 16
Pipeline :: struct {
passes: [PIPELINE_MAX_PASSES]^Pass,
@@ -40,10 +40,11 @@ add_pass_to_pipeline :: proc(renderer: ^Renderer, pass: ^Pass) -> bool {
pipeline := &renderer.pipeline
if pipeline.amount_of_passes == PIPELINE_MAX_PASSES {
log.warnf("Failed to add scene-pass '%v' to renderer's pipeline; hit max capacity (%v).", pass.name, PIPELINE_MAX_PASSES)
return false
}
assert(pipeline.amount_of_passes < PIPELINE_MAX_PASSES)
// if pipeline.amount_of_passes == PIPELINE_MAX_PASSES {
// log.warnf("Failed to add scene-pass '%v' to renderer's pipeline; hit max capacity (%v).", pass.name, PIPELINE_MAX_PASSES)
// return false
// }
pipeline.passes[pipeline.amount_of_passes] = pass
pipeline.amount_of_passes += 1