Repository navigation
Implements color matrices, allows /atom.color to be set with one - #1062
Conversation
|
minor bug found: setting color to a matrix and then setting filters seems to delete the color matrix filter. |
I've pretty much come to the conclusion that "color" will have to be treated very specially by |
33e1360 to
ed8a80a
Compare
amylizzle
left a comment
There was a problem hiding this comment.
lgtm. Minor things.
Have you tested this with an invert color matrix? I'm just wondering if the shader's color vector does clamping or anything before output.
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This is going to end up used a lot for our implementation of DM color matrices.
While implementing more of /atom.color, I ended up creating a cyclical dependency where, creating an appearance required accessing the color var, and doing a get on the color var required the appearance. This caused a stack overflow as it attempted to create an appearance a zillion times. None of that is featured here though, just some changes to avoid the implicit instantiation of an appearance when just asking if it exists or not.
Previously, defaultAlpha would not kick in if the color was long enough. Fixed that! :^) (hopefully that doesn't break anything :c)
Still need to allow invokation of it via setting the filters var but, hey, look at that! :^)
Also corrects the default argument for the shader, so the client doesn't crash :^)
This is basically what it means to implement the new color filter for filter() and the filters metaobject list thingie. Also adds a rudimentary test for this in IntegrationTests. I think this works? :^)
This PR also includes a parity note: I am not sure how BYOND handles setting a color filter when an atom already has a color var set to a color string (a ColorMatrix crashes in BYOND, however). We can investigate later if it's important :^) EDIT: Removed hack once I figured out what the heck I was missing in my serialization class thing for ColorMatrix
ed8a80a to
97d0075
Compare
This is the... simplest thing I could think of for handling the fact that an atom can get a color matrix in two ways: one from a filter, and one from assigning to /atom.color. Also includes some patches done in response to reviews on the PR by people who aren't Wixoa. Thanks everybody. EDIT: Removes random debug print I left in there :^)
242268f to
5b97d2c
Compare
|
Setting a color on causes a lot of this error to spam: |
|
Is it actually valid to set color with a 3x3 matrix (as in, via |
You are correct, it should be a |
Eventually we're going to want a better solution to this, but this should be fine for now. Also edited the values for the color matrix demo so that it will actually display any discrepancies caused by colour-space-related hooplah.
Is it over? Am I free?
Summary
This was supposed to be me doing something very simple to dip my toes into the graphics side of this project, but lucky for me, this has been a total trap. After a few days of losing my mind, here's something that only works with novel RT code.
Changelog
/atom.colorto a color matrix now works.filter(type="color",..)now works.