80 lines
2.4 KiB
GLSL
80 lines
2.4 KiB
GLSL
Shader "GPUInstancer/NatureManufacture Shaders/Trees/Tree Bark Specular" {
|
|
Properties {
|
|
_Color ("Color", Vector) = (1,1,1,0)
|
|
_MainTex ("MainTex", 2D) = "white" {}
|
|
[NoScaleOffset] _BumpMap ("BumpMap", 2D) = "bump" {}
|
|
_BumpScale ("BumpScale", Range(0, 5)) = 1
|
|
[NoScaleOffset] _SpecularRGBSmothnessA ("Specular (RGB) Smothness (A)", 2D) = "white" {}
|
|
_SpecularPower ("Specular Power", Range(0, 2)) = 0
|
|
_SmoothnessPower ("Smoothness Power", Range(0, 2)) = 0
|
|
[NoScaleOffset] _AmbientOcclusionG ("Ambient Occlusion (G)", 2D) = "white" {}
|
|
_AmbientOcclusionPower ("Ambient Occlusion Power", Range(0, 1)) = 1
|
|
_DetailMask ("DetailMask", 2D) = "black" {}
|
|
_DetailAlbedoMap ("DetailAlbedoMap", 2D) = "white" {}
|
|
[NoScaleOffset] _DetailNormal ("Detail Normal", 2D) = "bump" {}
|
|
[Toggle(_DETALUSEUV3_ON)] _DetalUseUV3 ("Detal Use UV3", Float) = 0
|
|
_DetailNormalMapScale ("DetailNormalMapScale", Range(0, 5)) = 1
|
|
[NoScaleOffset] _DetailSpecularRGBSmothnessA ("Detail Specular (RGB) Smothness (A)", 2D) = "white" {}
|
|
[NoScaleOffset] _DetailAmbientOcclusionG ("Detail Ambient Occlusion (G)", 2D) = "white" {}
|
|
_InitialBend ("Wind Initial Bend", Float) = 1
|
|
_Stiffness ("Wind Stiffness", Float) = 1
|
|
_Drag ("Wind Drag", Float) = 1
|
|
[Toggle(_TOUCHREACTACTIVE_ON)] _TouchReactActive ("TouchReactActive", Float) = 0
|
|
[HideInInspector] _texcoord ("", 2D) = "white" {}
|
|
[HideInInspector] _texcoord3 ("", 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;
|
|
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
|
|
}
|
|
}
|
|
Fallback "Diffuse"
|
|
} |