Skip to content

Commit 4ff7f9e

Browse files
committed
Maybe improved render mode look?
1 parent bc71f10 commit 4ff7f9e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

common/src/main/java/generations/gg/generations/core/generationscore/common/client/render/block/entity/GeneralUseBlockEntityRenderer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ open class GeneralUseBlockEntityRenderer<T : ModelProvidingBlockEntity>(ctx: Blo
114114
}
115115
}
116116

117-
var offset = blockEntity.blockPos.toVec3d().subtract(Minecraft.getInstance().cameraEntity!!.position())
117+
val offset = blockEntity.blockPos.toVec3d().subtract(Minecraft.getInstance().cameraEntity!!.position())
118118

119119
primeInstance.transformationMatrix().set(stack.last().pose()).translate(offset.x.toFloat(),
120120
offset.y.toFloat(), offset.z.toFloat()

common/src/main/resources/assets/generations_core/shaders/animated.vs.glsl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ float fog_distance(vec3 pos, int shape) {
5555
}
5656
}
5757

58-
vec4 getVertexColor() {
58+
vec4 getVertexColor(vec3 normal) {
5959
if(legacy) return vec4(1);
6060

6161
vec3 lightDir0 = normalize(Light0_Direction);
6262
vec3 lightDir1 = normalize(Light1_Direction);
63-
float light0 = max(0.0, dot(Light0_Direction, inNormal));
64-
float light1 = max(0.0, dot(Light1_Direction, inNormal));
63+
float light0 = max(0.0, dot(Light0_Direction, normal));
64+
float light1 = max(0.0, dot(Light1_Direction, normal));
6565
float lightAccum = min(1.0, (light0 + light1) * MINECRAFT_LIGHT_POWER + MINECRAFT_AMBIENT_LIGHT);
6666
return vec4(lightAccum, lightAccum, lightAccum, 1);
6767
}
@@ -72,7 +72,7 @@ void main() {
7272
vec4 worldPosition = modelTransform * vec4(positions, 1.0);
7373

7474
gl_Position = worldSpace * worldPosition;
75-
vertexColor = getVertexColor();
75+
vertexColor = getVertexColor(inNormal * transpose(inverse(mat3(modelTransform))));
7676
vertexDistance = fog_distance(gl_Position.xyz, FogShape);
7777
lightMapColor = texelFetch(lightmap, light / 16, 0);
7878
texCoord0 = (texcoords * uvScale) + uvOffset;

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ badPackets=8.2
2424
parchment=2024.11.17
2525

2626
WTHIT=12.5.1+
27-
rareCandy=2.13.0
27+
rareCandy=2.13.2
2828

2929
recipe_viewer=rei
3030
rei=16.0.799

0 commit comments

Comments
 (0)