File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
examples/features/src/ray_shadows Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,10 @@ var<uniform> uniforms: Uniforms;
3333@group (0 ) @binding (1 )
3434var acc_struct : acceleration_structure ;
3535
36- var <push_constant > light : vec3 <f32 >;
36+ struct PushConstants {
37+ light : vec3 <f32 >,
38+ }
39+ var <push_constant > pc : PushConstants ;
3740
3841const SURFACE_BRIGHTNESS = 0 .5 ;
3942
@@ -45,7 +48,7 @@ fn fs_main(vertex: VertexOutput) -> @location(0) vec4<f32> {
4548 let d = vertex . tex_coords * 2 .0 - 1 .0 ;
4649
4750 let origin = vertex . world_position ;
48- let direction = normalize (light - vertex . world_position );
51+ let direction = normalize (pc . light - vertex . world_position );
4952
5053 var normal : vec3 <f32 >;
5154 let dir_cam = normalize (camera - vertex . world_position );
You can’t perform that action at this time.
0 commit comments