Added dots instancing support;
Fixed the problem that shader can compile when using emission color map;
This commit is contained in:
@@ -84,7 +84,7 @@ void Frag(PackedVaryingsToPS packedInput,
|
||||
discard;
|
||||
#endif
|
||||
|
||||
float4 objPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1));
|
||||
float4 objPos = mul(UNITY_MATRIX_M, float4(0, 0, 0, 1));
|
||||
float4 uv0 = input.texCoord0;
|
||||
float4 outlineColor = _OutlineColor;
|
||||
#if _OUTLINECOLORMAP
|
||||
@@ -128,4 +128,4 @@ void Frag(PackedVaryingsToPS packedInput,
|
||||
#ifdef UNITY_VIRTUAL_TEXTURING
|
||||
outVTFeedback = builtinData.vtPackedFeedback;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
float4 objPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1));
|
||||
float4 objPos = mul(UNITY_MATRIX_M, float4(0, 0, 0, 1));
|
||||
|
||||
float4 _Outline_Sampler_var = SAMPLE_TEXTURE2D_LOD(_OutlineWidthMap, sampler_OutlineWidthMap, TRANSFORM_TEX(inputMesh.uv0, _BaseColorMap), 0.0);
|
||||
//v.2.0.4.3 baked Normal Texture for Outline
|
||||
float3 normalDir = UnityObjectToWorldNormal(inputMesh.normalOS);
|
||||
float3 tangentDir = normalize(mul(unity_ObjectToWorld, float4(inputMesh.tangentOS.xyz, 0.0)).xyz);
|
||||
float3 tangentDir = normalize(mul(UNITY_MATRIX_M, float4(inputMesh.tangentOS.xyz, 0.0)).xyz);
|
||||
float3 bitangentDir = normalize(cross(normalDir, tangentDir) * inputMesh.tangentOS.w);
|
||||
float3x3 tangentTransform = float3x3(tangentDir, bitangentDir, normalDir);
|
||||
//end
|
||||
|
||||
Reference in New Issue
Block a user