rabidus-test/Assets/Amazing Assets/Curved World/Shaders/Templates/Terrain/WavingGrass.txt

169 lines
4.9 KiB
Plaintext
Raw Normal View History

2023-10-02 19:12:35 +03:00
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
Shader "Hidden/Amazing Assets/Curved World/TerrainEngine/#BEND_NAME_SMALL# ID #ID#/Details/UniversalPipeline/WavingDoublePass/"
{
Properties
{
_WavingTint ("Fade Color", Color) = (.7,.6,.5, 0)
_MainTex ("Base (RGB) Alpha (A)", 2D) = "white" {}
_WaveAndDistance ("Wave and distance", Vector) = (12, 3.6, 1, 1)
_Cutoff ("Cutoff", float) = 0.5
}
SubShader
{
Tags {"Queue" = "Geometry+200" "RenderType" = "Grass" "IgnoreProjector" = "True" "RenderPipeline" = "UniversalPipeline" }//"DisableBatching"="True"
Cull Off
LOD 200
AlphaTest Greater [_Cutoff]
ColorMask RGB
Pass
{
HLSLPROGRAM
// Required to compile gles 2.0 with standard srp library
#pragma prefer_hlslcc gles
#pragma exclude_renderers d3d11_9x
#pragma target 2.0
// -------------------------------------
// Universal 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 vertex WavingGrassVert
#pragma fragment LitPassFragmentGrass
#define _ALPHATEST_ON
#include "Packages/com.unity.render-pipelines.universal/Shaders/Terrain/WavingGrassInput.hlsl"
#define CURVEDWORLD_BEND_TYPE_#BEND_NAME_BIG#
#define CURVEDWORLD_BEND_ID_#ID#
#include "../WavingGrassPasses.hlsl"
ENDHLSL
}
Pass
{
Tags{"LightMode" = "DepthOnly"}
ZWrite On
ColorMask 0
Cull Off
HLSLPROGRAM
// Required to compile gles 2.0 with standard srp library
#pragma prefer_hlslcc gles
#pragma exclude_renderers d3d11_9x
#pragma target 2.0
#pragma vertex DepthOnlyVertex
#pragma fragment DepthOnlyFragment
// -------------------------------------
// Material Keywords
#define _ALPHATEST_ON
#pragma shader_feature _GLOSSINESS_FROM_BASE_ALPHA
//--------------------------------------
// GPU Instancing
#pragma multi_compile_instancing
#include "Packages/com.unity.render-pipelines.universal/Shaders/Terrain/WavingGrassInput.hlsl"
#define CURVEDWORLD_BEND_TYPE_#BEND_NAME_BIG#
#define CURVEDWORLD_BEND_ID_#ID#
#include "../WavingGrassPasses.hlsl"
ENDHLSL
}
//PassName "ScenePickingPass"
Pass
{
Name "ScenePickingPass"
Tags { "LightMode" = "Picking" }
BlendOp Add
Blend One Zero
ZWrite On
Cull Off
CGPROGRAM
#include "HLSLSupport.cginc"
#include "UnityShaderVariables.cginc"
#include "UnityShaderUtilities.cginc"
#pragma target 3.0
#pragma shader_feature _ALPHATEST_ON
#pragma shader_feature _ALPHAPREMULTIPLY_ON
#pragma multi_compile_instancing
#pragma vertex vertEditorPass
#pragma fragment fragScenePickingPass
#define CURVEDWORLD_BEND_TYPE_#BEND_NAME_BIG#
#define CURVEDWORLD_BEND_ID_#ID#
#include "../../../Core/SceneSelection.cginc"
ENDCG
} //Pass "ScenePickingPass"
//PassName "SceneSelectionPass"
Pass
{
Name "SceneSelectionPass"
Tags { "LightMode" = "SceneSelectionPass" }
BlendOp Add
Blend One Zero
ZWrite On
Cull Off
CGPROGRAM
#include "HLSLSupport.cginc"
#include "UnityShaderVariables.cginc"
#include "UnityShaderUtilities.cginc"
#pragma target 3.0
#pragma shader_feature _ALPHATEST_ON
#pragma shader_feature _ALPHAPREMULTIPLY_ON
#pragma multi_compile_instancing
#pragma vertex vertEditorPass
#pragma fragment fragSceneHighlightPass
#define CURVEDWORLD_BEND_TYPE_#BEND_NAME_BIG#
#define CURVEDWORLD_BEND_ID_#ID#
#include "../../../Core/SceneSelection.cginc"
ENDCG
} //Pass "SceneSelectionPass"
}
}