@@ -431,7 +431,7 @@ layout(location = 2) in vec3 inTangent;
431
431
layout(location = 3) in vec3 inBitangent;
432
432
layout(location = 4) in vec2 inTextCoords;
433
433
434
- layout(location = 0) out vec3 outPos;
434
+ layout(location = 0) out vec4 outPos;
435
435
layout(location = 1) out vec3 outNormal;
436
436
layout(location = 2) out vec3 outTangent;
437
437
layout(location = 3) out vec3 outBitangent;
@@ -453,7 +453,7 @@ void main()
453
453
vec4 worldPos = push_constants.modelMatrix * vec4(inPos, 1);
454
454
gl_Position = projUniform.matrix * viewUniform.matrix * worldPos;
455
455
mat3 mNormal = transpose(inverse(mat3(push_constants.modelMatrix)));
456
- outPos = worldPos.xyz ;
456
+ outPos = worldPos;
457
457
outNormal = mNormal * normalize(inNormal);
458
458
outTangent = mNormal * normalize(inTangent);
459
459
outBitangent = mNormal * normalize(inBitangent);
@@ -471,7 +471,7 @@ The `scn_frg.glsl` fragment shader is defined like this:
471
471
// Keep in sync manually with Java code
472
472
const int MAX_TEXTURES = 100;
473
473
474
- layout(location = 0) in vec3 inPos;
474
+ layout(location = 0) in vec4 inPos;
475
475
layout(location = 1) in vec3 inNormal;
476
476
layout(location = 2) in vec3 inTangent;
477
477
layout(location = 3) in vec3 inBitangent;
@@ -516,7 +516,7 @@ layout(push_constant) uniform pc {
516
516
517
517
void main()
518
518
{
519
- outPos = vec4( inPos, 1.0) ;
519
+ outPos = inPos;
520
520
521
521
Material material = matUniform.materials[push_constants.materialIdx];
522
522
if (material.hasTexture == 1) {
0 commit comments