Most things work?

This commit is contained in:
mcrcortex
2024-01-29 19:17:26 +10:00
parent 3cb90f44fc
commit e33b8deb32
6 changed files with 163 additions and 44 deletions

View File

@@ -14,7 +14,8 @@ layout(binding = 0, std140) uniform SceneUniform {
struct BlockModel {
uint faceData[6];
uint flagsA;
uint _pad[9];
uint colourTint;
uint _pad[8];
};
struct SectionMeta {

View File

@@ -90,10 +90,16 @@ void main() {
//Compute lighting
colourTinting = getLighting(extractLightId(quad));
//Apply model colour tinting
colourTinting *= uint2vec4RGBA(model.colourTint).yzwx;
//Apply face tint
if (face == 0) {
colourTinting.xyz *= vec3(0.75, 0.75, 0.75);
} else if (face != 1) {
colourTinting.xyz *= vec3((float(face-2)/4)*0.6 + 0.4);
}
}