mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-14 06:19:47 -05:00
警告を潰す
This commit is contained in:
parent
613b2c7a62
commit
d7e9d92d05
|
|
@ -29,7 +29,7 @@ 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.positionWS = position.positionWS.xyz;
|
||||
|
||||
#ifdef MTOON_URP
|
||||
output.normalWS = TransformObjectToWorldNormal(-v.normalOS);
|
||||
|
|
@ -41,7 +41,7 @@ Varyings MToonVertex(const Attributes v) // v is UnityCG macro specified name.
|
|||
{
|
||||
const VertexPositionInfo position = MToon_GetVertex(v.vertex.xyz);
|
||||
output.pos = position.positionCS;
|
||||
output.positionWS = position.positionWS;
|
||||
output.positionWS = position.positionWS.xyz;
|
||||
|
||||
#ifdef MTOON_URP
|
||||
output.normalWS = TransformObjectToWorldNormal(v.normalOS);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ inline half MToon_GetOutlineVertex_OutlineWidth(const float2 uv)
|
|||
{
|
||||
if (MToon_IsParameterMapOn())
|
||||
{
|
||||
return _OutlineWidth * UNITY_SAMPLE_TEX2D_LOD(_OutlineWidthTex, uv, 0);
|
||||
return _OutlineWidth * UNITY_SAMPLE_TEX2D_LOD(_OutlineWidthTex, uv, 0).x;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -68,7 +68,7 @@ inline VertexPositionInfo MToon_GetOutlineVertex(const float3 positionOS, const
|
|||
output.positionWS = float4(positionWS + normalWS * outlineWidth, 1);
|
||||
|
||||
#ifdef MTOON_URP
|
||||
output.positionCS = TransformWorldToHClip(output.positionWS);
|
||||
output.positionCS = TransformWorldToHClip(output.positionWS.xyz);
|
||||
#else
|
||||
output.positionCS = UnityWorldToClipPos(output.positionWS);
|
||||
#endif
|
||||
|
|
@ -117,7 +117,7 @@ inline VertexPositionInfo MToon_GetOutlineVertex(const float3 positionOS, const
|
|||
output.positionWS = mul(unity_ObjectToWorld, float4(positionOS * 0.001, 1));
|
||||
|
||||
#ifdef MTOON_URP
|
||||
output.positionCS = TransformWorldToHClip(output.positionWS);
|
||||
output.positionCS = TransformWorldToHClip(output.positionWS.xyz);
|
||||
#else
|
||||
output.positionCS = UnityWorldToClipPos(output.positionWS);
|
||||
#endif
|
||||
|
|
@ -132,7 +132,7 @@ inline VertexPositionInfo MToon_GetVertex(const float3 positionOS)
|
|||
output.positionWS = mul(unity_ObjectToWorld, float4(positionOS, 1));
|
||||
|
||||
#ifdef MTOON_URP
|
||||
output.positionCS = TransformWorldToHClip(output.positionWS);
|
||||
output.positionCS = TransformWorldToHClip(output.positionWS.xyz);
|
||||
#else
|
||||
output.positionCS = UnityWorldToClipPos(output.positionWS);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ inline half GetMToonLighting_Shade(const UnityLighting lighting, const MToonInpu
|
|||
if (MToon_IsForwardBasePass())
|
||||
{
|
||||
const half shadeInput = lerp(-1, 1, mtoon_linearstep(-1, 1, dotNL));
|
||||
return mtoon_linearstep(-1.0 + shadeToony, +1.0 - shadeToony, shadeInput + shadeShift) * lighting.directLightAttenuation;
|
||||
return mtoon_linearstep(-1.0 + shadeToony, +1.0 - shadeToony, shadeInput + shadeShift) * lighting.directLightAttenuation.x;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -69,7 +69,7 @@ inline half GetMToonLighting_Shadow(const UnityLighting lighting, const half dot
|
|||
{
|
||||
if (MToon_IsPbrCorrectOn())
|
||||
{
|
||||
return lighting.directLightAttenuation * step(0, dotNL);
|
||||
return lighting.directLightAttenuation.x * step(0, dotNL);
|
||||
}
|
||||
|
||||
if (MToon_IsForwardBasePass())
|
||||
|
|
@ -81,7 +81,7 @@ inline half GetMToonLighting_Shadow(const UnityLighting lighting, const half dot
|
|||
// heuristic term for weak lights.
|
||||
// 0.5: heuristic.
|
||||
// min(0, dotNL) + 1: darken if (dotNL < 0) by using half lambert.
|
||||
return lighting.directLightAttenuation * 0.5 * (min(0, dotNL) + 1);
|
||||
return lighting.directLightAttenuation.x * 0.5 * (min(0, dotNL) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ UnityLighting GetUnityLighting(const Varyings input, const half3 normalWS)
|
|||
float4 shadowCoord = float4(0, 0, 0, 0);
|
||||
#endif
|
||||
|
||||
float shadowMask = SAMPLE_SHADOWMASK(input.lightmapUV);
|
||||
half4 shadowMask = SAMPLE_SHADOWMASK(input.lightmapUV);
|
||||
Light mainLight = GetMainLight(shadowCoord, input.positionWS, shadowMask);
|
||||
|
||||
const half3 lightDir = mainLight.direction;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user