update sample
This commit is contained in:
1091
Assets/TextMesh Pro/Fonts/LiberationSans Bitmap.asset
Normal file
1091
Assets/TextMesh Pro/Fonts/LiberationSans Bitmap.asset
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5be27a98b8aaa4ce9a588f520fdc185d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
3348
Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset
Normal file → Executable file
3348
Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
@@ -11,9 +11,10 @@ Material:
|
||||
m_Shader: {fileID: 4800000, guid: 6f9dc39644934f62a0a58b6547a988e5, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_ValidKeywords:
|
||||
- NORMAL_BEVEL_ON
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 2
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
@@ -23,123 +24,38 @@ Material:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Cube:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _FaceTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 28684132378477856}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OutlineTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Ambient: 0.5
|
||||
- _Bevel: 0.645
|
||||
- _BevelAmount: 0
|
||||
- _Bevel: -1
|
||||
- _BevelClamp: 0
|
||||
- _BevelOffset: -0.051
|
||||
- _BevelOffset: -0.2
|
||||
- _BevelRoundness: 0
|
||||
- _BevelType: 0
|
||||
- _BevelWidth: 0
|
||||
- _BlendOp: 0
|
||||
- _BumpFace: 0.5
|
||||
- _BumpOutline: 0.5
|
||||
- _BumpScale: 1
|
||||
- _CameraFadingEnabled: 0
|
||||
- _CameraFarFadeDistance: 2
|
||||
- _CameraNearFadeDistance: 1
|
||||
- _BevelWidth: 0.115
|
||||
- _ColorMask: 15
|
||||
- _Cull: 2
|
||||
- _CullMode: 0
|
||||
- _Cutoff: 0.5
|
||||
- _Diffuse: 0.5
|
||||
- _DiffusePower: 1
|
||||
- _DistortionBlend: 0.5
|
||||
- _DistortionEnabled: 0
|
||||
- _DistortionStrength: 1
|
||||
- _DistortionStrengthScaled: 0
|
||||
- _DstBlend: 0
|
||||
- _EmissionEnabled: 0
|
||||
- _DecalLayerMaskFromDecal: 1
|
||||
- _DrawOrder: 0
|
||||
- _FaceDilate: 0
|
||||
- _FaceShininess: 0
|
||||
- _FaceUVSpeedX: 0
|
||||
- _FaceUVSpeedY: 0
|
||||
- _FlipbookMode: 0
|
||||
- _Glossiness: 0.5
|
||||
- _GlowInner: 0
|
||||
- _GlowOffset: 0.302
|
||||
- _GlowOuter: 0.05
|
||||
- _GlowPower: 1
|
||||
- _GradientScale: 10
|
||||
- _LightAngle: 3.1416
|
||||
- _LightingEnabled: 1
|
||||
- _MaskEdgeSoftness: 0.01
|
||||
- _MaskInverse: 0
|
||||
- _MaskSoftnessX: 0
|
||||
- _MaskSoftnessY: 0
|
||||
- _MaskWipeControl: 0.5
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OutlineMode: 0
|
||||
- _OutlineShininess: 0
|
||||
- _NormalBlend: 1
|
||||
- _OutlineSoftness: 0
|
||||
- _OutlineUVSpeedX: 0
|
||||
- _OutlineUVSpeedY: 0
|
||||
- _OutlineWidth: 0.082
|
||||
- _Padding: 0
|
||||
- _OutlineWidth: 0
|
||||
- _PerspectiveFilter: 0.875
|
||||
- _QueueControl: -1
|
||||
- _QueueOffset: 0
|
||||
- _Reflectivity: 9.84
|
||||
- _ScaleRatioA: 0.9
|
||||
- _ScaleRatioB: 0.73125
|
||||
- _ScaleRatioB: 1
|
||||
- _ScaleRatioC: 0.73125
|
||||
- _ScaleX: 1
|
||||
- _ScaleY: 1
|
||||
- _ShaderFlags: 1
|
||||
- _ShaderFlags: 0
|
||||
- _Sharpness: 0
|
||||
- _Smoothness: 0
|
||||
- _SoftParticlesEnabled: 0
|
||||
- _SoftParticlesFarFadeDistance: 1
|
||||
- _SoftParticlesNearFadeDistance: 0
|
||||
- _SpecularPower: 2
|
||||
- _SrcBlend: 1
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
@@ -151,42 +67,16 @@ Material:
|
||||
- _UnderlayOffsetX: 0
|
||||
- _UnderlayOffsetY: 0
|
||||
- _UnderlaySoftness: 0
|
||||
- _UseUIAlphaClip: 0
|
||||
- _VertexOffsetX: 0
|
||||
- _VertexOffsetY: 0
|
||||
- _WeightBold: 0.75
|
||||
- _WeightNormal: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
|
||||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Emission: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _FaceUVSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
|
||||
- _IsoPerimeter: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
|
||||
- _MaskEdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _OutlineColor1: {r: 0, g: 1, b: 1, a: 1}
|
||||
- _OutlineColor2: {r: 0.009433985, g: 0.02534519, b: 1, a: 1}
|
||||
- _OutlineColor3: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _OutlineOffset1: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _OutlineOffset2: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _OutlineOffset3: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _OutlineUVSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Softness: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _Specular: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
|
||||
- _UnderlayOffset: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &11400000
|
||||
@@ -208,7 +98,7 @@ MonoBehaviour:
|
||||
m_StyleName: Regular
|
||||
m_PointSize: 86
|
||||
m_Scale: 1
|
||||
m_UnitsPerEM: 2816
|
||||
m_UnitsPerEM: 2048
|
||||
m_LineHeight: 98.8916
|
||||
m_AscentLine: 77.853516
|
||||
m_CapLine: 59
|
||||
|
||||
11
Assets/TextMesh Pro/Resources/TMP Settings.asset
Normal file → Executable file
11
Assets/TextMesh Pro/Resources/TMP Settings.asset
Normal file → Executable file
@@ -15,7 +15,7 @@ MonoBehaviour:
|
||||
assetVersion: 2
|
||||
m_TextWrappingMode: 1
|
||||
m_enableKerning: 1
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_ActiveFontFeatures: 00000000
|
||||
m_enableExtraPadding: 0
|
||||
m_enableTintAllSprites: 0
|
||||
m_enableParseEscapeCharacters: 1
|
||||
@@ -36,14 +36,17 @@ MonoBehaviour:
|
||||
m_fallbackFontAssets: []
|
||||
m_matchMaterialPreset: 1
|
||||
m_HideSubTextObjects: 0
|
||||
m_defaultSpriteAsset: {fileID: 11400000, guid: c41005c129ba4d66911b75229fd70b45, type: 2}
|
||||
m_defaultSpriteAsset: {fileID: 11400000, guid: c41005c129ba4d66911b75229fd70b45,
|
||||
type: 2}
|
||||
m_defaultSpriteAssetPath: Sprite Assets/
|
||||
m_enableEmojiSupport: 1
|
||||
m_MissingCharacterSpriteUnicode: 0
|
||||
m_EmojiFallbackTextAssets: []
|
||||
m_defaultColorGradientPresetsPath: Color Gradient Presets/
|
||||
m_defaultStyleSheet: {fileID: 11400000, guid: f952c082cb03451daed3ee968ac6c63e, type: 2}
|
||||
m_defaultStyleSheet: {fileID: 11400000, guid: f952c082cb03451daed3ee968ac6c63e,
|
||||
type: 2}
|
||||
m_StyleSheetsResourcePath:
|
||||
m_leadingCharacters: {fileID: 4900000, guid: d82c1b31c7e74239bff1220585707d2b, type: 3}
|
||||
m_followingCharacters: {fileID: 4900000, guid: fade42e8bc714b018fac513c043d323b, type: 3}
|
||||
m_followingCharacters: {fileID: 4900000, guid: fade42e8bc714b018fac513c043d323b,
|
||||
type: 3}
|
||||
m_UseModernHangulLineBreakingRules: 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,10 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 124088ec2e2db40bdb2b15e13376d6db
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}
|
||||
@@ -1,88 +0,0 @@
|
||||
float invLerp(const float from, const float to, const float value)
|
||||
{
|
||||
return (value - from) / (to - from);
|
||||
}
|
||||
|
||||
float remap(const float origFrom, const float origTo, const float targetFrom, const float targetTo, const float value)
|
||||
{
|
||||
const float rel = invLerp(origFrom, origTo, value);
|
||||
return lerp(targetFrom, targetTo, rel);
|
||||
}
|
||||
|
||||
float3 rotate(float3 p, float4 quaternion)
|
||||
{
|
||||
const float x = -quaternion.x;
|
||||
const float y = -quaternion.y;
|
||||
const float z = -quaternion.z;
|
||||
const float w = quaternion.w;
|
||||
|
||||
const float3x3 rotation_matrix = float3x3(
|
||||
1 - 2 * (y * y + z * z), 2 * (x * y - w * z), 2 * (x * z + w * y),
|
||||
2 * (x * y + w * z), 1 - 2 * (x * x + z * z), 2 * (y * z - w * x),
|
||||
2 * (x * z - w * y), 2 * (y * z + w * x), 1 - 2 * (x * x + y * y)
|
||||
);
|
||||
|
||||
return mul(rotation_matrix, p);
|
||||
}
|
||||
|
||||
void ComputeSDFDecal_float(float SSR, float SD, float SDR, float2 softness, float2 dilate, float weight,
|
||||
float4 faceColor, out float4 rgba)
|
||||
{
|
||||
float scale = 1 / SSR * SDR;
|
||||
scale /= 1 + (softness.x * scale);
|
||||
const float w = .5 - (weight + dilate.x) * .5;
|
||||
rgba = faceColor * saturate((SD - w) * scale + 0.5);
|
||||
|
||||
float4 outlineColor = float4(0,1,1,1);
|
||||
float outlineWidth = dilate.y;
|
||||
|
||||
// outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, outlineWidth * scale * 2)));
|
||||
// rgba = lerp(outlineColor, faceColor, saturate((SD - w - outlineWidth) * scale + 0.5));
|
||||
// rgba *= saturate((SD - w + outlineWidth) * scale + 0.5);
|
||||
}
|
||||
|
||||
void CalculateDecal_float(float3 position, float4 meshData, float4 uvData, float4 quaternion,
|
||||
out float3 decalUV, out float3 decalClip)
|
||||
{
|
||||
float3 local_pos = position - meshData.xyz;
|
||||
local_pos = rotate(local_pos, quaternion);
|
||||
const float width = meshData.w;
|
||||
const float height = meshData.w * uvData.w;
|
||||
local_pos.x += width / 2;
|
||||
local_pos.y += height / 2;
|
||||
|
||||
decalClip = float3(
|
||||
step(0, local_pos.x) * (1 - step(width, local_pos.x)),
|
||||
step(0, local_pos.y) * (1 - step(height, local_pos.y)),
|
||||
1);
|
||||
|
||||
// remap from (0..vertex_size) to (uv.start..uv.end)
|
||||
const float2 uvSize = float2(uvData.z, uvData.z * uvData.w);
|
||||
decalUV = float3(
|
||||
remap(0, width, uvData.x, uvData.x + uvSize.x, local_pos.x),
|
||||
remap(0, height, uvData.y, uvData.y + uvSize.y, local_pos.y),
|
||||
local_pos.z);
|
||||
}
|
||||
|
||||
void ComputeSDFDecal_float(float4 faceColor, float SD, float scale, float3 decal_clip, out float4 rgba)
|
||||
{
|
||||
rgba = faceColor * saturate((SD - 0.5) * scale + 0.5);
|
||||
rgba *= decal_clip.x * decal_clip.y * decal_clip.z;
|
||||
}
|
||||
|
||||
void DecalClip_float(inout float4 color, float3 decal_clip)
|
||||
{
|
||||
color *= decal_clip.x * decal_clip.y * decal_clip.z;
|
||||
}
|
||||
|
||||
void DecalClip_float(in float4 color, float3 decal_clip, out float4 result)
|
||||
{
|
||||
DecalClip_float(color, decal_clip);
|
||||
result = color;
|
||||
}
|
||||
|
||||
void CalculateSSR_float(float2 uv, float textureHeight, bool filter, out float SSR)
|
||||
{
|
||||
SSR = abs(ddx(uv.x)) + abs(ddy(uv.y));
|
||||
SSR *= textureHeight * 0.75;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 68d96be3e15e6433299a3143888f6ef8
|
||||
timeCreated: 1731912999
|
||||
@@ -1,111 +0,0 @@
|
||||
// Simplified SDF shader:
|
||||
// - No Shading Option (bevel / bump / env map)
|
||||
// - No Glow Option
|
||||
// - Softness is applied on both side of the outline
|
||||
|
||||
Shader "TextMeshPro Decal/Distance Field Decal Unlit"
|
||||
{
|
||||
|
||||
Properties
|
||||
{
|
||||
_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||
|
||||
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
|
||||
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
|
||||
|
||||
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
|
||||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
||||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
||||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
||||
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
|
||||
|
||||
_WeightNormal ("Weight Normal", float) = 0
|
||||
_WeightBold ("Weight Bold", float) = .5
|
||||
|
||||
_ShaderFlags ("Flags", float) = 0
|
||||
_ScaleRatioA ("Scale RatioA", float) = 1
|
||||
_ScaleRatioB ("Scale RatioB", float) = 1
|
||||
_ScaleRatioC ("Scale RatioC", float) = 1
|
||||
|
||||
_MainTex ("Font Atlas", 2D) = "white" {}
|
||||
_TextureWidth ("Texture Width", float) = 512
|
||||
_TextureHeight ("Texture Height", float) = 512
|
||||
_GradientScale ("Gradient Scale", float) = 5
|
||||
_ScaleX ("Scale X", float) = 1
|
||||
_ScaleY ("Scale Y", float) = 1
|
||||
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
|
||||
_Sharpness ("Sharpness", Range(-1,1)) = 0
|
||||
|
||||
_VertexOffsetX ("Vertex OffsetX", float) = 0
|
||||
_VertexOffsetY ("Vertex OffsetY", float) = 0
|
||||
|
||||
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
|
||||
_MaskSoftnessX ("Mask SoftnessX", float) = 0
|
||||
_MaskSoftnessY ("Mask SoftnessY", float) = 0
|
||||
_MaskTex ("Mask Texture", 2D) = "white" {}
|
||||
_MaskInverse ("Inverse", float) = 0
|
||||
_MaskEdgeColor ("Edge Color", Color) = (1,1,1,1)
|
||||
_MaskEdgeSoftness ("Edge Softness", Range(0, 1)) = 0.01
|
||||
_MaskWipeControl ("Wipe Position", Range(0, 1)) = 0.5
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_CullMode ("Cull Mode", Float) = 0
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent-1"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull [_CullMode]
|
||||
ZWrite Off
|
||||
Lighting Off
|
||||
Fog { Mode Off }
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend One OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
HLSLPROGRAM
|
||||
#pragma vertex VertShader
|
||||
#pragma fragment PixShader
|
||||
#pragma shader_feature __ OUTLINE_ON
|
||||
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
|
||||
|
||||
#pragma multi_compile __ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile __ UNITY_UI_ALPHACLIP
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
#include "TMPro_Properties.cginc"
|
||||
CBUFFER_END
|
||||
#include "DecalFunctions.hlsl"
|
||||
#include "TMPro_Decal_Mobile.hlsl"
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
|
||||
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 970b94dd738345c3ab1ac4418c017ad4
|
||||
timeCreated: 1731679485
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,10 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7cf73fe9370fc4d4abb1f9d9e9610949
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
||||
@@ -1753,7 +1753,6 @@
|
||||
"m_OutputNode": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_SubDatas": [],
|
||||
"m_ActiveTargets": [
|
||||
{
|
||||
"m_Id": "94300469581b4924ac7dda496811d45d"
|
||||
@@ -1803,8 +1802,8 @@
|
||||
"m_ObjectId": "013228b0fdf1424097798f0973a9a4fb",
|
||||
"m_Title": "Face Texture",
|
||||
"m_Position": {
|
||||
"x": -4803.0,
|
||||
"y": -2948.5
|
||||
"x": -4813.0,
|
||||
"y": -2949.0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2528,7 +2527,7 @@
|
||||
"m_StageCapability": 3,
|
||||
"m_BareResource": false,
|
||||
"m_Texture": {
|
||||
"m_SerializedTexture": "",
|
||||
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"m_DefaultType": 0
|
||||
@@ -2764,7 +2763,7 @@
|
||||
"m_StageCapability": 3,
|
||||
"m_BareResource": false,
|
||||
"m_Texture": {
|
||||
"m_SerializedTexture": "",
|
||||
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"m_DefaultType": 0
|
||||
@@ -2958,7 +2957,7 @@
|
||||
"m_StageCapability": 3,
|
||||
"m_BareResource": false,
|
||||
"m_Texture": {
|
||||
"m_SerializedTexture": "",
|
||||
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"m_DefaultType": 0
|
||||
@@ -3195,10 +3194,10 @@
|
||||
"w": 1.0
|
||||
},
|
||||
"m_DefaultValue": {
|
||||
"x": 1.0,
|
||||
"y": 1.0,
|
||||
"z": 1.0,
|
||||
"w": 1.0
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0,
|
||||
"w": 0.0
|
||||
},
|
||||
"m_Labels": []
|
||||
}
|
||||
@@ -3312,7 +3311,6 @@
|
||||
"m_SourceType": 0,
|
||||
"m_FunctionName": "Composite",
|
||||
"m_FunctionSource": "96de908384869cd409c75efa351d5edf",
|
||||
"m_FunctionSourceUsePragmas": true,
|
||||
"m_FunctionBody": "Enter function body here..."
|
||||
}
|
||||
|
||||
@@ -3851,7 +3849,7 @@
|
||||
"m_StageCapability": 3,
|
||||
"m_BareResource": true,
|
||||
"m_Texture": {
|
||||
"m_SerializedTexture": "",
|
||||
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"m_DefaultType": 0
|
||||
@@ -4385,8 +4383,8 @@
|
||||
"m_ObjectId": "42cadae0923e4969b50bbc3f78185934",
|
||||
"m_Title": "Face + 3 Outlines + Underlay",
|
||||
"m_Position": {
|
||||
"x": -5468.00048828125,
|
||||
"y": -3557.5
|
||||
"x": -5468.0,
|
||||
"y": -3558.0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4455,7 +4453,6 @@
|
||||
"m_SourceType": 0,
|
||||
"m_FunctionName": "Layer1",
|
||||
"m_FunctionSource": "96de908384869cd409c75efa351d5edf",
|
||||
"m_FunctionSourceUsePragmas": true,
|
||||
"m_FunctionBody": "Enter function body here..."
|
||||
}
|
||||
|
||||
@@ -4597,7 +4594,7 @@
|
||||
"hlslDeclarationOverride": 0,
|
||||
"m_Hidden": false,
|
||||
"m_Value": {
|
||||
"m_SerializedTexture": "",
|
||||
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"isMainTexture": false,
|
||||
@@ -4670,8 +4667,8 @@
|
||||
"m_ObjectId": "484b51c50485473b819c4f05087b32d7",
|
||||
"m_Title": "Underlay",
|
||||
"m_Position": {
|
||||
"x": -4959.00048828125,
|
||||
"y": -4541.5
|
||||
"x": -5253.0,
|
||||
"y": -4542.0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4803,10 +4800,10 @@
|
||||
"w": 1.0
|
||||
},
|
||||
"m_DefaultValue": {
|
||||
"x": 1.0,
|
||||
"y": 1.0,
|
||||
"z": 1.0,
|
||||
"w": 1.0
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0,
|
||||
"w": 0.0
|
||||
},
|
||||
"m_Labels": []
|
||||
}
|
||||
@@ -4961,7 +4958,7 @@
|
||||
"m_StageCapability": 3,
|
||||
"m_BareResource": false,
|
||||
"m_Texture": {
|
||||
"m_SerializedTexture": "",
|
||||
"m_SerializedTexture": "{\"texture\":{\"fileID\":-2362172177983852347,\"guid\":\"dda5bcb0d1e9515498f6e4e038bbefe6\",\"type\":2}}",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"m_DefaultType": 0
|
||||
@@ -5015,7 +5012,7 @@
|
||||
"m_StageCapability": 3,
|
||||
"m_BareResource": false,
|
||||
"m_Texture": {
|
||||
"m_SerializedTexture": "",
|
||||
"m_SerializedTexture": "{\"texture\":{\"fileID\":-2362172177983852347,\"guid\":\"dda5bcb0d1e9515498f6e4e038bbefe6\",\"type\":2}}",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"m_DefaultType": 0
|
||||
@@ -5070,7 +5067,6 @@
|
||||
"m_SourceType": 0,
|
||||
"m_FunctionName": "GetSurfaceNormal",
|
||||
"m_FunctionSource": "96de908384869cd409c75efa351d5edf",
|
||||
"m_FunctionSourceUsePragmas": true,
|
||||
"m_FunctionBody": "Enter function body here..."
|
||||
}
|
||||
|
||||
@@ -6213,7 +6209,7 @@
|
||||
"m_StageCapability": 3,
|
||||
"m_BareResource": false,
|
||||
"m_Texture": {
|
||||
"m_SerializedTexture": "",
|
||||
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"m_DefaultType": 0
|
||||
@@ -7224,7 +7220,6 @@
|
||||
"m_SourceType": 0,
|
||||
"m_FunctionName": "ScreenSpaceRatio",
|
||||
"m_FunctionSource": "96de908384869cd409c75efa351d5edf",
|
||||
"m_FunctionSourceUsePragmas": true,
|
||||
"m_FunctionBody": "Enter function body here..."
|
||||
}
|
||||
|
||||
@@ -7572,7 +7567,6 @@
|
||||
"m_SourceType": 0,
|
||||
"m_FunctionName": "ComputeSDF",
|
||||
"m_FunctionSource": "96de908384869cd409c75efa351d5edf",
|
||||
"m_FunctionSourceUsePragmas": true,
|
||||
"m_FunctionBody": "Enter function body here..."
|
||||
}
|
||||
|
||||
@@ -7948,7 +7942,6 @@
|
||||
"m_AlphaClip": true,
|
||||
"m_CastShadows": true,
|
||||
"m_ReceiveShadows": true,
|
||||
"m_DisableTint": false,
|
||||
"m_AdditionalMotionVectorMode": 0,
|
||||
"m_AlembicMotionVectors": false,
|
||||
"m_SupportsLODCrossFade": false,
|
||||
@@ -8075,8 +8068,8 @@
|
||||
"m_ObjectId": "98934a69591249d5b8b92b39045359a3",
|
||||
"m_Title": "Outline1 Texture",
|
||||
"m_Position": {
|
||||
"x": -4660.0,
|
||||
"y": -2473.5
|
||||
"x": -4670.00048828125,
|
||||
"y": -2474.000244140625
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8529,7 +8522,6 @@
|
||||
"m_SourceType": 0,
|
||||
"m_FunctionName": "GenerateUV",
|
||||
"m_FunctionSource": "96de908384869cd409c75efa351d5edf",
|
||||
"m_FunctionSourceUsePragmas": true,
|
||||
"m_FunctionBody": "Enter function body here..."
|
||||
}
|
||||
|
||||
@@ -8814,7 +8806,6 @@
|
||||
"m_SourceType": 0,
|
||||
"m_FunctionName": "EvaluateLight",
|
||||
"m_FunctionSource": "96de908384869cd409c75efa351d5edf",
|
||||
"m_FunctionSourceUsePragmas": true,
|
||||
"m_FunctionBody": "Enter function body here..."
|
||||
}
|
||||
|
||||
@@ -9065,7 +9056,7 @@
|
||||
"m_StageCapability": 3,
|
||||
"m_BareResource": false,
|
||||
"m_Texture": {
|
||||
"m_SerializedTexture": "",
|
||||
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"m_DefaultType": 0
|
||||
@@ -9265,7 +9256,7 @@
|
||||
"m_StageCapability": 3,
|
||||
"m_BareResource": false,
|
||||
"m_Texture": {
|
||||
"m_SerializedTexture": "",
|
||||
"m_SerializedTexture": "{\"texture\":{\"fileID\":-2362172177983852347,\"guid\":\"dda5bcb0d1e9515498f6e4e038bbefe6\",\"type\":2}}",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"m_DefaultType": 0
|
||||
@@ -9350,7 +9341,7 @@
|
||||
"m_StageCapability": 3,
|
||||
"m_BareResource": false,
|
||||
"m_Texture": {
|
||||
"m_SerializedTexture": "",
|
||||
"m_SerializedTexture": "{\"texture\":{\"fileID\":-2362172177983852347,\"guid\":\"dda5bcb0d1e9515498f6e4e038bbefe6\",\"type\":2}}",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"m_DefaultType": 0
|
||||
@@ -9636,7 +9627,6 @@
|
||||
"m_SourceType": 0,
|
||||
"m_FunctionName": "GenerateUV",
|
||||
"m_FunctionSource": "96de908384869cd409c75efa351d5edf",
|
||||
"m_FunctionSourceUsePragmas": true,
|
||||
"m_FunctionBody": "Enter function body here..."
|
||||
}
|
||||
|
||||
@@ -9891,7 +9881,7 @@
|
||||
"hlslDeclarationOverride": 0,
|
||||
"m_Hidden": false,
|
||||
"m_Value": {
|
||||
"m_SerializedTexture": "",
|
||||
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"isMainTexture": false,
|
||||
@@ -10164,8 +10154,8 @@
|
||||
"m_ObjectId": "d0a791a544614667962a9a9a9ce0c68a",
|
||||
"m_Title": "Screen Space Ratio",
|
||||
"m_Position": {
|
||||
"x": -6180.00048828125,
|
||||
"y": -3421.5
|
||||
"x": -6179.99951171875,
|
||||
"y": -3422.0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10263,8 +10253,8 @@
|
||||
"m_ObjectId": "d258902c6ec74942afdb9ebf8c1d07f8",
|
||||
"m_Title": "Generate Normal",
|
||||
"m_Position": {
|
||||
"x": -4511.0,
|
||||
"y": -3998.5
|
||||
"x": -4511.33349609375,
|
||||
"y": -3999.3330078125
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10542,8 +10532,8 @@
|
||||
"m_ObjectId": "daaf032a109749a88c9b8ff8e1f8b541",
|
||||
"m_Title": "Offset Scale",
|
||||
"m_Position": {
|
||||
"x": -5748.00048828125,
|
||||
"y": -3960.5
|
||||
"x": -5747.99951171875,
|
||||
"y": -3961.0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10928,7 +10918,6 @@
|
||||
"m_SourceType": 0,
|
||||
"m_FunctionName": "ComputeSDF44",
|
||||
"m_FunctionSource": "96de908384869cd409c75efa351d5edf",
|
||||
"m_FunctionSourceUsePragmas": true,
|
||||
"m_FunctionBody": "Enter function body here..."
|
||||
}
|
||||
|
||||
@@ -11098,7 +11087,7 @@
|
||||
"m_Title": "Vertex Color",
|
||||
"m_Position": {
|
||||
"x": -3448.000244140625,
|
||||
"y": -3578.5
|
||||
"y": -3579.0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11287,7 +11276,6 @@
|
||||
"m_SourceType": 0,
|
||||
"m_FunctionName": "Layer4",
|
||||
"m_FunctionSource": "96de908384869cd409c75efa351d5edf",
|
||||
"m_FunctionSourceUsePragmas": true,
|
||||
"m_FunctionBody": "Enter function body here..."
|
||||
}
|
||||
|
||||
@@ -11765,7 +11753,7 @@
|
||||
"m_StageCapability": 3,
|
||||
"m_BareResource": false,
|
||||
"m_Texture": {
|
||||
"m_SerializedTexture": "",
|
||||
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"m_DefaultType": 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 947c2fda070a4af7b8c51318a38eddeb
|
||||
timeCreated: 1732718855
|
||||
@@ -1,188 +0,0 @@
|
||||
struct vertex_t
|
||||
{
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
float4 position : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 color : COLOR;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
float4 texcoord1 : TEXCOORD1;
|
||||
float4 texcoord2 : TEXCOORD2;
|
||||
float4 texcoord3 : TEXCOORD3;
|
||||
};
|
||||
|
||||
struct pixel_t
|
||||
{
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
float4 position : SV_POSITION;
|
||||
float4 faceColor : COLOR;
|
||||
float4 outlineColor : COLOR1;
|
||||
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
|
||||
float4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
|
||||
float2 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
|
||||
float3 normal : NORMAL;
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
float4 texcoord1 : TEXCOORD3;
|
||||
float2 underlayParam : TEXCOORD4;
|
||||
#endif
|
||||
float4 vert_data : TEXCOORD5; // vertex left bottom position (x, y, z), vertex width (w)
|
||||
float4 uv_data : TEXCOORD6; // UV left bottom position (x, y), UV width (z), size ratio (w)
|
||||
float4 rotation_data : TEXCOORD7;
|
||||
};
|
||||
|
||||
float4 SRGBToLinear(float4 rgba)
|
||||
{
|
||||
return float4(lerp(rgba.rgb / 12.92f, pow((rgba.rgb + 0.055f) / 1.055f, 2.4f), step(0.04045f, rgba.rgb)), rgba.a);
|
||||
}
|
||||
|
||||
float _UIMaskSoftnessX;
|
||||
float _UIMaskSoftnessY;
|
||||
|
||||
pixel_t VertShader(vertex_t input)
|
||||
{
|
||||
pixel_t output;
|
||||
|
||||
// UNITY_INITIALIZE_OUTPUT(pixel_t, output);
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
||||
|
||||
float bold = step(input.texcoord0.w, 0);
|
||||
|
||||
float4 vert = input.position;
|
||||
vert.x += _VertexOffsetX;
|
||||
vert.y += _VertexOffsetY;
|
||||
float4 vPosition = GetVertexPositionInputs(vert).positionCS;
|
||||
|
||||
float2 pixelSize = vPosition.w;
|
||||
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
|
||||
|
||||
float scale = rsqrt(dot(pixelSize, pixelSize));
|
||||
scale *= abs(input.texcoord0.w) * _GradientScale * (_Sharpness + 1);
|
||||
if (UNITY_MATRIX_P[3][3] == 0)
|
||||
scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale,
|
||||
abs(dot(TransformObjectToWorldNormal(input.normal.xyz),
|
||||
normalize(GetWorldSpaceViewDir(vert)))));
|
||||
|
||||
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
|
||||
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
|
||||
|
||||
float layerScale = scale;
|
||||
|
||||
scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
|
||||
float bias = (0.5 - weight) * scale - 0.5;
|
||||
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
|
||||
|
||||
// if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
|
||||
// {
|
||||
// input.color.rgb = UIGammaToLinear(input.color.rgb);
|
||||
// }
|
||||
float opacity = input.color.a;
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
opacity = 1.0;
|
||||
#endif
|
||||
|
||||
float4 faceColor = float4(input.color.rgb, opacity) * _FaceColor;
|
||||
faceColor.rgb *= faceColor.a;
|
||||
|
||||
float4 outlineColor = _OutlineColor;
|
||||
outlineColor.a *= opacity;
|
||||
outlineColor.rgb *= outlineColor.a;
|
||||
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
|
||||
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
|
||||
float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
|
||||
|
||||
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
|
||||
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
|
||||
float2 layerOffset = float2(x, y);
|
||||
#endif
|
||||
|
||||
// Generate UV for the Masking Texture
|
||||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
|
||||
|
||||
// Populate structure for pixel shader
|
||||
output.position = vPosition;
|
||||
output.faceColor = faceColor;
|
||||
output.outlineColor = outlineColor;
|
||||
output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y);
|
||||
output.param = half4(scale, bias - outline, bias + outline, bias);
|
||||
|
||||
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
|
||||
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
|
||||
output.underlayParam = half2(layerScale, layerBias);
|
||||
#endif
|
||||
|
||||
// decal
|
||||
output.rotation_data = input.texcoord1;
|
||||
output.vert_data = input.texcoord2;
|
||||
output.uv_data = input.texcoord3;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
void CalculateDecalUV_float(float3 vertexPosition, float4 meshData, float4 uvData, float4 quaternion,
|
||||
out float3 decalUV, out float3 decalClip)
|
||||
{
|
||||
const float2 uv = (vertexPosition.xy / _ScaledScreenParams.xy);
|
||||
#if UNITY_REVERSED_Z
|
||||
float depth = SampleSceneDepth(uv);
|
||||
#else
|
||||
// Adjust Z to match NDC for OpenGL ([-1, 1])
|
||||
float depth = lerp(UNITY_NEAR_CLIP_VALUE, 1, SampleSceneDepth(uv));
|
||||
#endif
|
||||
const float3 world_pos = ComputeWorldSpacePosition(uv, depth, UNITY_MATRIX_I_VP);
|
||||
const float3 local_pos = TransformWorldToObject(world_pos);
|
||||
CalculateDecal_float(local_pos, meshData, uvData, quaternion, decalUV, decalClip);
|
||||
}
|
||||
|
||||
float4 PixShader(pixel_t input) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
|
||||
float3 decalUV;
|
||||
float3 decalClip;
|
||||
CalculateDecalUV_float(input.position, input.vert_data, input.uv_data, input.rotation_data, decalUV, decalClip);
|
||||
|
||||
// half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
|
||||
float d = tex2D(_MainTex, decalUV.xy).a * input.param.x;
|
||||
half4 c = input.faceColor * saturate(d - input.param.w);
|
||||
|
||||
#ifdef OUTLINE_ON
|
||||
c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
|
||||
c *= saturate(d - input.param.y);
|
||||
#endif
|
||||
|
||||
#if UNDERLAY_ON
|
||||
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
|
||||
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
|
||||
#endif
|
||||
|
||||
#if UNDERLAY_INNER
|
||||
half sd = saturate(d - input.param.z);
|
||||
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
|
||||
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
|
||||
#endif
|
||||
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
|
||||
c *= m.x * m.y;
|
||||
#endif
|
||||
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
c *= input.texcoord1.z;
|
||||
#endif
|
||||
|
||||
DecalClip_float(c, decalClip, c);
|
||||
|
||||
#if UNITY_UI_ALPHACLIP
|
||||
clip(c.a - 0.001);
|
||||
#endif
|
||||
|
||||
return c;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f9ec818b9b324c618897b83ca611c3d1
|
||||
timeCreated: 1732722899
|
||||
Reference in New Issue
Block a user