Skip to content

Commit

Permalink
"Fix" LSD shader
Browse files Browse the repository at this point in the history
This still won't work because Mojang broke the matrix4x4 uniform type
(listed as matrix4 in the changelog, but matrix4x4 is correct). It needs
16 inputs but the number of inputs per uniform is limited to 4. Removing
that limit with a mixin causes the game to crash, so this seems to be a
more complex design flaw in the 25w07a shader change. Minecraft itself
no longer uses this type anywhere, so it likely went unnoticed.
  • Loading branch information
Alexander01998 committed Feb 20, 2025
1 parent 95ce723 commit febcad1
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 73 deletions.
115 changes: 111 additions & 4 deletions src/main/resources/assets/wurst/post_effect/lsd.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,131 @@
},
"passes": [
{
"program": "wurst:lsd",
"vertex_shader": "minecraft:post/sobel",
"fragment_shader": "wurst:post/lsd",
"inputs": [
{
"sampler_name": "Diffuse",
"target": "minecraft:main"
}
],
"output": "swap"
"output": "swap",
"uniforms": [
{
"name": "ProjMat",
"type": "matrix4x4",
"count": 16,
"values": [
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0
]
},
{
"name": "OutSize",
"type": "float",
"count": 2,
"values": [
1.0,
1.0
]
},
{
"name": "GameTime",
"type": "float",
"count": 1,
"values": [
0.0
]
},
{
"name": "Frequency",
"type": "float",
"count": 2,
"values": [
512.0,
288.0
]
},
{
"name": "WobbleAmount",
"type": "float",
"count": 2,
"values": [
0.002,
0.002
]
}
]
},
{
"program": "minecraft:post/blit",
"vertex_shader": "minecraft:post/blit",
"fragment_shader": "minecraft:post/blit",
"inputs": [
{
"sampler_name": "In",
"target": "swap"
}
],
"output": "minecraft:main"
"output": "minecraft:main",
"uniforms": [
{
"name": "ProjMat",
"type": "matrix4x4",
"count": 16,
"values": [
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0
]
},
{
"name": "OutSize",
"type": "float",
"count": 2,
"values": [
1.0,
1.0
]
},
{
"name": "ColorModulate",
"type": "float",
"count": 4,
"values": [
1.0,
1.0,
1.0,
1.0
]
}
]
}
]
}
69 changes: 0 additions & 69 deletions src/main/resources/assets/wurst/shaders/lsd.json

This file was deleted.

0 comments on commit febcad1

Please sign in to comment.