Skip to content

Commit

Permalink
Fix entity position visual bug
Browse files Browse the repository at this point in the history
  • Loading branch information
onnowhere committed Mar 27, 2021
1 parent c7a3277 commit 2f71145
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 68 deletions.
9 changes: 9 additions & 0 deletions VertexFadeRP/assets/minecraft/blockstates/dirt_path.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"variants": {
"": [
{
"model": "minecraft:block/dirt_path"
}
]
}
}
12 changes: 12 additions & 0 deletions VertexFadeRP/assets/minecraft/blockstates/podzol.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"variants": {
"snowy=false": [
{
"model": "minecraft:block/podzol"
}
],
"snowy=true": {
"model": "minecraft:block/grass_block_snow"
}
}
}
63 changes: 0 additions & 63 deletions VertexFadeRP/assets/minecraft/shaders/core/convert_rendertype.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void main() {
gl_Position = ProjMat * ModelViewMat * vec4(floor(Position) + uvScale + ChunkOffset, 1.0);
}
gl_Position += normal * blockDistance * animation * 0.2 / fadeScale * rand(Position - uvOffset);
if (blockDistance > 10.0 * fadeScale) {
gl_Position = vec4(0.0);
if (blockDistance > 15.0 * fadeScale) {
gl_Position = vec4(100.0, 100.0, 100.0, -1.0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ void main() {
// Skip inventory items
if (Light0_Direction.y > 67.0/255.0 || (Light0_Direction.y < 66.0/255.0 && Light0_Direction.y > 44.0/255.0) || Light0_Direction.y < 43.0/255.0) {
gl_Position += normal * blockDistance * animation * 0.2 / fadeScale * rand(Position - uvOffset);
if (blockDistance > 10.0 * fadeScale) {
gl_Position = vec4(0.0);
if (blockDistance > 15.0 * fadeScale) {
gl_Position = vec4(100.0, 100.0, 100.0, -1.0);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#define distanceThreshold 12.0
#define distanceThreshold 16.0
#define fadeScale 5.0

0 comments on commit 2f71145

Please sign in to comment.