Possibly fix device loss
This commit is contained in:
+1
-1
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user