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

Docs: Expand .aoMapIntensity description #28917

Merged
merged 2 commits into from
Jul 21, 2024

Conversation

donmccurdy
Copy link
Collaborator

Clarification of the typical range for .aoMapIntensity.

Related:

/cc @WestLangley

@Mugen87 Mugen87 added this to the r167 milestone Jul 19, 2024
@pailhead
Copy link
Contributor

pailhead commented Jul 20, 2024

I would have made a PR but i might be a bit out of touch with these later versions. This is a great starting point, but if the number represents something from 0-100% we should then probably clamp it. As of today, is this still a property on some Material subclass, not nodes?

@WestLangley
Copy link
Collaborator

we should then probably clamp it

three.js does not validate user data. That is your app's responsibility.

@pailhead
Copy link
Contributor

three.js does not validate user data

I may be misinterpreting this pattern:

https://threejs.org/docs/#api/en/materials/MeshPhysicalMaterial.sheenRoughness

uniforms.sheenRoughness.value = material.sheenRoughness;

material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );

  • Like this improvement, the docs do mention that the value is expected to be in the range from 0 to 1.
  • However, 0 doesn't actually seem to be ever seen by the shader. The smallest value seems to be 0.07.
  • Passing 123.4567 will result in the value of 1 in the shader.

I don't think that this is validation per se. Whatever the pattern may be, it could be applicable here.

@Mugen87 Mugen87 merged commit f298a16 into mrdoob:dev Jul 21, 2024
3 checks passed
@donmccurdy donmccurdy deleted the docs/aomapintensity branch July 22, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants