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

Fixed uniform sheenRoughness #23119

Merged
merged 2 commits into from
Dec 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/renderers/shaders/ShaderLib.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ ShaderLib.physical = {
sheen: { value: 0 },
sheenColor: { value: new Color( 0x000000 ) },
sheenColorMap: { value: null },
sheenRoughness: { value: 0 },
sheenRoughness: { value: 1 },
Copy link
Collaborator

Choose a reason for hiding this comment

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

The exact values do actually not matter. It's only the type which is important so that something like uniform.value.copy() works.

Anyway, for consistency it's probably better to apply the actual default values. You can also update specularIntensity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

correct. i'm extending the MeshPhysicalMaterial to achieve light rim...

sheenRoughnessMap: { value: null },
transmission: { value: 0 },
transmissionMap: { value: null },
Expand All @@ -309,7 +309,7 @@ ShaderLib.physical = {
thicknessMap: { value: null },
attenuationDistance: { value: 0 },
attenuationColor: { value: new Color( 0x000000 ) },
specularIntensity: { value: 0 },
specularIntensity: { value: 1 },
specularIntensityMap: { value: null },
specularColor: { value: new Color( 1, 1, 1 ) },
specularColorMap: { value: null },
Expand Down