Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vanilla Bug: Alpha Interpolate on Animated Textures #25

Closed
grondag opened this issue May 29, 2019 · 1 comment
Closed

Vanilla Bug: Alpha Interpolate on Animated Textures #25

grondag opened this issue May 29, 2019 · 1 comment
Assignees
Labels
bug Something isn't working vanilla happens in vanilla Minecraft and/or Core Fabric API

Comments

@grondag
Copy link
Collaborator

grondag commented May 29, 2019

Consider fixing, per conversation below:

@grondag does indigo/canvas by any chance fix animated sprite interpolation not interpolating alpha? 👀
i forget where exactly but the code is somewhere in Sprite
interpolated opacity is 👌
i perstered tterrag to implement it in CTM for 1.12
the asm for it is here if you wanna peek https://github.com/Chisel-Team/ConnectedTexturesMod/blob/6bab85ef64b098b9ab854757c3b388f182f60e80/src/main/java/team/chisel/ctm/client/asm/CTMTransformer.java#L192-L220
(dont scroll up if you want to avoid mcp names)
the bytecode is pretty impressive tbh
super clean
i doubt you could get it as high precision as that with a mixin lol
but maybe.. would need to look at the code again
problem is you cant manipulate bitshifts
you might be able to slice and capture mixin-generated locals mid-op :ThinkNoose:
im not sure if youd be able to get into a spot where the local would be visible though.. ive rarely gotten generated locals to capture
i think ive only achieved it once
and it was probably a bug
lol

GrondagToday at 6:58 PM
Canvas doesn't do anything about that. Was not even aware of the bug. If I were going to fix I'd probably just redirect interpolateFrames() altogether and make it a config option.
If I had to do it as a Mixin I'd probably capture the two calls to getFramePixel(), compute my result on the second one, and then hook the call to setPixelRGB and mask in my alpha there. Still a mess.

@grondag grondag added good first issue Good for newcomers help wanted Needs outside knowledge and/or a fresh pair of eyes vanilla happens in vanilla Minecraft and/or Core Fabric API labels Jun 30, 2019
@grondag grondag self-assigned this Jun 26, 2020
@grondag grondag added bug Something isn't working and removed good first issue Good for newcomers help wanted Needs outside knowledge and/or a fresh pair of eyes labels Jun 26, 2020
@grondag
Copy link
Collaborator Author

grondag commented Jul 6, 2020

Will likely pursue procedural texturing for animated translucency - animated textures aren't performant.

@grondag grondag closed this as completed Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vanilla happens in vanilla Minecraft and/or Core Fabric API
Projects
None yet
Development

No branches or pull requests

1 participant