Created
August 19, 2020 22:00
-
-
Save psuong/7e01072df4017d621910ac313194d419 to your computer and use it in GitHub Desktop.
ClippedOpaqueMatrix.shader
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Inwards/URP/ClippedOpaque_Matrix_URP_V2" | |
{ | |
Properties | |
{ | |
// Specular vs Metallic workflow | |
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0 | |
[MainColor] _BaseColor("Color", Color) = (0.5,0.5,0.5,1) | |
[MainTexture] _BaseMap("Albedo", 2D) = "white" {} | |
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 | |
// Blending state | |
[HideInInspector] _Surface("__surface", Float) = 0.0 | |
[HideInInspector] _Blend("__blend", Float) = 0.0 | |
[Enum(Off, 0, On, 1)] _AlphaClip ("Clip", Float) = 1 | |
[Enum(Off, 0, On, 1)] _ZWrite ("Z Write", Float) = 1 | |
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("Src Blend", Float) = 1 | |
[Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("Dst Blend", Float) = 0 | |
[Enum(Off, 0, Front, 1, Back, 2)] _Cull("Cull", Float) = 0 | |
[HideInInspector] _ReceiveShadows("Receive Shadows", Float) = 1.0 | |
// Editmode props | |
[HideInInspector] _QueueOffset("Queue offset", Float) = 0.0 | |
} | |
SubShader | |
{ | |
Tags | |
{ | |
"RenderType" = "Opaque" | |
"RenderPipeline" = "UniversalRenderPipeline" | |
"IgnoreProjector" = "True" | |
} | |
LOD 150 | |
Pass | |
{ | |
Name "ClippedOpaque_Matrix" | |
Tags | |
{ | |
"LightMode" = "UniversalForward" | |
} | |
Blend[_SrcBlend][_DstBlend] | |
ZWrite[_ZWrite] | |
Cull [_Cull] | |
HLSLPROGRAM | |
#pragma prefer_hlslcc gles | |
#pragma exclude_renderers d3d11_9x | |
#pragma target 4.5 | |
// ------------------------------------- | |
// Material Keywords | |
// unused shader_feature variants are stripped from build automatically | |
// #pragma shader_feature _NORMALMAP | |
#pragma shader_feature _ALPHATEST_ON | |
#pragma shader_feature _ALPHAPREMULTIPLY_ON | |
#pragma shader_feature _COMPUTE | |
// ------------------------------------- | |
// Universal Render Pipeline keywords | |
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS | |
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE | |
#pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS | |
#pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS | |
#pragma multi_compile _ _SHADOWS_SOFT | |
#pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE | |
// ------------------------------------- | |
// Unity defined keywords | |
#pragma multi_compile _ DIRLIGHTMAP_COMBINED | |
#pragma multi_compile _ LIGHTMAP_ON | |
#pragma multi_compile_fog | |
//-------------------------------------- | |
// GPU Instancing | |
// #pragma multi_compile_instancing | |
// #pragma require compute | |
// #pragma instancing_options procedural:setup | |
#pragma vertex LitVertexPass | |
#pragma fragment LitFragmentPass | |
#include "ClippedOpaque.hlsl" | |
ENDHLSL | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment