File tree 1 file changed +8
-8
lines changed
pipelined/bevy_pbr2/src/render
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -50,16 +50,16 @@ fn vertex(vertex: Vertex) -> VertexOutput {
50
50
out . world_position = world_position ;
51
51
out . clip_position = view . view_proj * world_position ;
52
52
out . world_normal = mat3x3 <f32 >(
53
- mesh . inverse_transpose_model. x . xyz,
54
- mesh . inverse_transpose_model. y . xyz,
55
- mesh . inverse_transpose_model. z . xyz
53
+ mesh . inverse_transpose_model[ 0 ] . xyz,
54
+ mesh . inverse_transpose_model[ 1 ] . xyz,
55
+ mesh . inverse_transpose_model[ 2 ] . xyz
56
56
) * vertex . normal;
57
57
#ifdef VERTEX_TANGENTS
58
58
out . world_tangent = vec4 <f32 >(
59
59
mat3x3 <f32 >(
60
- mesh . model. x . xyz,
61
- mesh . model. y . xyz,
62
- mesh . model. z . xyz
60
+ mesh . model[ 0 ] . xyz,
61
+ mesh . model[ 1 ] . xyz,
62
+ mesh . model[ 2 ] . xyz
63
63
) * vertex . tangent. xyz,
64
64
vertex . tangent. w
65
65
);
@@ -560,12 +560,12 @@ fn fragment(in: FragmentInput) -> [[location(0)]] vec4<f32> {
560
560
#endif
561
561
562
562
var V : vec3 <f32 >;
563
- if (view . projection. w . w != 1.0 ) { // If the projection is not orthographic
563
+ if (view . projection[ 3 ] . w != 1.0 ) { // If the projection is not orthographic
564
564
// Only valid for a perpective projection
565
565
V = normalize (view . world_position. xyz - in . world_position. xyz);
566
566
} else {
567
567
// Ortho view vec
568
- V = normalize (vec3 <f32 >(view . view_proj. x . z, view . view_proj. y . z, view . view_proj. z . z));
568
+ V = normalize (vec3 <f32 >(view . view_proj[ 0 ] . z, view . view_proj[ 1 ] . z, view . view_proj[ 2 ] . z));
569
569
}
570
570
571
571
// Neubelt and Pettineo 2013, "Crafting a Next-gen Material Pipeline for The Order: 1886"
You can’t perform that action at this time.
0 commit comments