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.
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
shaderlab pbr support refraction #2470
shaderlab pbr support refraction #2470
Changes from 30 commits
dd09252
1fc002e
adfdfec
62844aa
ffa2912
1fc63b2
bab9582
174e0e7
47fb197
f9b748c
4ef6387
76b40b1
3abe5c1
b81bbeb
bcc9daf
b9b9558
9d8a37e
84e2f0d
e977cbc
4040c26
420566d
4a3ce3e
6b19600
129ac02
1ff952d
1f011eb
76d9063
d2c26cf
9d9e4ae
02ae05e
a493e26
59e0da3
e062e18
aa434e4
82d9754
4c5eb18
b6c874a
0bf8d73
1f20667
d4b5d11
df27aef
1ba3440
09397f0
e7718de
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 531 in packages/core/src/material/PBRMaterial.ts
Codecov / codecov/patch
packages/core/src/material/PBRMaterial.ts#L531
Check warning on line 537 in packages/core/src/material/PBRMaterial.ts
Codecov / codecov/patch
packages/core/src/material/PBRMaterial.ts#L537
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Handle missing
RefractionMode.None
case.Currently, if
refractionMode
is set toNone
, the code will not disable the macro or reset it. This could leave a stale macro configuration from previous mode selections, potentially causing unexpected rendering behavior. Consider adding an explicitcase RefractionMode.None:
to the switch statement to disable or clear the macro.📝 Committable suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function named
evaluateTransmission
is betterThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// RefractionMode.Plane
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@todo: No need to process if the coord exceeds the screen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@todo: camera distance