This commit is contained in:
Harrison Corlett 2026-06-23 13:20:43 +01:00
parent eb01ec4877
commit f135d99d74
60 changed files with 924 additions and 90 deletions

View file

@ -1,6 +1,6 @@
#version 450
const int MAX_TEXTURES = 512;
const int MAX_TEXTURES = 128;
layout(location = 0) in vec4 inPos;
layout(location = 1) in vec3 inNormal;
@ -13,6 +13,14 @@ layout(location = 0) out vec4 outPos;
layout(location = 2) out vec4 outNormal;
layout(location = 3) out vec4 outPBR;
const float bayerMatrix[16] = float[](
0.0 / 16.0, 8.0 / 16.0, 2.0 / 16.0, 10.0 / 16.0,
12.0 / 16.0, 4.0 / 16.0, 14.0 / 16.0, 6.0 / 16.0,
3.0 / 16.0, 11.0 / 16.0, 1.0 / 16.0, 9.0 / 16.0,
15.0 / 16.0, 7.0 / 16.0, 13.0 / 16.0, 5.0 / 16.0
);
struct Material {
vec4 diffuseColor;
uint hasTexture;
@ -57,7 +65,7 @@ void main()
}
if(outAlbedo.a < 0.05 || outAlbedo.a >= 0.75) discard;
if(outAlbedo.a >= 0.75 || outAlbedo.a < 0.05f) discard;
mat3 TBN = mat3(inTangent, inBitangent, inNormal);
vec3 newNormal = calcNormal(material, inNormal, inTextCoords, TBN);