72 lines
1.8 KiB
Plaintext
72 lines
1.8 KiB
Plaintext
Shader "FX/Water GrabPass" {
|
|
Properties {
|
|
_TintColor ("Tint Color", Vector) = (0.5,0.5,0.5,0.5)
|
|
_MainTex ("Base Texture", 2D) = "white" {}
|
|
_HeightTex ("Bump Texture", 2D) = "bump" {}
|
|
_FoamTex ("Foam Texture", 2D) = "white" {}
|
|
_CubeTex ("_CubeTex", Cube) = "white" {}
|
|
_Refractivity ("_Refractivity", Range(0.1, 100)) = 1
|
|
_Ambient ("_Ambient", Range(0, 1)) = 0.8
|
|
_Shininess ("_Shininess", Range(0.1, 60)) = 1
|
|
_SpecColor ("Spec Color", Vector) = (0.5,0.5,0.5,0.5)
|
|
_Displacement ("_Displacement", Range(0, 2)) = 1
|
|
_DisplacementTiling ("_DisplacementTiling", Range(0.1, 4)) = 1
|
|
_InvFade ("_InvFade", Range(0.05, 5)) = 1
|
|
_InvFadeFoam ("_InvFadeFoam", Range(0.05, 5)) = 1
|
|
_FresnelPower ("_FresnelPower", Range(0.1, 10)) = 2
|
|
_ColorTextureOverlay ("_ColorTextureOverlay", Range(0, 1)) = 0.75
|
|
_WorldLightDir ("_WorldLightDir", Vector) = (0,0,0,1)
|
|
_Speed ("_Speed", Range(0, 10)) = 0.8
|
|
}
|
|
//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;
|
|
|
|
struct Fragment_Stage_Input
|
|
{
|
|
float2 uv : TEXCOORD0;
|
|
};
|
|
|
|
float4 frag(Fragment_Stage_Input input) : SV_TARGET
|
|
{
|
|
return _MainTex.Sample(sampler_MainTex, input.uv.xy);
|
|
}
|
|
|
|
ENDHLSL
|
|
}
|
|
}
|
|
} |