ID:2891666
 
Resolved
Using the RESET_ALPHA flag but not RESET_COLOR when inheriting a color matrix caused junk data to be used instead.
BYOND Version:515.1616
Operating System:Windows 11 Home
Web Browser:Firefox 118.0
Applies to:Dream Seeker
Status: Resolved (515.1617)

This issue has been resolved.
Descriptive Problem Summary:

Applying an overlay to a plane master object on the darkness plane in a basic lighting setup now causes some rendering issues, the overlay just keeps flickering and changing colors for no apparent reason. A similar result happens if we use vis_contents instead of overlays.

Numbered Steps to Reproduce Problem:

Demo: https://www.mediafire.com/file/xt9mmhqi7t93qel/ PlaneOverlay_src.zip/file

Code Snippet (if applicable) to Reproduce Problem:
obj
planes
darkness
plane = DARKNESS_PLANE ; blend_mode = BLEND_MULTIPLY
appearance_flags = PLANE_MASTER | NO_CLIENT_COLOR
color = list(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,0, 0.15,0.15,0.20,1)
mouse_opacity = 0 ; screen_loc = "CENTER"
New()
..()
vis_contents += new/obj/backdrop
obj
backdrop
mouse_opacity = 0
layer = BACKGROUND_LAYER ; blend_mode = BLEND_OVERLAY
plane = DARKNESS_PLANE ; vis_flags = VIS_INHERIT_PLANE|VIS_INHERIT_ID
New()
..()
var/obj/o = new()
o.icon = 'Light Rays.dmi' ; o.plane = DARKNESS_PLANE
o.appearance_flags = RESET_ALPHA | RESET_TRANSFORM | RESET_COLOR | TILE_BOUND
overlays += o


Expected Results:

https://i.imgur.com/1qAZ9dO.png

Actual Results:

https://imgur.com/2h8AbwT

Does the problem occur:
Every time? Or how often? Every time.
On other computers? I'm unable to verify on another PC but I don't see why it'd make a difference.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Yes, the last version that didn't have this issue was the 515.1614 version

Workarounds:
Avoid adding an overlay to a plane master object
Lummox JR changed status to 'Verified'
I can confirm this looks wrong in 1616, and correct in 1614.

What's even stranger is that the wrong results appear in two different ways depending on the compiler I'm in. With the old compiler, I see the image in green when viewing the overlay; with the new compiler, I see the weird flashing you described.

I believe the issue is probably due to some changed behavior in 1615 (which I'll need to isolate), and it's causing some bogus data to be sent to the renderer. For some reason the newer runtimes are more sensitive to the problem and make it look a lot worse.
Lummox JR resolved issue with message:
Using the RESET_ALPHA flag but not RESET_COLOR when inheriting a color matrix caused junk data to be used instead.