We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00ded2e commit 2c7d7c8Copy full SHA for 2c7d7c8
abyss.shader
@@ -0,0 +1,40 @@
1
+Shader "Abyss"
2
+{
3
+ Properties
4
+ {
5
+ _intensity ("Intensity",Float) = 1.0
6
+ }
7
+ Subshader
8
9
+ Pass
10
11
+ CGPROGRAM
12
+ #pragma vertex vertex_shader
13
+ #pragma fragment pixel_shader
14
+ #pragma target 3.0
15
+
16
+ float _intensity;
17
18
+ struct custom_type
19
20
+ float4 vertex : SV_POSITION;
21
+ float2 uv : TEXCOORD0;
22
+ };
23
24
+ custom_type vertex_shader (float4 vertex:POSITION, float2 uv:TEXCOORD0)
25
26
+ custom_type vs;
27
+ vs.vertex = mul (UNITY_MATRIX_MVP,vertex);
28
+ vs.uv = uv;
29
+ return vs;
30
31
32
+ float4 pixel_shader (custom_type ps) : COLOR
33
34
+ float t = pow(ps.uv.y,_intensity);
35
+ return float4(t,t,t,1.0);
36
37
+ ENDCG
38
39
40
+}
0 commit comments