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

[BREAKING] Material specular now defaults to 1. #4419

Merged
merged 6 commits into from
Jul 11, 2022

Conversation

GSterbrant
Copy link
Contributor

@GSterbrant GSterbrant commented Jul 11, 2022

Description

Materials using metalness, will, due to #4386 use the specular color to tint specular and environment reflections. However, since specular is default 0, specular effects would disappear with metalness materials. If this is indeed the desired outcome, just set the specular color to 0 like so:

material.specular = new pc.Color(0, 0, 0);

This PR also fixes an issue with the specular fade seen here:

Previously:
image

After fix:
image

This will enable specular on objects that might've not had it before (objects not using the metalness workflow) but will avoid weird effects where specularity disappears on materials with metalness.
@GSterbrant GSterbrant changed the title Fix specular fade not working properly. [BREAKING] Material specular defaults now to 1. Jul 11, 2022
@GSterbrant GSterbrant changed the title [BREAKING] Material specular defaults now to 1. [BREAKING] Material specular now defaults to 1. Jul 11, 2022
@GSterbrant GSterbrant self-assigned this Jul 11, 2022
@GSterbrant GSterbrant merged commit c6347f0 into main Jul 11, 2022
@GSterbrant GSterbrant deleted the gsterbrant_specfade_fix branch July 11, 2022 12:22
@GSterbrant GSterbrant changed the title [BREAKING] Material specular now defaults to 1. Fix specular fade Jul 12, 2022
@GSterbrant GSterbrant changed the title Fix specular fade [BREAKING] Material specular now defaults to 1. Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants