Ray-caster: enlarge the construction data uniforms

No noticeable effect on GPU performance.
This commit is contained in:
Aaron Fenyes 2024-08-28 16:06:33 -07:00
parent 8fde202911
commit 3a721a4cc8
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ vecInv sphere(vec3 center, float radius) {
// construction. the SPHERE_MAX array size seems to affect frame rate a lot, // 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 // 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 int sphere_cnt;
uniform vecInv sphere_list[SPHERE_MAX_UNIFORM]; uniform vecInv sphere_list[SPHERE_MAX_UNIFORM];
uniform vec3 color_list[SPHERE_MAX_UNIFORM]; uniform vec3 color_list[SPHERE_MAX_UNIFORM];

View File

@ -127,7 +127,7 @@ fn main() {
on_mount(move || { on_mount(move || {
// list construction elements // list construction elements
const SPHERE_MAX: usize = 12; const SPHERE_MAX: usize = 200;
let mut sphere_vec = Vec::<DVector<f64>>::new(); let mut sphere_vec = Vec::<DVector<f64>>::new();
let color_vec = vec![ let color_vec = vec![
[1.00_f32, 0.25_f32, 0.00_f32], [1.00_f32, 0.25_f32, 0.00_f32],