-
Notifications
You must be signed in to change notification settings - Fork 107
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
Update MToon shader to r126 phong shader equivalent #703
Conversation
@@ -540,6 +549,8 @@ export class MToonMaterial extends THREE.ShaderMaterial { | |||
BLENDMODE_TRANSPARENT: | |||
this._blendMode === MToonMaterialRenderMode.Transparent || | |||
this._blendMode === MToonMaterialRenderMode.TransparentWithZWrite, | |||
MTOON_USE_UV: useUvInVert || useUvInFrag, // we can't use `USE_UV` , it will be redefined in WebGLProgram.js |
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.
MTOON_USE_UV
使ってる間は USE_UV
と混線してほしくないから #undef USE_UV
してしまってもいいかなとちょっと考えたけど、three.js含め #undef
使ってないから下手に #undef
使うほうが混乱するかな…。
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.
そうですね、たぶんこのシェーダ内で USE_UV
を使いたくなることはまずないと思うし USE_UV
が使われることはあってはならないはずなのですが、別にundefしてまで名前を変えずに運用することもないかなと判断しました。コメントありがとうございます。
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.
LGTM
will resolve #693
cutoff
with irregular alpha thresholds)