-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add engine support for RGBA remap hue/saturation colour shifts. #19367
Conversation
110dcac
to
a83fe03
Compare
OpenRA.Game/Primitives/Color.cs
Outdated
@@ -155,46 +193,6 @@ public float GetBrightness() | |||
return (max + min) / 510f; | |||
} | |||
|
|||
public float GetSaturation() |
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.
Public API break for mods?
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.
Not tested, but looks sensible enough to me.
0758381
to
6abde6e
Compare
needs a rebase. |
This was previously decreased to support legacy GPUs that only supported 8 texture image units and we need to reserve one of these for the palette texture. OpenGL 3.X mandates a minimum of 16 (and most most GL2 cards also supported it) so we can now safely increase this limit.
This avoids reallocating buffers each time the player changes zoom level.
6abde6e
to
dd91448
Compare
Rebased and removed the testcase. That is pushed as 18532af if anyone else still wanted to try it. |
This PR implements the engine backend for chroma-keyed player colours on 32bit sprites.
Depends on #19335 (only the last 4 commits are new).
#3692 basically forces us to treat these as add-ons to existing indexed palettes. This fits well with our first major usecase (remastered asset support), but isn't great for mods that might want to exclusively use 32 bit sprites. The actual engine plumbing won't change much, but this does impact the way we set up the traits.
For this reason i'm limiting this PR to the engine plumbing, and leaving the actual traits to downstream mods until #3692 has been finished. This strikes a balance where advanced modders can start to use the feature and provide feedback/bugs but not lock us into supporting a set of traits that we know will need to be replaced.
The testcase commit adds @mabulsoud's chronosphere to the asset browser. Open the asset browser, search for pdox.png, and notice that it responds to the color picker.