… 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?
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.
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.
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.
Unfortunately, there are still a number of articles and blog posts - such as the one linked in the OP - which tell people that it is VERY VERY important to set gammaFactor. The current official docs for WebGLRenderer don’t mention gammaFactor at all - and in fact, the TypeScript type bindings don’t even have that property any more, so attempting to set it is a compilation error (yay for TypeScript).
Unfortunately, this creates a disconnect for people who are trying to do the “right thing” and following older documentation that hasn’t been updated in years.
Suggestion: Add a note to the docs for WebGLRenderer mentioning that this was removed, and a link to more recent docs that tell them what they should do instead, if anything.
In general I think the migration guide is probably the place to look for this information. We’ve made a policy of removing warnings about old properties on the 10th release after the feature itself is removed, for maintainer sanity. We would of course like to see old references updated whenever possible.