-
Notifications
You must be signed in to change notification settings - Fork 168
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
[1.12.2] Photo frame and TV optimizations #608
Open
ghost
wants to merge
14
commits into
MrCrayfish:master
Choose a base branch
from
unknown repository
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Updated Forge to 1.12.2-14.23.5.2847 * Switched gif decoder to fmsware version, fixes decoding * Support for animations that are not 20 fps * Keep all animated texture frames loaded for current channel * Optimized texture data upload * Removed reflection from photo frames * Switched to linear resampling for TVs * Added mipmapping to photo frames * Added thread pooling for image downloading
Requires texconv.exe to be extracted in the data directory
Also as a side note, I'm wondering if there are any plans to support the photo frame and TV for later versions of Minecraft |
ghost
mentioned this pull request
Aug 10, 2020
I'm pretty sure the plan is to update to 1.15 and 1.16 with parity to 1.12 |
Is this a client-specific version? |
I actually never tested it on a server, but yes you only need it in the client. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR consists of numerous optimizations and bug fixes for photo frames and TVs. The goal is to allow for a huge number of photo frames and TVs to be used in a single world.
These changes are backwards compatible with the server, so if you'd like to make use of these optimizations you can update your client-side mod if the server uses 6.3.1:
furniture-6.3.1-1.12.2.jar.zip
Photo frame optimizations
All images are now stored as compressed DDS textures in the image cache, this allows a large number of photo frames to be used with high-resolution images while keeping VRAM usage low. These textures will be loaded with mipmaps if enabled in the minecraft settings. If Fancy Graphics are enabled then anisotropic filtering will also be applied to the photo relative to how many mipmap levels are enabled.
The compression is done through the included
texconv.exe
from the DirectXTex toolkit. For non-windows platforms it will fall back to no compression. It is possible to implement support for compression on other platforms through cross-platform compressors such as Compressonator.As a personal preference I've also removed the glass reflection texture from the photo frame and fixed the small black rectangle that was drawn in the bottom-right of the frame.
TV bug fixes and optimizations
This PR addresses some issues with animated textures, it now respects the time delay of each frame instead of trying to play all GIFs at 20 fps. The GIF decoder has also been replaced with a new version which fixes some decoding issues.
All animated texture frames are now kept in VRAM instead of uploading every frame as needed, this ensures smooth operation even with many TVs active. The upload format to VRAM has also been optimized to use the BGRA format, this reduces reshuffling of channels on both the GPU driver side and the application side.
As a personal preference I've changed the TV renderer to use linear filtering instead of nearest-neighbour when scaling the image on the screen.
General fixes