-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Improve normal map VRAM Compression with RGTC #85842
Conversation
d9a15c3
to
0506da5
Compare
Have you considered proposing these changes upstream to https://github.com/wolfpld/etcpak/? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally (rebased on top of master
2f73a05), it works as expected. Normal maps in https://github.com/godotengine/tps-demo no longer exhibit artifacts when viewed from a distance or at oblique angles.
Before | After (this PR) |
---|---|
0506da5
to
5837e1f
Compare
I did, but first I would like to implement SSE4 variants of the code for faster compression when available. I may do it sometime in the near future. |
Sorry if i it is a dumb question, but will this be enabled by default on vram compresion? Anyways great job, i’vbeen waiting for this. |
This is enabled by default – I didn't have to change any settings to fix the appearance of normal maps in the TPS demo screenshot above. However, as with all changes that affect imported files, you'll need to reimport the normal maps or remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
As mentioned above, it would be really nice to have SSE4 versions of the code, and for this to be upstreamed. But I think we should merge what we have in the meantime as the quality improvement is really important
Perhaps the Godot-specific code from this and the modified |
Thanks! As far as I understand the added files are not technically thirdparty and are fully original? Not sure if this is ideal, but I guess it lets us keep everything nicely organized (and yeah, maybe it can be upstreamed at some point). And since they are completely original, we don't need to mention them in |
The files aren't completely original as they use the code from the library's DXT5 alpha compressor, so maybe that should be mentioned? |
In that case, I guess yes. After the "Files extracted from upstream source" list you could add something like: Two files ( |
Fixes #57981
This PR extends
etcpak
with an RGTC compression module, as well as changes the compression type used by normal maps to RGTC_RG, instead of DXT5. This fixes artifacts caused by the R channel being quantized.Also sets the compression type to RGTC_R for textures which only use the R channel.
Comparison: