Embedding JME canvas in Swing frame alters gamma

I’m attempting to place my application’s canvas into a Swing window, so I can add some extra controls outside of the viewport. I have success doing this, but the scene becomes visibly darker.

Regular AWT window:

Canvas in swing:

Most all objects in the scene are unshaded, so I assume gamma is at play here? If so, how can I adjust the gamma? The only app settings for gamma is auto correction, and GammaCorrectionFilter is deprecated, noting only to “use the Gamma Correction setting instead.”

Here is the relevant class.

What version of JME?

Seems to only happen in 3.4.0, works fine in 3.2.2.


Try setting it to true.

Still happens.

Found a solution… or rather workaround. Forcibly disabling gamma correction setGammaCorrection(false) fixes the issue. It looks like JME 3.4.0 turns it on by default, and I have had it off.

Usually on makes things brighter, though. So weird that it’s the opposite for you.