depressed-pho / natural-mystic-shaders

Shader pack for Minecraft Bedrock aliming to be as realistic as possible
Creative Commons Zero v1.0 Universal
28 stars 3 forks source link

Add waving leaves and plants #11

Open depressed-pho opened 5 years ago

depressed-pho commented 5 years ago

Dunno if feasible tho.

depressed-pho commented 5 years ago

Partially fixed now. For plants anything other than leaves, it’s currently impossible because shaders can’t tell plants from grass blocks.

pasithea2 commented 5 years ago

Partially fixed now. For plants anything other than leaves, it’s currently impossible because shaders can’t tell plants from grass brocks.

You should use animated textures to simulate waving plants. http://mcpedl.com/waving-plants/ this is a pack that does that. Try to make your own

depressed-pho commented 5 years ago

Oh nice, that would be indeed possible but hmmm, that means my shader pack would end up overriding textures and therefore it won't play nice with non-vanilla texture packs. I think we shouldn't do it.

pasithea2 commented 5 years ago

What about Seus pe shaders? They somehow made plants wave. Here is a video of the shaders. https://youtu.be/8AFgXjsxPwg The link to the pack is http://mcpedl.com/seus-shader/ However it only works on mcpe 1.2 ☹️

depressed-pho commented 5 years ago

Yes. Some shaders including SEUS PE do it indeed. Let me explain how they are doing it, and why I don't want to do it:

Resource packs have a separate texture image file for each block, but when the game needs to render the terrain, it first combines all of those textures into one large tiled image for a performance reason. The game then passes that image to the terrain shader along with (x, y) coordinates pointing at the texture for the block currently being rendered. Though the shader doesn't know what block it's asked to render, it is still able to use the correct texture because it knows which part of the texture map is to be used.

Shaders like SEUS PE exploits this and try to detect blocks by comparing the texture coordinates with hard-coded values! This kinda works because a single release of the game always places the same texture at the same location. BUT. The ordering of textures is completely arbitrary and Mojang pays no attention to preserve the order between releases for obvious and truly understandable reasons, and whenever it changes shaders relying on those hard-coded coordinates immediately stop working.

Not only that, the size of the texture map changes depending on the resolution of textures. Let's say the texture of cobblestone is located at (0, 0)-(15, 15) in 16x16 textures like the vanilla one, and smooth stone is at (16, 16)-(31, 31). If you switch to a 32x32 resource pack, those coordinates of course change like (0, 0)-(31, 31) for cobblestone and (32, 32)-(63, 63) for smooth stone. This is why those shaders typically don't play nice with 32x32 or 64x64 textures. They detect blocks incorrectly and start waving wooden slabs!

UniverseSteve commented 5 years ago

Hey PHO can you add a player shadow and maybe could you make it were when it rains it get foggy

depressed-pho commented 5 years ago

Hey PHO can you add a player shadow and maybe could you make it were when it rains it get foggy

This is an issue tracker. Not a forum. Please make new issue pages for your suggestions.

gio1135 commented 5 years ago

@UniverseSteve I'm staying right here.

depressed-pho commented 5 years ago

@gio1135 As I said, this is not a forum. Please post comments only relevant to specific bugs or feature requests.

depressed-pho commented 5 years ago

@gio1135 @UniverseSteve Removed your comments. This is not a forum. No name-calling, fighting or whatever is allowed under NO CIRCUMSTANCES. I will have to ban you both if you continue this. This is the first and the last warning.