117 lines
5.7 KiB
GLSL
117 lines
5.7 KiB
GLSL
Shader "EasyRoads3D/ER Road" {
|
|
Properties {
|
|
[HideInInspector] _AlphaCutoff ("Alpha Cutoff ", Range(0, 1)) = 0.5
|
|
[Space] [Header(Main Maps)] [Space] _MainTex ("Albedo", 2D) = "white" {}
|
|
_Color ("Color", Vector) = (1,1,1,1)
|
|
_Metallic ("Metallic (R) AO (G) Smoothness (A)", 2D) = "gray" {}
|
|
_MainMetallicPower ("Metallic Power", Range(0, 2)) = 0
|
|
_MainSmoothnessPower ("Smoothness Power", Range(0, 2)) = 1
|
|
_OcclusionStrength ("Ambient Occlusion Power", Range(0, 2)) = 1
|
|
_BumpMap ("Normal Map", 2D) = "bump" {}
|
|
_BumpScale ("Normal Map Scale", Range(0, 4)) = 1
|
|
[Space] [Header(Terrain Z Fighting Offset)] [Space] _OffsetFactor ("Offset Factor", Range(-10, 0)) = -1
|
|
_OffsetUnit ("Offset Unit", Range(-10, 0)) = -1
|
|
[HideInInspector] _texcoord ("", 2D) = "white" {}
|
|
[HideInInspector] _RenderQueueType ("Render Queue Type", Float) = 5
|
|
[ToggleUI] [HideInInspector] _AddPrecomputedVelocity ("Add Precomputed Velocity", Float) = 1
|
|
[ToggleUI] [HideInInspector] _SupportDecals ("Support Decals", Float) = 1
|
|
[HideInInspector] _StencilRef ("Stencil Ref", Float) = 0
|
|
[HideInInspector] _StencilWriteMask ("Stencil Write Mask", Float) = 3
|
|
[HideInInspector] _StencilRefDepth ("Stencil Ref Depth", Float) = 0
|
|
[HideInInspector] _StencilWriteMaskDepth ("Stencil Write Mask Depth", Float) = 8
|
|
[HideInInspector] _StencilRefMV ("Stencil Ref MV", Float) = 32
|
|
[HideInInspector] _StencilWriteMaskMV ("Stencil Write Mask MV", Float) = 32
|
|
[HideInInspector] _StencilRefDistortionVec ("Stencil Ref Distortion Vec", Float) = 4
|
|
[HideInInspector] _StencilWriteMaskDistortionVec ("Stencil Write Mask Distortion Vec", Float) = 4
|
|
[HideInInspector] _StencilWriteMaskGBuffer ("Stencil Write Mask GBuffer", Float) = 3
|
|
[HideInInspector] _StencilRefGBuffer ("Stencil Ref GBuffer", Float) = 2
|
|
[HideInInspector] _ZTestGBuffer ("ZTest GBuffer", Float) = 4
|
|
[ToggleUI] [HideInInspector] _RequireSplitLighting ("Require Split Lighting", Float) = 0
|
|
[ToggleUI] [HideInInspector] _ReceivesSSR ("Receives SSR", Float) = 1
|
|
[ToggleUI] [HideInInspector] _ReceivesSSRTransparent ("Receives SSR Transparent", Float) = 0
|
|
[HideInInspector] _SurfaceType ("Surface Type", Float) = 1
|
|
[HideInInspector] _BlendMode ("Blend Mode", Float) = 0
|
|
[HideInInspector] _SrcBlend ("Src Blend", Float) = 1
|
|
[HideInInspector] _DstBlend ("Dst Blend", Float) = 0
|
|
[HideInInspector] _AlphaSrcBlend ("Alpha Src Blend", Float) = 1
|
|
[HideInInspector] _AlphaDstBlend ("Alpha Dst Blend", Float) = 0
|
|
[ToggleUI] [HideInInspector] _ZWrite ("ZWrite", Float) = 0
|
|
[ToggleUI] [HideInInspector] _TransparentZWrite ("Transparent ZWrite", Float) = 0
|
|
[HideInInspector] _CullMode ("Cull Mode", Float) = 2
|
|
[HideInInspector] _TransparentSortPriority ("Transparent Sort Priority", Float) = 0
|
|
[ToggleUI] [HideInInspector] _EnableFogOnTransparent ("Enable Fog", Float) = 1
|
|
[HideInInspector] _CullModeForward ("Cull Mode Forward", Float) = 2
|
|
[Enum(UnityEditor.Rendering.HighDefinition.TransparentCullMode)] [HideInInspector] _TransparentCullMode ("Transparent Cull Mode", Float) = 2
|
|
[HideInInspector] _ZTestDepthEqualForOpaque ("ZTest Depth Equal For Opaque", Float) = 4
|
|
[Enum(UnityEngine.Rendering.CompareFunction)] [HideInInspector] _ZTestTransparent ("ZTest Transparent", Float) = 4
|
|
[ToggleUI] [HideInInspector] _TransparentBackfaceEnable ("Transparent Backface Enable", Float) = 0
|
|
[ToggleUI] [HideInInspector] _AlphaCutoffEnable ("Alpha Cutoff Enable", Float) = 0
|
|
[ToggleUI] [HideInInspector] _UseShadowThreshold ("Use Shadow Threshold", Float) = 0
|
|
[ToggleUI] [HideInInspector] _DoubleSidedEnable ("Double Sided Enable", Float) = 0
|
|
[Enum(Flip, 0, Mirror, 1, None, 2)] [HideInInspector] _DoubleSidedNormalMode ("Double Sided Normal Mode", Float) = 2
|
|
[HideInInspector] _DoubleSidedConstants ("DoubleSidedConstants", Vector) = (1,1,-1,0)
|
|
[ToggleUI] [HideInInspector] _TransparentWritingMotionVec ("Transparent Writing MotionVec", Float) = 0
|
|
[Enum(UnityEditor.Rendering.HighDefinition.OpaqueCullMode)] [HideInInspector] _OpaqueCullMode ("Opaque Cull Mode", Float) = 2
|
|
[ToggleUI] [HideInInspector] _EnableBlendModePreserveSpecularLighting ("Enable Blend Mode Preserve Specular Lighting", Float) = 1
|
|
[HideInInspector] _EmissionColor ("Color", Vector) = (1,1,1,1)
|
|
[HideInInspector] [NoScaleOffset] unity_Lightmaps ("unity_Lightmaps", 2DArray) = "" {}
|
|
[HideInInspector] [NoScaleOffset] unity_LightmapsInd ("unity_LightmapsInd", 2DArray) = "" {}
|
|
[HideInInspector] [NoScaleOffset] unity_ShadowMasks ("unity_ShadowMasks", 2DArray) = "" {}
|
|
[Enum(Auto, 0, On, 1, Off, 2)] [HideInInspector] _DoubleSidedGIMode ("Double sided GI mode", Float) = 0
|
|
[ToggleUI] [HideInInspector] _AlphaToMaskInspectorValue ("_AlphaToMaskInspectorValue", Float) = 0
|
|
[ToggleUI] [HideInInspector] _AlphaToMask ("__alphaToMask", Float) = 0
|
|
}
|
|
//DummyShaderTextExporter
|
|
SubShader{
|
|
Tags { "RenderType"="Opaque" }
|
|
LOD 200
|
|
|
|
Pass
|
|
{
|
|
HLSLPROGRAM
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
|
|
float4x4 unity_ObjectToWorld;
|
|
float4x4 unity_MatrixVP;
|
|
float4 _MainTex_ST;
|
|
|
|
struct Vertex_Stage_Input
|
|
{
|
|
float4 pos : POSITION;
|
|
float2 uv : TEXCOORD0;
|
|
};
|
|
|
|
struct Vertex_Stage_Output
|
|
{
|
|
float2 uv : TEXCOORD0;
|
|
float4 pos : SV_POSITION;
|
|
};
|
|
|
|
Vertex_Stage_Output vert(Vertex_Stage_Input input)
|
|
{
|
|
Vertex_Stage_Output output;
|
|
output.uv = (input.uv.xy * _MainTex_ST.xy) + _MainTex_ST.zw;
|
|
output.pos = mul(unity_MatrixVP, mul(unity_ObjectToWorld, input.pos));
|
|
return output;
|
|
}
|
|
|
|
Texture2D<float4> _MainTex;
|
|
SamplerState sampler_MainTex;
|
|
float4 _Color;
|
|
|
|
struct Fragment_Stage_Input
|
|
{
|
|
float2 uv : TEXCOORD0;
|
|
};
|
|
|
|
float4 frag(Fragment_Stage_Input input) : SV_TARGET
|
|
{
|
|
return _MainTex.Sample(sampler_MainTex, input.uv.xy) * _Color;
|
|
}
|
|
|
|
ENDHLSL
|
|
}
|
|
}
|
|
//CustomEditor "Rendering.HighDefinition.LitShaderGraphGUI"
|
|
} |