-
Notifications
You must be signed in to change notification settings - Fork 428
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
Fix MToon 1.0 functions. #1101
Fix MToon 1.0 functions. #1101
Conversation
|
||
using (new LabelScope("Editor Settings")) | ||
{ | ||
PopupEnum<MToon10EditorEditMode>("Edit Mode", props[MToon10Prop.EditorEditMode], materialEditor); |
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.
Add Inspector mode
@@ -1,4 +1,4 @@ | |||
Shader "Hidden/VRM10/vrmc_materials_mtoon" | |||
Shader "VRM10/MToon10" |
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.
Rename
@@ -24,15 +24,16 @@ Varyings MToonVertex(const Attributes v) // v is UnityCG macro specified name. | |||
const VertexPositionInfo position = MToon_GetOutlineVertex(v.vertex.xyz, normalize(v.normalOS), output.uv); | |||
output.pos = position.positionCS; | |||
output.positionWS = position.positionWS; | |||
output.normalWS = UnityObjectToWorldNormal(-v.normalOS); |
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.
fix outline normal
// new shadingShift is the center of range. | ||
return Mathf.Clamp((rangeMax - rangeMin) * 0.5f, -1, +1); | ||
// new shadingShift is the center of range inverted. | ||
return Mathf.Clamp((rangeMax + rangeMin) * 0.5f * -1f, -1, +1); |
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.
fix migration
public sealed class MigrationTests | ||
{ | ||
[Test] | ||
public void MigrateToonyAndShift() |
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.
Add migration tests
VRM10/MToon10