Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only degamma specular if we use a metalness specular color map #4436

Merged
merged 5 commits into from
Jul 15, 2022

Conversation

GSterbrant
Copy link
Contributor

Description

Specular should only apply degamma when using specular maps in the metalness workflow.

@GSterbrant GSterbrant self-assigned this Jul 14, 2022
@GSterbrant GSterbrant changed the title Only degamma specular if we use a metalness specular color map. Only degamma specular if we use a metalness specular color map Jul 14, 2022
@GSterbrant GSterbrant force-pushed the gsterbrant_degamma_specular_fix branch from 33d1a72 to b40afce Compare July 14, 2022 16:30
@@ -339,7 +339,7 @@ const standard = {
func.append("getSpecularityFactor();");
}
if (options.useSpecularColor) {
code.append(this._addMap("specular", "specularPS", options, litShader.chunks));
code.append(this._addMap("specular", "specularPS", options, litShader.chunks, options.specularEncoding));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want this:

Suggested change
code.append(this._addMap("specular", "specularPS", options, litShader.chunks, options.specularEncoding));
code.append(this._addMap("specular", "specularPS", options, litShader.chunks, options.useMetalness ? 'srgb' : 'linear'));

@willeastcott willeastcott added bug area: graphics Graphics related issue labels Jul 15, 2022
@GSterbrant GSterbrant merged commit 7cfc3fb into main Jul 15, 2022
@GSterbrant GSterbrant deleted the gsterbrant_degamma_specular_fix branch July 15, 2022 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants