Skip to content

Instantly share code, notes, and snippets.

@felixjones
Last active July 20, 2024 01:32
Show Gist options
  • Save felixjones/d5bec1ab0c83ee134fa43a142692a09b to your computer and use it in GitHub Desktop.
Save felixjones/d5bec1ab0c83ee134fa43a142692a09b to your computer and use it in GitHub Desktop.

Two resource packs for latest 1.17 snapshot. Try them both!

@isXander
Copy link

i would love to see a full optifine shader port to resource packs. also, I dont believe mc has connected textures mod yet which optifine does

@Vextrove
Copy link

Vextrove commented Mar 13, 2021

also nowhere in the shader code do i see anything related to leaves, does this mean it's impossible for shaders to edit a certain block? (Say a shader only editing a crafting table)?

In the shader code, there is a part that says:

if (UV0.x >= 288.0 / 1024.0 && UV0.x <= 304.0 / 1024.0) {
    if (UV0.y >= 64.0 / 1024.0 && UV0.y <= 80.0 / 1024.0) {
        xs = sin(position.x + animation);
        zs = cos(position.z + animation);
    }
}

Basically, the if condition is checking which block it is rendering. You can remove the if condition and it will apply to all blocks with that rendertype

@ewobee
Copy link

ewobee commented Mar 18, 2021

It does not work in 21w11a

@JurassikLizard
Copy link

Yes, because certain things where changed.

@JurassikLizard
Copy link

also nowhere in the shader code do i see anything related to leaves, does this mean it's impossible for shaders to edit a certain block? (Say a shader only editing a crafting table)?

uv0 is a texture atlas of all the textures in the game, it is dependant on the resource pack, so that is why some resource packs break this shader. The check of uv0.x or uv0.y is the location of the current pixel relative to what texture it is, so for example, one of the the leaf textures is between an X of 288 and 304, and a Y of 64 and 80. (If you recall, textures are usually 16x16, that is why there is a range in which the pixel would qualify as a leaf).

@JurassikLizard
Copy link

They will hopefully provide a better way to check what block it is (when 1.17 fully releases) than getting it from the texture atlas, as if resource packs break the shader, then that is no good.

@infibrocco
Copy link

Hopefully this built-in shader feature gets improved more and more so that we don't have to rely on optifine anymore.
And also hope that sodium can cope with these changes and if both shaders and sodium work somewhere down the line, optifine will be even more redundant.

@Doomsdayrs
Copy link

aw this doesn't work anymore ;-;

@Reeses-Puffs
Copy link

Hopefully this built-in shader feature gets improved more and more so that we don't have to rely on optifine anymore.
And also hope that sodium can cope with these changes and if both shaders and sodium work somewhere down the line, optifine will be even more redundant.

I'm sure sodium will be perfectly fine, I'm more worried about canvas

@Reeses-Puffs
Copy link

canvas already has a snapshot port going strong, so I guess they'll be fine as well

@JustResolveJr
Copy link

not working for me I have fabulous graphics enabled and have edited the pack.mcmeta to make sure it is compatible for 1.17, still nothing. I am looking at it in visual studio and it all looks fine.

@Snoworange420
Copy link

i have the same issue lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment