Skip to content

Commit

Permalink
pbr.wgsl: Minor clarifying comment
Browse files Browse the repository at this point in the history
  • Loading branch information
superdump committed Jul 17, 2021
1 parent eaf734e commit ba2bfc6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pipelined/bevy_pbr2/src/render/pbr.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ fn fetch_point_shadow(light_id: i32, frag_position: vec4<f32>, surface_normal: v
// NOTE: These simplifications come from multiplying:
// projection * vec4(0, 0, -major_axis_magnitude, 1.0)
// and keeping only the terms that have any impact on the depth.
// Projection-agnostic approach:
let projection_cols23_row2 = vec2<f32>(light.projection[2][2], light.projection[3][2]);
let projection_cols23_row3 = vec2<f32>(light.projection[2][3], light.projection[3][3]);
let frag_zw = vec2<f32>(-major_axis_magnitude, 1.0);
Expand Down

0 comments on commit ba2bfc6

Please sign in to comment.