Add shaders

This commit is contained in:
Williams
2026-05-19 15:33:18 +02:00
committed by Lucien
parent 593c2e75b2
commit cd9df45d08
1358 changed files with 2429155 additions and 0 deletions
@@ -1,341 +0,0 @@
Shader "Standard_Backface"
{
Properties
{
_Color("Color", Color) = (1,1,1,1)
_MainTex("Albedo", 2D) = "white" {}
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
_Glossiness("Smoothness", Range(0.0, 1.0)) = 0.5
_GlossMapScale("Smoothness Scale", Range(0.0, 1.0)) = 1.0
[Enum(Metallic Alpha,0,Albedo Alpha,1)] _SmoothnessTextureChannel ("Smoothness texture channel", Float) = 0
[Gamma] _Metallic("Metallic", Range(0.0, 1.0)) = 0.0
_MetallicGlossMap("Metallic", 2D) = "white" {}
[ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1.0
[ToggleOff] _GlossyReflections("Glossy Reflections", Float) = 1.0
_BumpScale("Scale", Float) = 1.0
_BumpMap("Normal Map", 2D) = "bump" {}
_Parallax ("Height Scale", Range (0.005, 0.08)) = 0.02
_ParallaxMap ("Height Map", 2D) = "black" {}
_OcclusionStrength("Strength", Range(0.0, 1.0)) = 1.0
_OcclusionMap("Occlusion", 2D) = "white" {}
_EmissionColor("Color", Color) = (0,0,0)
_EmissionMap("Emission", 2D) = "white" {}
_DetailMask("Detail Mask", 2D) = "white" {}
_DetailAlbedoMap("Detail Albedo x2", 2D) = "grey" {}
_DetailNormalMapScale("Scale", Float) = 1.0
_DetailNormalMap("Normal Map", 2D) = "bump" {}
[Enum(UV0,0,UV1,1)] _UVSec ("UV Set for secondary textures", Float) = 0
// Blending state
[HideInInspector] _Mode ("__mode", Float) = 0.0
[HideInInspector] _SrcBlend ("__src", Float) = 1.0
[HideInInspector] _DstBlend ("__dst", Float) = 0.0
[HideInInspector] _ZWrite ("__zw", Float) = 1.0
}
CGINCLUDE
#define UNITY_SETUP_BRDF_INPUT MetallicSetup
ENDCG
SubShader
{
Tags { "RenderType"="Opaque" "PerformanceChecks"="False" }
LOD 300
// ------------------------------------------------------------------
// Base forward pass (directional light, emission, lightmaps, ...)
Pass
{
Name "FORWARD"
Tags { "LightMode" = "ForwardBase" }
Blend [_SrcBlend] [_DstBlend]
ZWrite [_ZWrite]
Cull Off
CGPROGRAM
#pragma target 3.0
// -------------------------------------
#pragma shader_feature _NORMALMAP
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
#pragma shader_feature _EMISSION
#pragma shader_feature _METALLICGLOSSMAP
#pragma shader_feature ___ _DETAIL_MULX2
#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
#pragma shader_feature _PARALLAXMAP
#pragma multi_compile_fwdbase
#pragma multi_compile_fog
#pragma vertex vertBase
#pragma fragment fragBase
#include "UnityStandardCoreForward.cginc"
ENDCG
}
// ------------------------------------------------------------------
// Additive forward pass (one light per pass)
Pass
{
Name "FORWARD_DELTA"
Tags { "LightMode" = "ForwardAdd" }
Blend [_SrcBlend] One
Fog { Color (0,0,0,0) } // in additive pass fog should be black
ZWrite Off
ZTest LEqual
CGPROGRAM
#pragma target 3.0
// -------------------------------------
#pragma shader_feature _NORMALMAP
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
#pragma shader_feature _METALLICGLOSSMAP
#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
#pragma shader_feature ___ _DETAIL_MULX2
#pragma shader_feature _PARALLAXMAP
#pragma multi_compile_fwdadd_fullshadows
#pragma multi_compile_fog
#pragma vertex vertAdd
#pragma fragment fragAdd
#include "UnityStandardCoreForward.cginc"
ENDCG
}
// ------------------------------------------------------------------
// Shadow rendering pass
Pass {
Name "ShadowCaster"
Tags { "LightMode" = "ShadowCaster" }
ZWrite On ZTest LEqual
CGPROGRAM
#pragma target 3.0
// -------------------------------------
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
#pragma shader_feature _METALLICGLOSSMAP
#pragma shader_feature _PARALLAXMAP
#pragma multi_compile_shadowcaster
#pragma vertex vertShadowCaster
#pragma fragment fragShadowCaster
#include "UnityStandardShadow.cginc"
ENDCG
}
// ------------------------------------------------------------------
// Deferred pass
Pass
{
Name "DEFERRED"
Tags { "LightMode" = "Deferred" }
Cull Off
CGPROGRAM
#pragma target 3.0
#pragma exclude_renderers nomrt
// -------------------------------------
#pragma shader_feature _NORMALMAP
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
#pragma shader_feature _EMISSION
#pragma shader_feature _METALLICGLOSSMAP
#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
#pragma shader_feature ___ _DETAIL_MULX2
#pragma shader_feature _PARALLAXMAP
#pragma multi_compile ___ UNITY_HDR_ON
#pragma multi_compile ___ LIGHTMAP_ON
#pragma multi_compile ___ DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE
#pragma multi_compile ___ DYNAMICLIGHTMAP_ON
#pragma vertex vertDeferred
#pragma fragment fragDeferred
#include "UnityStandardCore.cginc"
ENDCG
}
// ------------------------------------------------------------------
// Extracts information for lightmapping, GI (emission, albedo, ...)
// This pass it not used during regular rendering.
Pass
{
Name "META"
Tags { "LightMode"="Meta" }
Cull Off
CGPROGRAM
#pragma vertex vert_meta
#pragma fragment frag_meta
#pragma shader_feature _EMISSION
#pragma shader_feature _METALLICGLOSSMAP
#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
#pragma shader_feature ___ _DETAIL_MULX2
#include "UnityStandardMeta.cginc"
ENDCG
}
}
SubShader
{
Tags { "RenderType"="Opaque" "PerformanceChecks"="False" }
LOD 150
// ------------------------------------------------------------------
// Base forward pass (directional light, emission, lightmaps, ...)
Pass
{
Name "FORWARD"
Tags { "LightMode" = "ForwardBase" }
Cull Off
Blend [_SrcBlend] [_DstBlend]
ZWrite [_ZWrite]
CGPROGRAM
#pragma target 2.0
#pragma shader_feature _NORMALMAP
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
#pragma shader_feature _EMISSION
#pragma shader_feature _METALLICGLOSSMAP
#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
// SM2.0: NOT SUPPORTED shader_feature ___ _DETAIL_MULX2
// SM2.0: NOT SUPPORTED shader_feature _PARALLAXMAP
#pragma skip_variants SHADOWS_SOFT DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE
#pragma multi_compile_fwdbase
#pragma multi_compile_fog
#pragma vertex vertBase
#pragma fragment fragBase
#include "UnityStandardCoreForward.cginc"
ENDCG
}
// ------------------------------------------------------------------
// Additive forward pass (one light per pass)
Pass
{
Name "FORWARD_DELTA"
Tags { "LightMode" = "ForwardAdd" }
Blend [_SrcBlend] One
Fog { Color (0,0,0,0) } // in additive pass fog should be black
ZWrite Off
ZTest LEqual
CGPROGRAM
#pragma target 2.0
#pragma shader_feature _NORMALMAP
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
#pragma shader_feature _METALLICGLOSSMAP
#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
#pragma shader_feature ___ _DETAIL_MULX2
// SM2.0: NOT SUPPORTED shader_feature _PARALLAXMAP
#pragma skip_variants SHADOWS_SOFT
#pragma multi_compile_fwdadd_fullshadows
#pragma multi_compile_fog
#pragma vertex vertAdd
#pragma fragment fragAdd
#include "UnityStandardCoreForward.cginc"
ENDCG
}
// ------------------------------------------------------------------
// Shadow rendering pass
Pass {
Name "ShadowCaster"
Tags { "LightMode" = "ShadowCaster" }
ZWrite On ZTest LEqual
CGPROGRAM
#pragma target 2.0
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
#pragma shader_feature _METALLICGLOSSMAP
#pragma skip_variants SHADOWS_SOFT
#pragma multi_compile_shadowcaster
#pragma vertex vertShadowCaster
#pragma fragment fragShadowCaster
#include "UnityStandardShadow.cginc"
ENDCG
}
// ------------------------------------------------------------------
// Extracts information for lightmapping, GI (emission, albedo, ...)
// This pass it not used during regular rendering.
Pass
{
Name "META"
Tags { "LightMode"="Meta" }
Cull Off
CGPROGRAM
#pragma vertex vert_meta
#pragma fragment frag_meta
#pragma shader_feature _EMISSION
#pragma shader_feature _METALLICGLOSSMAP
#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
#pragma shader_feature ___ _DETAIL_MULX2
#include "UnityStandardMeta.cginc"
ENDCG
}
}
FallBack "VertexLit"
CustomEditor "StandardShaderGUI"
}
@@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: 119ac94a72f186a42a8a5f96ba6ce254
timeCreated: 1505848045
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -1,163 +0,0 @@
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'
// Simple 2 Pass Hair Shader
// This shader blends a solid cutout and fade shader to try and produce reasonable looking hair.
// Made with components from the: Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "UMA/Hair Fade Cutout"
{
Properties
{
[HideInInspector] __dirty( "", Int ) = 1
_MainTex("Diffuse/Alpha Map", 2D) = "white" {}
_MaskClipValue( "Cotout Clip Value", Range( 0 , 1) ) = 0.7
_BumpMap("Normal Map", 2D) = "bump" {}
_BumpStrength("Bump Strength", Range( 0 , 1)) = 0.4
_MetallicStrength("Metallic Strength", Range (0,1) ) = 0.5
_MetallicAdd("Metallic Add", Range (0,1) ) = 0.0
_SmoothnessStrength("Smoothness Strength", Range (0,1)) = 0.5
_SmoothnessAdd("Smoothness Add",Range(0,1)) = 0.0
_MetallicGlossMap("Metallic Gloss Map", 2D) = "white" {}
_FadeFactor("Fade Factor", Range(0,2)) = 2.0
[HideInInspector] _texcoord( "", 2D ) = "white" {}
}
SubShader
{
Tags{ "RenderType" = "TransparentCutout" "Queue" = "AlphaTest+0" }
Cull Back
CGINCLUDE
#include "UnityStandardUtils.cginc"
#include "UnityPBSLighting.cginc"
#include "Lighting.cginc"
#pragma target 3.0
struct Input
{
float2 uv_texcoord;
};
uniform float _MetallicAdd;
uniform float _MetallicStrength;
uniform float _SmoothnessStrength;
uniform float _SmoothnessAdd;
uniform float _BumpStrength;
uniform sampler2D _BumpMap;
uniform float4 _BumpMap_ST;
uniform sampler2D _MainTex;
uniform float4 _MainTex_ST;
uniform sampler2D _MetallicGlossMap;
uniform float4 _MetallicGlossMap_ST;
uniform float _MaskClipValue = 0.5;
uniform float _FadeFactor;
void surf( Input i , inout SurfaceOutputStandard o )
{
float2 uv_BumpMap = i.uv_texcoord * _BumpMap_ST.xy + _BumpMap_ST.zw;
o.Normal = UnpackScaleNormal( tex2D( _BumpMap,uv_BumpMap) ,_BumpStrength );
float2 uv_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw;
float4 tex2DNode1 = tex2D( _MainTex,uv_MainTex);
o.Albedo = tex2DNode1.xyz;
float2 uv_MetallicGlossMap = i.uv_texcoord * _MetallicGlossMap_ST.xy + _MetallicGlossMap_ST.zw;
o.Metallic = _MetallicAdd + (tex2D( _MetallicGlossMap,uv_MetallicGlossMap).x * _MetallicStrength);
o.Smoothness = _SmoothnessAdd + (tex2D(_MetallicGlossMap, uv_MetallicGlossMap).a * _SmoothnessStrength);
o.Alpha = tex2DNode1.a;
clip( tex2DNode1.a - _MaskClipValue );
}
ENDCG
CGPROGRAM
#pragma surface surf Standard keepalpha
ENDCG
Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" }
Cull Off
ZTEST Less
CGINCLUDE
#include "UnityStandardUtils.cginc"
#include "UnityPBSLighting.cginc"
#include "Lighting.cginc"
#pragma target 3.0
void surf2( Input i , inout SurfaceOutputStandard o )
{
float2 uv_BumpMap = i.uv_texcoord * _BumpMap_ST.xy + _BumpMap_ST.zw;
o.Normal = UnpackScaleNormal( tex2D( _BumpMap,uv_BumpMap) ,_BumpStrength );
float2 uv_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw;
float4 tex2DNode1 = tex2D( _MainTex,uv_MainTex);
o.Albedo = tex2DNode1.xyz;
float2 uv_MetallicGlossMap = i.uv_texcoord * _MetallicGlossMap_ST.xy + _MetallicGlossMap_ST.zw;
// o.Metallic = tex2D( _MetallicGlossMap,uv_MetallicGlossMap).x * _MetallicStrength;
o.Metallic = _MetallicAdd + (tex2D(_MetallicGlossMap, uv_MetallicGlossMap).x * _MetallicStrength);
o.Smoothness = _SmoothnessAdd + (tex2D(_MetallicGlossMap, uv_MetallicGlossMap).a * _SmoothnessStrength);
o.Alpha = tex2DNode1.a * _FadeFactor;
}
ENDCG
CGPROGRAM
#pragma surface surf2 Standard alpha:fade keepalpha
ENDCG
Pass
{
Name "ShadowCaster"
Tags{ "LightMode" = "ShadowCaster" }
ZWrite On
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 3.0
#pragma multi_compile_shadowcaster
#pragma multi_compile UNITY_PASS_SHADOWCASTER
#pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2
# include "HLSLSupport.cginc"
#include "UnityCG.cginc"
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
sampler3D _DitherMaskLOD;
struct v2f
{
V2F_SHADOW_CASTER;
float3 worldPos : TEXCOORD6;
float4 tSpace0 : TEXCOORD1;
float4 tSpace1 : TEXCOORD2;
float4 tSpace2 : TEXCOORD3;
float4 texcoords01 : TEXCOORD4;
};
v2f vert( appdata_full v )
{
v2f o;
UNITY_INITIALIZE_OUTPUT( v2f, o );
float3 worldPos = mul( unity_ObjectToWorld, v.vertex ).xyz;
half3 worldNormal = UnityObjectToWorldNormal( v.normal );
fixed3 worldTangent = UnityObjectToWorldDir( v.tangent.xyz );
fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w;
fixed3 worldBinormal = cross( worldNormal, worldTangent ) * tangentSign;
o.tSpace0 = float4( worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x );
o.tSpace1 = float4( worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y );
o.tSpace2 = float4( worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z );
o.texcoords01 = float4( v.texcoord.xy, v.texcoord1.xy );
o.worldPos = worldPos;
TRANSFER_SHADOW_CASTER_NORMALOFFSET( o )
return o;
}
fixed4 frag( v2f IN ) : SV_Target
{
Input surfIN;
UNITY_INITIALIZE_OUTPUT( Input, surfIN );
surfIN.uv_texcoord = IN.texcoords01.xy;
float3 worldPos = IN.worldPos;
fixed3 worldViewDir = normalize( UnityWorldSpaceViewDir( worldPos ) );
SurfaceOutputStandard o;
UNITY_INITIALIZE_OUTPUT( SurfaceOutputStandard, o )
surf( surfIN, o );
SHADOW_CASTER_FRAGMENT( IN )
}
ENDCG
}
}
FallBack "Legacy Shaders/Transparent/Cutout/Bumped Diffuse"
}
@@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: d56eff61c40904d78becb18c718ce22e
timeCreated: 1488417028
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -1,100 +0,0 @@
// Simple 2 Pass Hair Shader
// This shader blends a solid cutout and fade shader to try and produce reasonable looking hair.
// Made with components from the: Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "UMA/Hair Fade2 Cutout"
{
Properties
{
[HideInInspector] __dirty( "", Int ) = 1
_MainTex("Diffuse/Alpha Map", 2D) = "white" {}
_MaskClipValue( "Cotout Clip Value", Range( 0 , 1) ) = 0.7
_BumpMap("Normal Map", 2D) = "bump" {}
_BumpStrength("Bump Strength", Range( 0 , 1)) = 0.4
_MetallicStrength("Metallic Strength", Range (0,1) ) = 0.5
_MetallicAdd("Metallic Add", Range (0,1) ) = 0.0
_SmoothnessStrength("Smoothness Strength", Range (0,1)) = 0.5
_SmoothnessAdd("Smoothness Add",Range(0,1)) = 0.0
_MetallicGlossMap("Metallic Gloss Map", 2D) = "white" {}
[HideInInspector] _texcoord( "", 2D ) = "white" {}
}
SubShader
{
Tags{ "RenderType" = "TransparentCutout" "Queue" = "AlphaTest+0" }
Cull Back
CGINCLUDE
#include "UnityStandardUtils.cginc"
#include "UnityPBSLighting.cginc"
#include "Lighting.cginc"
#pragma target 3.0
struct Input
{
float2 uv_texcoord;
};
uniform float _MetallicAdd;
uniform float _MetallicStrength;
uniform float _SmoothnessStrength;
uniform float _SmoothnessAdd;
uniform float _BumpStrength;
uniform sampler2D _BumpMap;
uniform float4 _BumpMap_ST;
uniform sampler2D _MainTex;
uniform float4 _MainTex_ST;
uniform sampler2D _MetallicGlossMap;
uniform float4 _MetallicGlossMap_ST;
uniform float _MaskClipValue = 0.5;
void surf( Input i , inout SurfaceOutputStandard o )
{
float2 uv_BumpMap = i.uv_texcoord;// *_BumpMap_ST.xy + _BumpMap_ST.zw;
o.Normal = UnpackScaleNormal( tex2D( _BumpMap,uv_BumpMap) ,_BumpStrength );
float2 uv_MainTex = i.uv_texcoord;// *_MainTex_ST.xy + _MainTex_ST.zw;
float4 tex2DNode1 = tex2D( _MainTex,uv_MainTex);
o.Albedo = tex2DNode1.xyz;
float2 uv_MetallicGlossMap = i.uv_texcoord;// *_MetallicGlossMap_ST.xy + _MetallicGlossMap_ST.zw;
o.Metallic = _MetallicAdd + (tex2D( _MetallicGlossMap,uv_MetallicGlossMap).x * _MetallicStrength);
// o.Metallic = _MetallicAdd + (tex2D(_MetallicGlossMap, uv_MetallicGlossMap).x * _MetallicStrength);
o.Smoothness = _SmoothnessAdd + (tex2D(_MetallicGlossMap, uv_MetallicGlossMap).a * _SmoothnessStrength);
o.Alpha = tex2DNode1.a;
clip( tex2DNode1.a - _MaskClipValue );
}
ENDCG
CGPROGRAM
#pragma surface surf Standard addshadow
ENDCG
Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" }
Cull Back
CGINCLUDE
#include "UnityStandardUtils.cginc"
#include "UnityPBSLighting.cginc"
#include "Lighting.cginc"
#pragma target 3.0
void surf2( Input i , inout SurfaceOutputStandard o )
{
float2 uv_BumpMap = i.uv_texcoord;// *_BumpMap_ST.xy + _BumpMap_ST.zw;
o.Normal = UnpackScaleNormal( tex2D( _BumpMap,uv_BumpMap) ,_BumpStrength );
float2 uv_MainTex = i.uv_texcoord;// *_MainTex_ST.xy + _MainTex_ST.zw;
float4 tex2DNode1 = tex2D( _MainTex,uv_MainTex);
o.Albedo = tex2DNode1.xyz;
float2 uv_MetallicGlossMap = i.uv_texcoord;// *_MetallicGlossMap_ST.xy + _MetallicGlossMap_ST.zw;
o.Metallic = _MetallicAdd + (tex2D(_MetallicGlossMap, uv_MetallicGlossMap).x * _MetallicStrength);
o.Smoothness = _SmoothnessAdd + (tex2D(_MetallicGlossMap, uv_MetallicGlossMap).a * _SmoothnessStrength);
o.Alpha = tex2DNode1.a;
}
ENDCG
CGPROGRAM
#pragma surface surf2 Standard alpha:fade keepalpha addshadow
ENDCG
}
FallBack "Legacy Shaders/Transparent/Cutout/Bumped Diffuse"
}
@@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: 5efdaebb940ef7b4bb5dcad3bf6b78d8
timeCreated: 1498161407
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -1,102 +0,0 @@
// Simple 2 Pass Hair Shader (Single Sided)
// This shader blends a solid cutout and fade shader to try and produce reasonable looking hair.
// Made with components from the: Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "UMA/Hair Fade Cutout (Single Sided)"
{
Properties
{
[HideInInspector] __dirty( "", Int ) = 1
_MainTex("Diffuse/Alpha Map", 2D) = "white" {}
_MaskClipValue( "Cotout Clip Value", Range( 0 , 1) ) = 0.7
_BumpMap("Normal Map", 2D) = "bump" {}
_BumpStrength("Bump Strength", Range( 0 , 1)) = 0.4
_MetallicStrength("Metallic Strength", Range (0,1) ) = 0.5
_MetallicAdd("Metallic Add", Range (0,1) ) = 0.0
_SmoothnessStrength("Smoothness Strength", Range (0,1)) = 0.5
_SmoothnessAdd("Smoothness Add",Range(0,1)) = 0.0
_MetallicGlossMap("Metallic Gloss Map", 2D) = "white" {}
_FadeFactor("Fade Factor", Range(0,2)) = 2.0
[HideInInspector] _texcoord( "", 2D ) = "white" {}
}
SubShader
{
Tags{ "RenderType" = "TransparentCutout" "Queue" = "AlphaTest+0" }
Cull Back
CGINCLUDE
#include "UnityStandardUtils.cginc"
#include "UnityPBSLighting.cginc"
#include "Lighting.cginc"
#pragma target 3.0
struct Input
{
float2 uv_texcoord;
};
uniform float _MetallicAdd;
uniform float _MetallicStrength;
uniform float _SmoothnessStrength;
uniform float _SmoothnessAdd;
uniform float _BumpStrength;
uniform sampler2D _BumpMap;
uniform float4 _BumpMap_ST;
uniform sampler2D _MainTex;
uniform float4 _MainTex_ST;
uniform sampler2D _MetallicGlossMap;
uniform float4 _MetallicGlossMap_ST;
uniform float _MaskClipValue = 0.5;
uniform float _FadeFactor;
void surf( Input i , inout SurfaceOutputStandard o )
{
float2 uv_BumpMap = i.uv_texcoord;// *_BumpMap_ST.xy + _BumpMap_ST.zw;
o.Normal = UnpackScaleNormal( tex2D( _BumpMap,uv_BumpMap) ,_BumpStrength );
float2 uv_MainTex = i.uv_texcoord;// *_MainTex_ST.xy + _MainTex_ST.zw;
float4 tex2DNode1 = tex2D( _MainTex,uv_MainTex);
o.Albedo = tex2DNode1.xyz;
float2 uv_MetallicGlossMap = i.uv_texcoord;// *_MetallicGlossMap_ST.xy + _MetallicGlossMap_ST.zw;
o.Metallic = _MetallicAdd + (tex2D( _MetallicGlossMap,uv_MetallicGlossMap).x * _MetallicStrength);
// o.Metallic = _MetallicAdd + (tex2D(_MetallicGlossMap, uv_MetallicGlossMap).x * _MetallicStrength);
o.Smoothness = _SmoothnessAdd + (tex2D(_MetallicGlossMap, uv_MetallicGlossMap).a * _SmoothnessStrength);
o.Alpha = tex2DNode1.a;
clip( tex2DNode1.a - _MaskClipValue );
}
ENDCG
CGPROGRAM
#pragma surface surf Standard addshadow
ENDCG
Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" }
Cull Back
CGINCLUDE
#include "UnityStandardUtils.cginc"
#include "UnityPBSLighting.cginc"
#include "Lighting.cginc"
#pragma target 3.0
void surf2( Input i , inout SurfaceOutputStandard o )
{
float2 uv_BumpMap = i.uv_texcoord;// *_BumpMap_ST.xy + _BumpMap_ST.zw;
o.Normal = UnpackScaleNormal( tex2D( _BumpMap,uv_BumpMap) ,_BumpStrength );
float2 uv_MainTex = i.uv_texcoord;// *_MainTex_ST.xy + _MainTex_ST.zw;
float4 tex2DNode1 = tex2D( _MainTex,uv_MainTex);
o.Albedo = tex2DNode1.xyz;
float2 uv_MetallicGlossMap = i.uv_texcoord;// *_MetallicGlossMap_ST.xy + _MetallicGlossMap_ST.zw;
o.Metallic = _MetallicAdd + (tex2D(_MetallicGlossMap, uv_MetallicGlossMap).x * _MetallicStrength);
o.Smoothness = _SmoothnessAdd + (tex2D(_MetallicGlossMap, uv_MetallicGlossMap).a * _SmoothnessStrength);
o.Alpha = tex2DNode1.a * _FadeFactor;
}
ENDCG
CGPROGRAM
#pragma surface surf2 Standard alpha:fade keepalpha addshadow
ENDCG
}
FallBack "Legacy Shaders/Transparent/Cutout/Bumped Diffuse"
}
@@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: 0b87e405f94845c4b81d32f132cda54b
timeCreated: 1499382514
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -1,163 +0,0 @@
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'
// Simple 2 Pass Hair Shader
// This shader blends a solid cutout and fade shader to try and produce reasonable looking hair.
// Made with components from the: Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "Hair Pack/Hair Fade Cutout"
{
Properties
{
[HideInInspector] __dirty( "", Int ) = 1
_MainTex("Diffuse/Alpha Map", 2D) = "white" {}
_MaskClipValue( "Cotout Clip Value", Range( 0 , 1) ) = 0.7
_BumpMap("Normal Map", 2D) = "bump" {}
_BumpStrength("Bump Strength", Range( 0 , 1)) = 0.4
_MetallicStrength("Metallic Strength", Range (0,1) ) = 0.5
_MetallicAdd("Metallic Add", Range (0,1) ) = 0.0
_SmoothnessStrength("Smoothness Strength", Range (0,1)) = 0.5
_SmoothnessAdd("Smoothness Add",Range(0,1)) = 0.0
_MetallicGlossMap("Metallic Gloss Map", 2D) = "white" {}
_FadeFactor("Fade Factor", Range(0,2)) = 2.0
[HideInInspector] _texcoord( "", 2D ) = "white" {}
}
SubShader
{
Tags{ "RenderType" = "TransparentCutout" "Queue" = "AlphaTest+0" }
Cull Back
CGINCLUDE
#include "UnityStandardUtils.cginc"
#include "UnityPBSLighting.cginc"
#include "Lighting.cginc"
#pragma target 3.0
struct Input
{
float2 uv_texcoord;
};
uniform float _MetallicAdd;
uniform float _MetallicStrength;
uniform float _SmoothnessStrength;
uniform float _SmoothnessAdd;
uniform float _BumpStrength;
uniform sampler2D _BumpMap;
uniform float4 _BumpMap_ST;
uniform sampler2D _MainTex;
uniform float4 _MainTex_ST;
uniform sampler2D _MetallicGlossMap;
uniform float4 _MetallicGlossMap_ST;
uniform float _MaskClipValue = 0.5;
uniform float _FadeFactor;
void surf( Input i , inout SurfaceOutputStandard o )
{
float2 uv_BumpMap = i.uv_texcoord * _BumpMap_ST.xy + _BumpMap_ST.zw;
o.Normal = UnpackScaleNormal( tex2D( _BumpMap,uv_BumpMap) ,_BumpStrength );
float2 uv_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw;
float4 tex2DNode1 = tex2D( _MainTex,uv_MainTex);
o.Albedo = tex2DNode1.xyz;
float2 uv_MetallicGlossMap = i.uv_texcoord * _MetallicGlossMap_ST.xy + _MetallicGlossMap_ST.zw;
o.Metallic = _MetallicAdd + (tex2D( _MetallicGlossMap,uv_MetallicGlossMap).x * _MetallicStrength);
o.Smoothness = _SmoothnessAdd + (tex2D(_MetallicGlossMap, uv_MetallicGlossMap).a * _SmoothnessStrength);
o.Alpha = tex2DNode1.a;
clip( tex2DNode1.a - _MaskClipValue );
}
ENDCG
CGPROGRAM
#pragma surface surf Standard keepalpha
ENDCG
Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" }
Cull Off
ZTEST Less
CGINCLUDE
#include "UnityStandardUtils.cginc"
#include "UnityPBSLighting.cginc"
#include "Lighting.cginc"
#pragma target 3.0
void surf2( Input i , inout SurfaceOutputStandard o )
{
float2 uv_BumpMap = i.uv_texcoord * _BumpMap_ST.xy + _BumpMap_ST.zw;
o.Normal = UnpackScaleNormal( tex2D( _BumpMap,uv_BumpMap) ,_BumpStrength );
float2 uv_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw;
float4 tex2DNode1 = tex2D( _MainTex,uv_MainTex);
o.Albedo = tex2DNode1.xyz;
float2 uv_MetallicGlossMap = i.uv_texcoord * _MetallicGlossMap_ST.xy + _MetallicGlossMap_ST.zw;
// o.Metallic = tex2D( _MetallicGlossMap,uv_MetallicGlossMap).x * _MetallicStrength;
o.Metallic = _MetallicAdd + (tex2D(_MetallicGlossMap, uv_MetallicGlossMap).x * _MetallicStrength);
o.Smoothness = _SmoothnessAdd + (tex2D(_MetallicGlossMap, uv_MetallicGlossMap).a * _SmoothnessStrength);
o.Alpha = tex2DNode1.a * _FadeFactor;
}
ENDCG
CGPROGRAM
#pragma surface surf2 Standard alpha:fade keepalpha
ENDCG
Pass
{
Name "ShadowCaster"
Tags{ "LightMode" = "ShadowCaster" }
ZWrite On
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 3.0
#pragma multi_compile_shadowcaster
#pragma multi_compile UNITY_PASS_SHADOWCASTER
#pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2
# include "HLSLSupport.cginc"
#include "UnityCG.cginc"
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
sampler3D _DitherMaskLOD;
struct v2f
{
V2F_SHADOW_CASTER;
float3 worldPos : TEXCOORD6;
float4 tSpace0 : TEXCOORD1;
float4 tSpace1 : TEXCOORD2;
float4 tSpace2 : TEXCOORD3;
float4 texcoords01 : TEXCOORD4;
};
v2f vert( appdata_full v )
{
v2f o;
UNITY_INITIALIZE_OUTPUT( v2f, o );
float3 worldPos = mul( unity_ObjectToWorld, v.vertex ).xyz;
half3 worldNormal = UnityObjectToWorldNormal( v.normal );
fixed3 worldTangent = UnityObjectToWorldDir( v.tangent.xyz );
fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w;
fixed3 worldBinormal = cross( worldNormal, worldTangent ) * tangentSign;
o.tSpace0 = float4( worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x );
o.tSpace1 = float4( worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y );
o.tSpace2 = float4( worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z );
o.texcoords01 = float4( v.texcoord.xy, v.texcoord1.xy );
o.worldPos = worldPos;
TRANSFER_SHADOW_CASTER_NORMALOFFSET( o )
return o;
}
fixed4 frag( v2f IN ) : SV_Target
{
Input surfIN;
UNITY_INITIALIZE_OUTPUT( Input, surfIN );
surfIN.uv_texcoord = IN.texcoords01.xy;
float3 worldPos = IN.worldPos;
fixed3 worldViewDir = normalize( UnityWorldSpaceViewDir( worldPos ) );
SurfaceOutputStandard o;
UNITY_INITIALIZE_OUTPUT( SurfaceOutputStandard, o )
surf( surfIN, o );
SHADOW_CASTER_FRAGMENT( IN )
}
ENDCG
}
}
FallBack "Legacy Shaders/Transparent/Cutout/Bumped Diffuse"
}
@@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: 3eed4732656879043a425298da909c90
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -1,57 +0,0 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
// ============================================================
// Name: AtlasShader
// Author: Joen Joensen (@UnLogick)
// ============================================================
Shader "UMA/AtlasCutoutShader" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base Texture", 2D) = "white" {}
}
SubShader {
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
Pass
{
Tags { "LightMode" = "Vertex" }
Fog { Mode Off }
BlendOp Add, RevSub
Blend Zero One, One One
Lighting Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
float4 _Color;
sampler2D _MainTex;
struct v2f {
float4 pos : SV_POSITION;
float2 uv : TEXCOORD0;
};
float4 _MainTex_ST;
v2f vert (appdata_base v)
{
v2f o;
o.pos = UnityObjectToClipPos (v.vertex);
o.uv = TRANSFORM_TEX (v.texcoord, _MainTex);
return o;
}
half4 frag (v2f i) : COLOR
{
return half4(0, 0, 0, 1 - tex2D(_MainTex, i.uv).r);
}
ENDCG
}
}
Fallback "Transparent/VertexLit"
}
@@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: 6ec55823d603ee4478b56d3f0d7ce6bb
timeCreated: 1467918749
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -1,60 +0,0 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
// ============================================================
// Name: AtlasDetailNormalPostShader
// Author: Umut Ozkan
// This works in conjunction with the AtlasDetailNormalShader.
// ============================================================
Shader "UMA/AtlasDetailNormalPostShader" {
Properties{
_MainTex("Normalmap", 2D) = "bump" {}
}
SubShader
{
Pass
{
Tags{ "LightMode" = "Vertex" }
Fog{ Mode Off }
Blend off
Lighting Off
Cull Off
ZWrite Off
ZTest Always
CGPROGRAM
#pragma vertex vert_img
#pragma fragment frag
#include "UnityCG.cginc"
uniform sampler2D _MainTex;
inline float4 PACK_INTERNAL(half3 unpacked) {
#if defined(UNITY_NO_DXT5nm)
half4 packednormal;
packednormal.xyz = (unpacked.xyz + 1) / 2;
packednormal.w = 1;
return packednormal;
#else
half4 packednormal;
packednormal.wy = (unpacked.xy + 1) / 2;
packednormal.x = 1;
packednormal.z = 1;
return packednormal;
#endif
}
half4 frag(v2f_img i) : COLOR
{
half4 normal = tex2D(_MainTex, i.uv);
normal.z = sqrt(1 - saturate(dot(normal.xy, normal.xy)));
half3 normalized = normalize(normal.xyz);
return PACK_INTERNAL(normalized);
}
ENDCG
}
}
Fallback "Transparent/VertexLit"
}
@@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: 1cd76f272fa3efe4a802da9a48f7688f
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -1,81 +0,0 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
// ============================================================
// Name: AtlasShader
// Author: Umut Ozkan
// ============================================================
Shader "UMA/AtlasDetailShaderNormal" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_AdditiveColor ("Additive Color", Color) = (0,0,0,0)
_MainTex ("Normalmap", 2D) = "bump" {}
_ExtraTex ("mask", 2D) = "white" {}
}
SubShader
{
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
Pass
{
Tags{ "LightMode" = "Vertex" }
Fog{ Mode Off }
Blend One One
Lighting Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#include "UnityStandardUtils.cginc"
float4 _Color;
float4 _AdditiveColor;
sampler2D _MainTex;
sampler2D _ExtraTex;
struct v2f {
float4 pos : SV_POSITION;
float2 uv : TEXCOORD0;
};
float4 _MainTex_ST;
v2f vert(appdata_base v)
{
v2f o;
o.pos = UnityObjectToClipPos(v.vertex);
o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
return o;
}
half2 UNPACK_WITH_WEIGHT_INTERNAL(half4 packednormal, half bumpScale)
{
#if defined(UNITY_NO_DXT5nm)
half2 normal = half2(packednormal.xy * 2 - 1);
normal.xy *= bumpScale;
return normal;
#else
half2 result = half2(packednormal.wy * 2 - 1);
result.xy *= bumpScale;
return result;
#endif
}
// This atlas shader has Blend mode add
// It adds adds unpacked values of normal textures. The post process normalize and packs them
half4 frag(v2f i) : COLOR
{
half4 current = tex2D(_MainTex, i.uv);
half4 extra = tex2D(_ExtraTex, i.uv);
half2 n = UNPACK_WITH_WEIGHT_INTERNAL(current, min(extra.a, _Color.a));
// We only need 2 values to calculate normal. Post process will calculate the 3rd vector component
return half4(n.x, n.y, 0, 0);
}
ENDCG
}
}
Fallback "Transparent/VertexLit"
}
@@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: e5ba71eed666aef459dbb1dce2bc3d2f
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -1,63 +0,0 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
// ============================================================
// Name: AtlasShader
// Author: Joen Joensen (@UnLogick)
// ============================================================
Shader "UMA/AtlasDiffuseShader" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_AdditiveColor ("Additive Color", Color) = (0,0,0,0)
_MainTex ("Base Texture", 2D) = "white" {}
_ExtraTex ("mask", 2D) = "white" {}
}
SubShader {
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
Pass
{
Tags { "LightMode" = "Vertex" }
Fog { Mode Off }
BlendOp Add, Add
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
Lighting Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
float4 _Color;
float4 _AdditiveColor;
sampler2D _MainTex;
sampler2D _ExtraTex;
struct v2f {
float4 pos : SV_POSITION;
float2 uv : TEXCOORD0;
};
float4 _MainTex_ST;
v2f vert (appdata_base v)
{
v2f o;
o.pos = UnityObjectToClipPos (v.vertex);
o.uv = TRANSFORM_TEX (v.texcoord, _MainTex);
return o;
}
half4 frag (v2f i) : COLOR
{
half4 texcol = tex2D(_MainTex, i.uv);
half4 mask = tex2D(_ExtraTex, i.uv);
return half4(texcol.xyz, mask.w)*_Color+_AdditiveColor;
}
ENDCG
}
}
Fallback "Transparent/VertexLit"
}
@@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: ae83be5246f311646b3043ed012d9d64
timeCreated: 1467924405
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -1,71 +0,0 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
// ============================================================
// Name: AtlasShader
// Author: Joen Joensen (@UnLogick)
// ============================================================
Shader "UMA/AtlasShaderNormal" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_AdditiveColor ("Additive Color", Color) = (0,0,0,0)
_MainTex ("Normalmap", 2D) = "bump" {}
_ExtraTex ("mask", 2D) = "white" {}
}
SubShader
{
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
Pass
{
Tags{ "LightMode" = "Vertex" }
Fog{ Mode Off }
Blend SrcAlpha OneMinusSrcAlpha
Lighting Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#include "UnityStandardUtils.cginc"
float4 _Color;
float4 _AdditiveColor;
sampler2D _MainTex;
sampler2D _ExtraTex;
struct v2f {
float4 pos : SV_POSITION;
float2 uv : TEXCOORD0;
};
float4 _MainTex_ST;
v2f vert(appdata_base v)
{
v2f o;
o.pos = UnityObjectToClipPos(v.vertex);
o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
return o;
}
half4 frag(v2f i) : COLOR
{
half4 n = tex2D(_MainTex, i.uv);
half4 extra = tex2D(_ExtraTex, i.uv);
#if !defined(UNITY_NO_DXT5nm)
//swizzle the alpha and red channel, we will swizzle back in the post process SwizzleShader
n.r = n.a;
#endif
n.a = min(extra.a, _Color.a);
return n;
}
ENDCG
}
}
Fallback "Transparent/VertexLit"
}
@@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: 0c7937a991ef0764fb16577ebf24911e
timeCreated: 1426630728
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -1,102 +0,0 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
// ============================================================
// Name: AtlasShader
// Author: Joen Joensen (@UnLogick)
// ============================================================
Shader "UMA/AtlasShaderNormal32" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_AdditiveColor ("Additive Color", Color) = (0,0,0,0)
_MainTex ("Normalmap", 2D) = "bump" {}
_ExtraTex ("mask", 2D) = "white" {}
}
SubShader {
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
Pass
{
Tags { "LightMode" = "Vertex" }
Fog { Mode Off }
Blend Zero SrcAlpha
Lighting Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
float4 _Color;
float4 _AdditiveColor;
sampler2D _MainTex;
sampler2D _ExtraTex;
struct v2f {
float4 pos : SV_POSITION;
float2 uv : TEXCOORD0;
};
float4 _MainTex_ST;
v2f vert (appdata_base v)
{
v2f o;
o.pos = UnityObjectToClipPos (v.vertex);
o.uv = TRANSFORM_TEX (v.texcoord, _MainTex);
return o;
}
half4 frag (v2f i) : COLOR
{
half4 maskcol = tex2D (_ExtraTex, i.uv);
float value = 1 - maskcol.a;
return half4(value, value, value, value);
}
ENDCG
}
Pass
{
Tags { "LightMode" = "Vertex" }
Fog { Mode Off }
Blend One One
Lighting Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
float4 _Color;
float4 _AdditiveColor;
sampler2D _MainTex;
sampler2D _ExtraTex;
struct v2f {
float4 pos : SV_POSITION;
float2 uv : TEXCOORD0;
};
float4 _MainTex_ST;
v2f vert (appdata_base v)
{
v2f o;
o.pos = UnityObjectToClipPos (v.vertex);
o.uv = TRANSFORM_TEX (v.texcoord, _MainTex);
return o;
}
half4 frag (v2f i) : COLOR
{
half4 texcol = tex2D (_MainTex, i.uv) * _Color + _AdditiveColor;
half4 maskcol = tex2D (_ExtraTex, i.uv);
return texcol * maskcol.a;
}
ENDCG
}
}
Fallback "Transparent/VertexLit"
}
@@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: f001376c60e187e48ba6139415f60d3a
timeCreated: 1536937299
licenseType: Store
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -1,102 +0,0 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
// ============================================================
// Name: AtlasShader
// Author: Joen Joensen (@UnLogick)
// ============================================================
Shader "UMA/AtlasShaderNew" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_AdditiveColor ("Additive Color", Color) = (0,0,0,0)
_MainTex ("Base Texture", 2D) = "white" {}
_ExtraTex ("mask", 2D) = "white" {}
}
SubShader {
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
Pass
{
Tags { "LightMode" = "Vertex" }
Fog { Mode Off }
Blend Zero SrcAlpha
Lighting Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
float4 _Color;
float4 _AdditiveColor;
sampler2D _MainTex;
sampler2D _ExtraTex;
struct v2f {
float4 pos : SV_POSITION;
float2 uv : TEXCOORD0;
};
float4 _MainTex_ST;
v2f vert (appdata_base v)
{
v2f o;
o.pos = UnityObjectToClipPos (v.vertex);
o.uv = TRANSFORM_TEX (v.texcoord, _MainTex);
return o;
}
half4 frag (v2f i) : COLOR
{
half4 maskcol = tex2D (_ExtraTex, i.uv);
float value = 1 - maskcol.a;
return half4(value, value, value, value);
}
ENDCG
}
Pass
{
Tags { "LightMode" = "Vertex" }
Fog { Mode Off }
Blend One One
Lighting Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
float4 _Color;
float4 _AdditiveColor;
sampler2D _MainTex;
sampler2D _ExtraTex;
struct v2f {
float4 pos : SV_POSITION;
float2 uv : TEXCOORD0;
};
float4 _MainTex_ST;
v2f vert (appdata_base v)
{
v2f o;
o.pos = UnityObjectToClipPos (v.vertex);
o.uv = TRANSFORM_TEX (v.texcoord, _MainTex);
return o;
}
half4 frag (v2f i) : COLOR
{
half4 texcol = tex2D (_MainTex, i.uv) * _Color + _AdditiveColor;
half4 maskcol = tex2D (_ExtraTex, i.uv);
return texcol * maskcol.a;
}
ENDCG
}
}
Fallback "Transparent/VertexLit"
}
@@ -1,5 +0,0 @@
fileFormatVersion: 2
guid: 8179a5383e28f6840a80314368b93979
ShaderImporter:
defaultTextures: []
userData:
@@ -1,50 +0,0 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
// ============================================================
// Name: NormalSwizzleShader
// Author: Kenan Chabuk (@Kenamis)
// This works in conjunction with the AtlasNormalShader that swizzles the alpha to red channel of the packed normal and blends them.
// Then this post effect re-swizzles the normal into the packed format for use with standard shaders.
// ============================================================
Shader "UMA/NormalSwizzleShader" {
Properties{
_MainTex("Normalmap", 2D) = "bump" {}
}
SubShader
{
Pass
{
Tags{ "LightMode" = "Vertex" }
Fog{ Mode Off }
Blend off
Lighting Off
Cull Off
ZWrite Off
ZTest Always
CGPROGRAM
#pragma vertex vert_img
#pragma fragment frag
#include "UnityCG.cginc"
uniform sampler2D _MainTex;
half4 frag(v2f_img i) : COLOR
{
half4 r = tex2D(_MainTex, i.uv);
//G and A are the important ones.
#if defined(UNITY_NO_DXT5nm)
return half4(r.r, r.g, r.b, 0);
#else
return half4(1, r.y, 1, r.x);
#endif
}
ENDCG
}
}
Fallback "Transparent/VertexLit"
}
@@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: 4ba4fc977756a804ca835788b496e3f7
timeCreated: 1546899607
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -1,32 +0,0 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "!Debug/Normals" {
SubShader {
Pass {
Fog { Mode Off }
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
// vertex input: position, normal
struct appdata {
float4 vertex : POSITION;
float3 normal : NORMAL;
};
struct v2f {
float4 pos : SV_POSITION;
fixed4 color : COLOR;
};
v2f vert (appdata v) {
v2f o;
o.pos = UnityObjectToClipPos( v.vertex );
o.color.xyz = v.normal * 0.5 + 0.5;
o.color.w = 1.0;
return o;
}
fixed4 frag (v2f i) : COLOR0 { return i.color; }
ENDCG
}
}
}
@@ -1,5 +0,0 @@
fileFormatVersion: 2
guid: 8731a0917521bdc4cab8332f64b79f3c
ShaderImporter:
defaultTextures: []
userData:
@@ -1,31 +0,0 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "!Debug/Tangents" {
SubShader {
Pass {
Fog { Mode Off }
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
// vertex input: position, tangent
struct appdata {
float4 vertex : POSITION;
float4 tangent : TANGENT;
};
struct v2f {
float4 pos : SV_POSITION;
fixed4 color : COLOR;
};
v2f vert (appdata v) {
v2f o;
o.pos = UnityObjectToClipPos( v.vertex );
o.color = v.tangent * 0.5 + 0.5;
return o;
}
fixed4 frag (v2f i) : COLOR0 { return i.color; }
ENDCG
}
}
}
@@ -1,5 +0,0 @@
fileFormatVersion: 2
guid: 9517a51ab08587e4c9b2454b2c9a43ef
ShaderImporter:
defaultTextures: []
userData: