summaryrefslogtreecommitdiff
path: root/assets/final/shaders/renderer_3d.wgsl
diff options
context:
space:
mode:
Diffstat (limited to 'assets/final/shaders/renderer_3d.wgsl')
-rw-r--r--assets/final/shaders/renderer_3d.wgsl12
1 files changed, 3 insertions, 9 deletions
diff --git a/assets/final/shaders/renderer_3d.wgsl b/assets/final/shaders/renderer_3d.wgsl
index 723aeb0..f855052 100644
--- a/assets/final/shaders/renderer_3d.wgsl
+++ b/assets/final/shaders/renderer_3d.wgsl
@@ -3,13 +3,7 @@
@group(0) @binding(0) var<uniform> globals: GlobalUniforms;
@group(0) @binding(1) var<storage, read> object_data: ObjectsBuffer;
-struct BVHNode {
- min: vec3<f32>,
- left_idx: i32,
- max: vec3<f32>,
- obj_idx_or_right: i32,
-};
-@group(0) @binding(2) var<storage, read> bvh_nodes: array<BVHNode>;
+// Binding 2 is reserved for BVH buffer when enabled
@group(0) @binding(3) var noise_tex: texture_2d<f32>;
@group(0) @binding(4) var noise_sampler: sampler;
@@ -65,7 +59,7 @@ fn vs_main(@builtin(vertex_index) vertex_index: u32,
return out;
}
-#include "render/scene_query"
+#include "render/scene_query_mode"
#include "render/shadows"
#include "render/lighting_utils"
#include "ray_box"
@@ -175,4 +169,4 @@ fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
let shadow = calc_shadow(p, light_dir, 0.05, 20.0, in.instance_index);
let lit_color = calculate_lighting(base_color, normal, p, shadow);
return vec4<f32>(lit_color, 1.0);
-}
+} \ No newline at end of file