Possibly fix device loss

This commit is contained in:
2025-11-19 14:49:22 +01:00
parent 717488201b
commit 58cf0ad068
5 changed files with 130 additions and 181 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
#![feature(portable_simd)]
#![feature(mpmc_channel)]
const DUMP_SPV_TO_FILE: bool = false;
const DUMP_SPV_TO_FILE: bool = true;
const PIPELINE_CACHING: bool = false;
const BYTECODE_IMITATES_GLSL: bool = false;
+5 -2
View File
@@ -11,6 +11,8 @@ layout(location = 0) out uint material;
const float EPSILON = .001;
const uint MAX_STEPS = 50;
void main() {
if (SPEC_BOUNDING_BOXES) {
material = object_uniforms.material;
@@ -24,7 +26,7 @@ void main() {
vec3 p = raypos;
float total_dist = 0.;
do {
for (uint i = 0; i < MAX_STEPS; i++) {
float dist = scene(vec4(p, camera_uniforms.campos_and_time.w));
total_dist += dist;
p = fma(raydir, vec3(total_dist), raypos);
@@ -36,5 +38,6 @@ void main() {
} else if (total_dist > farplane) {
discard;
}
} while (true);
}
discard;
}