The importance of gamma correction

TL;DR you NEED gamma correction.

I’ve seen here and there screenshots of jME scenes which are obviously not using gamma correction.
I want to insist on the fact that without gamma correction Lighting in general (PBR or Phong) is wrong!
And it’s even more obvious with the new PBR material.
You may have tweaked your lights and materials colors so it looks ok, but it still wrong.
I understand that you’d want visual consistency for an old project and that you wouldn’t want gamma correction.
But for new project please, check the gamma correction box in the starting dialog box.

In 3.3 I will remove this checkbox and enable gamma correction as a default. You’ll only be able to deactivate it programatically.

For reference, interesting reading:
our doc :
discussions :

why it’s important :


So, the engine in 3.3 will be setup by default for photo-realistic scenes and those of us with hand painted textures must do extra work?



But if by “painted” you mean unshaded, you won’t see a difference and you don’t need extra work.
If you use lighting, you need gamma correction. Period. It’s not only for photorealistic things…

And if ever you find a good reason to not listen to me Mr Speed the extra work is just adding “settings.setGammaCorrection(false)” when you start your app.

1 Like

I turned gamma on for Mythruna once and it looked like ass. That’s all I know.

Yes, it’s easy enough to set. We should add a forum sticky when we release 3.3: “If your game suddenly looks like ass when you upgrade, turn gamma off and talk to nehon about why your art is messed up.”

Edit: who am I kidding? No one who needs it will ever read the sticky…

1 Like

Yeah that’s what I meant with

I was especially thinking of you.

1 Like

My artist can work with jME only with enabled gamma correction, in another case he has incorrect visual result comparing with his tools.

1 Like

Well… I have some mixed feelings about this. On one hand, this needs to be done the sooner the better, so that new users don’t even attempt to setup a wrongly-lighted scene.

On the other hand… I’ve seen older GPUs and drivers do funny things with gamma enabled, including crashing the game, rendering garbage, or applying a red tint.
This is GPU vendor’s fault but unfortunately jME will get all the blame.

1 Like

Now that I think about it… this might be mitigated by raising the minimum OpenGL requirements, so that you won’t be able to run jme on bad hardware…
But I have even more mixed feelings about this.

1 Like

As long as gamma correction is a configurable setting in the released games, shouldn’t this be ok?

1 Like

As a reminder, some textures should NOT be gamma corrected. (Normal maps for example.)

Yes of course it’s why we have a colorSpace attribute in the textures and that you can set -LINEAR on a map in a j3md to specify that you expect a map in linear space.

I mean… this is already working.

You probably missed this bit

Yes but this will still be available in the AppSettings class.
So it’s up to you to make an UI to disable it in your game if you want.
Or to force disable it in code with this

I’ll just remove the check box…

If this is as much a problem for everyone… I can just check it by default…

To be honest, I believe nobody really has cared about Gamme Correction before. So I doubt, People will complain about it if it is enabled by default.

But personally, I get better results with Gamma Correction enabled.

Well… if they are used to the look of their game without gamma correction they will notice it for sure…

Well, yeah, that might be true…

People still can disable it if needed, so I don’t see any problem :slight_smile:

I’ll be honest, I’ve never checked that box and have no idea what it entails. If you say it should be enabled, it’s good enough for me. I have always had to play around just like you describe. Thanks for the education :slight_smile:

1 Like

Same here, I think you speak for most of the users. So if I get better looking games just by checking a box, I really dont see a reason why not.


Why is this set up as a simple checkbox though? Gamma isn’t something you can just enable and leave it at that.

People have different monitors, different room lighting, etc. Who’s to say what gamma should be? 1.8? 2.0? 2.2? 2.4?

I put a slider in the options and let people set it for themselves via the GammaCorrectionFilter.

Simply put, it’s about having non-linear contrast scaling because our monitor tech is shite and won’t display it right by itself.