Why is gammaFactor deprecated in WebGLRenderer (dev-branch)?

Hi!

We’ve been following this list:

In section “Accurate Colors” it’s proposed to set:

renderer.gammaFactor = 2.2;
renderer.gammaOutput = true;

… but in dev-branch gammaFactor is marked es deprecated inside WebGLRenderer.d.ts, and inside WebGLRenderer.js it’s set to 2.0 “for backwards compatibility”.

So we guess it doesn’t make any sense to set it to something else / use it all if we’re developing with the dev-branch, right?

And just out of curiosity: why is it deprecated and is there something else (planed) to “replace” it? :thinking:

Thanks! :slightly_smiling_face:

1 Like

I’m not sure why it would be marked deprecated in typings but not in the docs. There are plans to replace it, yes, but no alternatives yet. So certainly you can and should be using gammaFactor.

Details: The settings described in Accurate Colors are one of several steps required to approximate a linear rendering workflow in three.js. That workflow currently isn’t easy to manage, and we’d eventually like to clean this up.

4 Likes

Find me in ./templates/hugo/contents_pages/tips_meta.html

Oops, looks like someone forgot to write a description tag :sweat_smile:

1 Like

ok, thanks! :+1:

we’d eventually like to clean this up.

I’d really love if this was ‘soon’ rather than ‘eventually’. @donmccurdy, do you know what’s holding this back? I’ve read through all the relevant issues on GitHub (I think), and I’m none the wiser as to why we can’t just fix this and make it automatic. Seems like we understand the issue pretty well now and it should be relatively simple to implement.

I’m having to jump through quite a few hoops to explain things in the book, since color spaces and color management are really not beginner friendly topics.

3 Likes

It’s likely to be a pretty tricky change. Not necessarily a lot of code, but I don’t think anyone is confident of exactly what the new API should be. From your own comment on #11337, “It will make things much simpler if we can get this API perfect on the first go and not have to change things later.” That is the hard part. :sweat_smile: