74 lines
2.5 KiB
GLSL
74 lines
2.5 KiB
GLSL
Shader "GPUInstancer/Tobyfredson/Grass Foliage" {
|
|
Properties {
|
|
_Cutoff ("Mask Clip Value", Float) = 0.4
|
|
_AlbedoColor ("Albedo Color", Vector) = (1,1,1,0)
|
|
_AlbedoLightness ("Albedo Lightness", Range(0, 5)) = 1
|
|
[Toggle(_COLORVARIATION_ON)] _ColorVariation ("Color Variation", Float) = 0
|
|
_GrassColorVariation ("Grass Color Variation", Range(0, 5)) = 0.6
|
|
[NoScaleOffset] _AlbedoMap ("Albedo Map", 2D) = "white" {}
|
|
[NoScaleOffset] _NormalMap ("Normal Map", 2D) = "bump" {}
|
|
_NormalIntensity ("Normal Intensity", Range(-3, 3)) = 0
|
|
[Toggle(_NORMALBACKFACEFIXBRANCH_ON)] _NormalBackFaceFixBranch ("Normal BackFace Fix (Branch)", Float) = 0
|
|
[NoScaleOffset] _MaskMap ("Mask Map", 2D) = "white" {}
|
|
_SpecularPower ("Specular Power", Range(0, 1)) = 0
|
|
_SmoothnessIntensity ("Smoothness Intensity", Float) = 1
|
|
_TranslucencyColor ("Translucency Color", Vector) = (0.5,0.5,0.5,0)
|
|
_TranslucencyPower ("Translucency Power", Range(0, 40)) = 8
|
|
_TranslucencyRange ("Translucency Range", Float) = 1
|
|
_AmbientOcclusion ("Ambient Occlusion", Range(0, 1)) = 1
|
|
[Toggle(_VERTEXAO_ON)] _VertexAo ("Vertex Ao", Float) = 1
|
|
_VertexAointensity ("Vertex Ao intensity", Range(0, 1)) = 0
|
|
_GlobalWindPower ("Global Wind Power", Range(0, 1)) = 1
|
|
_WindSpeed ("Wind Speed", Range(0, 2)) = 1
|
|
_WindPower ("Wind Power", Range(0, 0.9)) = 1
|
|
_FlutterFrequency ("Flutter Frequency", Range(0, 5)) = 2
|
|
_WindAnglexz ("Wind Angle (xz)", Range(-200, 200)) = 20
|
|
_WindAngley ("Wind Angle (y)", Range(-100, 100)) = 20
|
|
[Toggle(_FADEONOFF_ON)] _FadeOnOff ("Fade On/Off", Float) = 0
|
|
_CutoutAlphalOD ("Cutout Alpha lOD", Float) = 1
|
|
_CameraLength ("Camera Length", Float) = 0
|
|
_CameraOffset ("Camera Offset", Float) = 0
|
|
[HideInInspector] _texcoord ("", 2D) = "white" {}
|
|
[HideInInspector] __dirty ("", Float) = 1
|
|
}
|
|
//DummyShaderTextExporter
|
|
SubShader{
|
|
Tags { "RenderType" = "Opaque" }
|
|
LOD 200
|
|
|
|
Pass
|
|
{
|
|
HLSLPROGRAM
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
|
|
float4x4 unity_ObjectToWorld;
|
|
float4x4 unity_MatrixVP;
|
|
|
|
struct Vertex_Stage_Input
|
|
{
|
|
float4 pos : POSITION;
|
|
};
|
|
|
|
struct Vertex_Stage_Output
|
|
{
|
|
float4 pos : SV_POSITION;
|
|
};
|
|
|
|
Vertex_Stage_Output vert(Vertex_Stage_Input input)
|
|
{
|
|
Vertex_Stage_Output output;
|
|
output.pos = mul(unity_MatrixVP, mul(unity_ObjectToWorld, input.pos));
|
|
return output;
|
|
}
|
|
|
|
float4 frag(Vertex_Stage_Output input) : SV_TARGET
|
|
{
|
|
return float4(1.0, 1.0, 1.0, 1.0); // RGBA
|
|
}
|
|
|
|
ENDHLSL
|
|
}
|
|
}
|
|
Fallback "Diffuse"
|
|
} |