This commit is contained in:
mcrcortex
2024-02-03 09:04:57 +10:00
parent dcc41f138d
commit b00abc10ad
4 changed files with 9 additions and 9 deletions

View File

@@ -8,7 +8,7 @@ yarn_mappings=1.20.4+build.1
loader_version=0.15.0 loader_version=0.15.0
# Mod Properties # Mod Properties
mod_version = 0.0.3-alpha mod_version = 0.0.4-alpha
maven_group = me.cortex maven_group = me.cortex
archives_base_name = voxy archives_base_name = voxy

View File

@@ -12,7 +12,7 @@ layout(location = 4) in flat uint flags;
layout(location = 0) out vec4 outColour; layout(location = 0) out vec4 outColour;
void main() { void main() {
vec2 uv = mod(uv, vec2(1))*(1f/(vec2(3,2)*256f)); vec2 uv = mod(uv, vec2(1f))*(1f/(vec2(3f,2f)*256f));
vec4 colour = texture(blockModelAtlas, uv + baseUV); vec4 colour = texture(blockModelAtlas, uv + baseUV);
if ((flags&1) == 1 && colour.a <= 0.25f) { if ((flags&1) == 1 && colour.a <= 0.25f) {
discard; discard;

View File

@@ -102,17 +102,17 @@ void main() {
tintColour = colourData[tintColour + extractBiomeId(quad)]; tintColour = colourData[tintColour + extractBiomeId(quad)];
} }
tinting *= uint2vec4RGBA(tintColour).yzwx; tinting *= uint2vec4RGBA(tintColour).yzwx;
addin = vec4(0); addin = vec4(0.0);
if (!modelIsTranslucent(model)) { if (!modelIsTranslucent(model)) {
tinting.w = 0; tinting.w = 0.0;
addin.w = float(face|(lodLevel<<3))/255; addin.w = float(face|(lodLevel<<3))/255.0;
} }
//Apply face tint //Apply face tint
if (face == 0) { if (face == 0) {
tinting.xyz *= vec3(0.75, 0.75, 0.75); tinting.xyz *= vec3(0.75, 0.75, 0.75);
} else if (face != 1) { } else if (face != 1) {
tinting.xyz *= vec3((float(face-2)/4)*0.3 + 0.7); tinting.xyz *= vec3((float(face-2)/4.0)*0.3 + 0.7);
} }

View File

@@ -60,7 +60,7 @@ void main() {
return; return;
} }
vec4 colour = imageLoad(colourTex, ivec2(gl_GlobalInvocationID.xy)); vec4 colour = imageLoad(colourTex, ivec2(gl_GlobalInvocationID.xy));
uint metadata = uint(colour.w*255); uint metadata = uint(colour.w*255f);
uint face = metadata&7; uint face = metadata&7;
uint lod = (metadata>>3)&7; uint lod = (metadata>>3)&7;
vec3 pos = rev3d(vec3(point, depth)); vec3 pos = rev3d(vec3(point, depth));
@@ -76,8 +76,8 @@ void main() {
} }
vec4 ocolour = colour; vec4 ocolour = colour;
ocolour.xyz *= ((1-d)/2+0.5); ocolour.xyz *= ((1f-d)/2f+0.5f);
ocolour.w = 1; ocolour.w = 1f;
imageStore(colourTex, ivec2(gl_GlobalInvocationID.xy), ocolour); imageStore(colourTex, ivec2(gl_GlobalInvocationID.xy), ocolour);
} }
//vec4 ocolour = vec4(max(0, d), abs(min(0,d)), 0, 1); //vec4 ocolour = vec4(max(0, d), abs(min(0,d)), 0, 1);