Ray-caster: remove debug code

Remove GPU code and uniforms that were used as scaffolding during
initial development, but have now been replaced by CPU analogues.
This commit is contained in:
Aaron Fenyes 2024-09-14 10:58:46 -07:00
parent 959e4cc8b5
commit 49655a8d62
2 changed files with 0 additions and 17 deletions

View File

@ -11,16 +11,6 @@ struct vecInv {
vec2 lt;
};
vecInv sphere(vec3 center, float radius) {
return vecInv(
center / radius,
vec2(
0.5 / radius,
0.5 * (dot(center, center) / radius - radius)
)
);
}
// --- uniforms ---
// construction. the SPHERE_MAX array size seems to affect frame rate a lot,
@ -35,8 +25,6 @@ uniform vec2 resolution;
uniform float shortdim;
// controls
uniform vec2 ctrl;
uniform vec2 radius;
uniform float opacity;
uniform float highlight;
uniform int layer_threshold;

View File

@ -7,7 +7,6 @@
// https://stackoverflow.com/a/39684775
//
extern crate js_sys;
use core::array;
use nalgebra::{DMatrix, DVector, Rotation3, Vector3};
use sycamore::{prelude::*, motion::create_raf, rt::{JsCast, JsValue}};
@ -343,8 +342,6 @@ fn main() {
);
let resolution_loc = ctx.get_uniform_location(&program, "resolution");
let shortdim_loc = ctx.get_uniform_location(&program, "shortdim");
let ctrl_loc = ctx.get_uniform_location(&program, "ctrl"); /* DEBUG */
let radius_loc = ctx.get_uniform_location(&program, "radius"); /* DEBUG */
let opacity_loc = ctx.get_uniform_location(&program, "opacity");
let highlight_loc = ctx.get_uniform_location(&program, "highlight");
let layer_threshold_loc = ctx.get_uniform_location(&program, "layer_threshold");
@ -483,8 +480,6 @@ fn main() {
}
// pass the control parameters
ctx.uniform2f(ctrl_loc.as_ref(), ctrl_x.get() as f32, ctrl_y.get() as f32); /* DEBUG */
ctx.uniform2f(radius_loc.as_ref(), radius_x.get() as f32, radius_y.get() as f32); /* DEBUG */
ctx.uniform1f(opacity_loc.as_ref(), opacity.get() as f32);
ctx.uniform1f(highlight_loc.as_ref(), highlight.get() as f32);
ctx.uniform1i(layer_threshold_loc.as_ref(), layer_threshold.get() as i32);