From 3a721a4cc89bc5a8e41a075f4433c763dab1ede7 Mon Sep 17 00:00:00 2001 From: Aaron Fenyes Date: Wed, 28 Aug 2024 16:06:33 -0700 Subject: [PATCH] Ray-caster: enlarge the construction data uniforms No noticeable effect on GPU performance. --- app-proto/inversive-display/src/inversive.frag | 2 +- app-proto/inversive-display/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app-proto/inversive-display/src/inversive.frag b/app-proto/inversive-display/src/inversive.frag index 213fbe2..fbb60f6 100644 --- a/app-proto/inversive-display/src/inversive.frag +++ b/app-proto/inversive-display/src/inversive.frag @@ -25,7 +25,7 @@ vecInv sphere(vec3 center, float radius) { // construction. the SPHERE_MAX array size seems to affect frame rate a lot, // even though we should only be using the first few elements of each array -const int SPHERE_MAX_UNIFORM = 12; +const int SPHERE_MAX_UNIFORM = 200; uniform int sphere_cnt; uniform vecInv sphere_list[SPHERE_MAX_UNIFORM]; uniform vec3 color_list[SPHERE_MAX_UNIFORM]; diff --git a/app-proto/inversive-display/src/main.rs b/app-proto/inversive-display/src/main.rs index c0e67a4..1855ce2 100644 --- a/app-proto/inversive-display/src/main.rs +++ b/app-proto/inversive-display/src/main.rs @@ -127,7 +127,7 @@ fn main() { on_mount(move || { // list construction elements - const SPHERE_MAX: usize = 12; + const SPHERE_MAX: usize = 200; let mut sphere_vec = Vec::>::new(); let color_vec = vec![ [1.00_f32, 0.25_f32, 0.00_f32],