change (MToon): add implementation note about the possibility of NaN.#418
Merged
ousttrue merged 2 commits intovrm-c:masterfrom Dec 1, 2022
Merged
change (MToon): add implementation note about the possibility of NaN.#418ousttrue merged 2 commits intovrm-c:masterfrom
ousttrue merged 2 commits intovrm-c:masterfrom
Conversation
Santarh
commented
Nov 29, 2022
|
|
||
| let matcapUv: Vector2 = Vector2( dot( x, N ), dot( y, N ) ) * 0.495 + 0.5 | ||
|
|
||
| let epsilon: Number = 0.00001; |
Contributor
Author
There was a problem hiding this comment.
0.00001 は既存の UniVRM の実装例に基づいており、なんらか論理的な根拠は無い。
|
|
||
| > The expression maybe results NaN if given `parametricRimFresnelPowerFactor` is zero. | ||
| > The implementation should avoid NaN depending on the environment. | ||
| > ex. `parametricRimFresnelPowerFactor = max(parametricRimFresnelPowerFactor, epsilon)` |
Contributor
Author
There was a problem hiding this comment.
英語が良い感じかどうかはちょっと曖昧です。
0b5vr
approved these changes
Nov 30, 2022
Contributor
0b5vr
left a comment
There was a problem hiding this comment.
厳密には parametricRimFresnelPowerFactor が0の場合の値を1と定義したほうが良いような気もしますが、そうするとepsilonで対処することができなくなっちゃいますし、一旦このまま曖昧な書き方で良いと思います。
突っ込まれたら対処する感じで行きましょう。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #414
Add implementation note about the possibility of NaN in MToon.
Also add to implementation example.