File tree 7 files changed +5
-15
lines changed
7 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -321,7 +321,6 @@ mod tests {
321
321
layout(location = 0) out vec4 v_Position;
322
322
layout(set = 0, binding = 0) uniform CameraViewProj {
323
323
mat4 ViewProj;
324
- vec4 CameraPos;
325
324
};
326
325
layout(set = 1, binding = 0) uniform texture2D Texture;
327
326
@@ -379,10 +378,7 @@ mod tests {
379
378
name: "CameraViewProj" . into( ) ,
380
379
bind_type: BindType :: Uniform {
381
380
has_dynamic_offset: false ,
382
- property: UniformProperty :: Struct ( vec![
383
- UniformProperty :: Mat4 ,
384
- UniformProperty :: Vec4
385
- ] ) ,
381
+ property: UniformProperty :: Struct ( vec![ UniformProperty :: Mat4 ] ) ,
386
382
} ,
387
383
shader_stage: BindingShaderStage :: VERTEX ,
388
384
} ]
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ layout(location = 0) in vec3 Vertex_Position;
4
4
5
5
layout (set = 0 , binding = 0 ) uniform CameraViewProj {
6
6
mat4 ViewProj;
7
- vec4 CameraPos;
8
7
};
9
8
10
9
layout (set = 1 , binding = 0 ) uniform Transform {
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ layout(location = 0) out vec2 v_Uv;
8
8
9
9
layout (set = 0 , binding = 0 ) uniform CameraViewProj {
10
10
mat4 ViewProj;
11
- vec4 CameraPos;
12
11
};
13
12
14
13
layout (set = 2 , binding = 0 ) uniform Transform {
@@ -26,7 +25,7 @@ void main() {
26
25
27
26
uint x_flip_bit = 1 ; // The X flip bit
28
27
uint y_flip_bit = 2 ; // The Y flip bit
29
-
28
+
30
29
// Note: Here we subtract f32::EPSILON from the flipped UV coord. This is due to reasons unknown
31
30
// to me (@zicklag ) that causes the uv's to be slightly offset and causes over/under running of
32
31
// the sprite UV sampling which is visible when resizing the screen.
@@ -42,4 +41,4 @@ void main() {
42
41
43
42
vec3 position = Vertex_Position * vec3 (size, 1.0 );
44
43
gl_Position = ViewProj * Model * vec4 (position, 1.0 );
45
- }
44
+ }
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ layout(location = 1) out vec4 v_Color;
9
9
10
10
layout (set = 0 , binding = 0 ) uniform CameraViewProj {
11
11
mat4 ViewProj;
12
- vec4 CameraPos;
13
12
};
14
13
15
14
// TODO: merge dimensions into "sprites" buffer when that is supported in the Uniforms derive abstraction
@@ -83,4 +82,4 @@ void main() {
83
82
84
83
v_Color = color;
85
84
gl_Position = ViewProj * SpriteTransform * vec4 (vertex_position, 1.0 );
86
- }
85
+ }
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ layout(location = 0) out vec2 v_Uv;
8
8
9
9
layout (set = 0 , binding = 0 ) uniform CameraViewProj {
10
10
mat4 ViewProj;
11
- vec4 CameraPos;
12
11
};
13
12
14
13
layout (set = 1 , binding = 0 ) uniform Transform {
@@ -22,4 +21,4 @@ void main() {
22
21
v_Uv = Vertex_Uv;
23
22
vec3 position = Vertex_Position * vec3 (NodeSize, 0.0 );
24
23
gl_Position = ViewProj * Object * vec4 (position, 1.0 );
25
- }
24
+ }
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ const VERTEX_SHADER: &str = r#"
31
31
layout(location = 0) in vec3 Vertex_Position;
32
32
layout(set = 0, binding = 0) uniform CameraViewProj {
33
33
mat4 ViewProj;
34
- vec4 CameraPos;
35
34
};
36
35
layout(set = 1, binding = 0) uniform Transform {
37
36
mat4 Model;
Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ const VERTEX_SHADER: &str = r#"
39
39
layout(location = 0) in vec3 Vertex_Position;
40
40
layout(set = 0, binding = 0) uniform CameraViewProj {
41
41
mat4 ViewProj;
42
- vec4 CameraPos;
43
42
};
44
43
layout(set = 1, binding = 0) uniform Transform {
45
44
mat4 Model;
You can’t perform that action at this time.
0 commit comments