mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-09 12:29:23 -05:00
fix outline variants
This commit is contained in:
@@ -71,7 +71,7 @@ inline bool MToon_IsParameterMapOn()
|
||||
// Compile-time constant
|
||||
inline bool MToon_IsOutlineModeWorldCoordinates()
|
||||
{
|
||||
#if defined(MTOON_OUTLINE_WIDTH_WORLD)
|
||||
#if defined(_MTOON_OUTLINE_WORLD)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
@@ -81,7 +81,7 @@ inline bool MToon_IsOutlineModeWorldCoordinates()
|
||||
// Compile-time constant
|
||||
inline bool MToon_IsOutlineModeScreenCoordinates()
|
||||
{
|
||||
#if defined(MTOON_OUTLINE_WIDTH_SCREEN)
|
||||
#if defined(_MTOON_OUTLINE_SCREEN)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
|
||||
@@ -40,7 +40,7 @@ inline VertexPositionInfo MToon_GetOutlineVertex(const float3 positionOS, const
|
||||
else if (MToon_IsOutlineModeScreenCoordinates())
|
||||
{
|
||||
const float3 positionWS = mul(unity_ObjectToWorld, float4(positionOS, 1)).xyz;
|
||||
const half outlineWidth = _OutlineWidth * UNITY_SAMPLE_TEX2D_LOD(_OutlineWidthTex, uv, 0);
|
||||
const half outlineWidth = MToon_GetOutlineVertex_OutlineWidth(uv);
|
||||
|
||||
const float4 nearUpperRight = mul(unity_CameraInvProjection, float4(1, 1, UNITY_NEAR_CLIP_VALUE, _ProjectionParams.y));
|
||||
const half aspect = abs(nearUpperRight.y / nearUpperRight.x);
|
||||
|
||||
Reference in New Issue
Block a user