We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent edbadd2 commit 62d4e82Copy full SHA for 62d4e82
1 file changed
examples/features/src/ray_shadows/shader.wgsl
@@ -33,7 +33,10 @@ var<uniform> uniforms: Uniforms;
33
@group(0) @binding(1)
34
var acc_struct: acceleration_structure;
35
36
-var<push_constant> light: vec3<f32>;
+struct PushConstants {
37
+ light: vec3<f32>,
38
+}
39
+var<push_constant> pc: PushConstants;
40
41
const SURFACE_BRIGHTNESS = 0.5;
42
@@ -45,7 +48,7 @@ fn fs_main(vertex: VertexOutput) -> @location(0) vec4<f32> {
45
48
let d = vertex.tex_coords * 2.0 - 1.0;
46
49
47
50
let origin = vertex.world_position;
- let direction = normalize(light - vertex.world_position);
51
+ let direction = normalize(pc.light - vertex.world_position);
52
53
var normal: vec3<f32>;
54
let dir_cam = normalize(camera - vertex.world_position);
0 commit comments