Bit of Terrain but also changed cameras
This commit is contained in:
1 parent
b774e84175
commit
251749e617
523 files changed
+16906
-27
No files matched your search
@@ -0,0 +1,60 @@
|
||||
// Simplified Diffuse shader. Differences from regular Diffuse one:
|
||||
// - no Main Color
|
||||
// - fully supports only 1 directional light. Other lights can affect it, but it will be per-vertex/SH.
|
||||
|
||||
Shader "Lava Flowing Shader/Diffuse/Distort"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_DistortX ("Distortion in X", Range (0,2)) = 1
|
||||
_DistortY ("Distortion in Y", Range (0,2)) = 0
|
||||
_MainTex ("_MainTex RGBA", 2D) = "white" {}
|
||||
_Distort ("_Distort A", 2D) = "white" {}
|
||||
_LavaTex ("_LavaTex RGB", 2D) = "white" {}
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 150
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf Lambert noforwardadd
|
||||
|
||||
sampler2D _MainTex;
|
||||
sampler2D _Distort;
|
||||
sampler2D _LavaTex;
|
||||
fixed _DistortX;
|
||||
fixed _DistortY;
|
||||
|
||||
struct Input
|
||||
{
|
||||
float2 uv2_LavaTex;
|
||||
float2 uv_MainTex;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o)
|
||||
{
|
||||
fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
|
||||
fixed distort = tex2D(_Distort, IN.uv_MainTex).a;
|
||||
|
||||
fixed2 uv_scroll;
|
||||
uv_scroll = fixed2(IN.uv2_LavaTex.x-distort*_DistortX,IN.uv2_LavaTex.y-distort*_DistortY);
|
||||
|
||||
fixed4 tex2 = tex2D(_LavaTex,uv_scroll);
|
||||
c.rgb = lerp(tex2.rgb,c.rgb,c.a);
|
||||
|
||||
o.Albedo = c.rgb;
|
||||
|
||||
//Use the below two lines if you want the rock part be diffuse but lava part is unlit
|
||||
//o.Albedo = c.rgb*c.a;
|
||||
//o.Emission = c.rgb*(1-c.a);
|
||||
|
||||
|
||||
o.Alpha = c.a;
|
||||
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Fallback "Mobile/VertexLit"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 036402a4b0d5f4342bbf1b572714f64e
|
||||
timeCreated: 1469219369
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,71 @@
|
||||
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
|
||||
|
||||
Shader "Lava Flowing Shader/Unlit/Distort"
|
||||
{
|
||||
Properties {
|
||||
//_Color ("Main Color", Color) = (1,1,1)
|
||||
_DistortX ("Distortion in X", Range (0,2)) = 1
|
||||
_DistortY ("Distortion in Y", Range (0,2)) = 0
|
||||
_MainTex ("_MainTex RGBA", 2D) = "white" {}
|
||||
_Distort ("_Distort A", 2D) = "white" {}
|
||||
_LavaTex ("_LavaTex RGB", 2D) = "white" {}
|
||||
}
|
||||
|
||||
Category {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
|
||||
Lighting Off
|
||||
|
||||
SubShader {
|
||||
Pass {
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
sampler2D _MainTex;
|
||||
sampler2D _Distort;
|
||||
sampler2D _LavaTex;
|
||||
|
||||
struct appdata_t {
|
||||
fixed4 vertex : POSITION;
|
||||
fixed2 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f {
|
||||
fixed4 vertex : SV_POSITION;
|
||||
fixed2 texcoord : TEXCOORD0;
|
||||
fixed2 texcoord1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
fixed4 _MainTex_ST;
|
||||
fixed4 _LavaTex_ST;
|
||||
|
||||
fixed _DistortX;
|
||||
fixed _DistortY;
|
||||
|
||||
v2f vert (appdata_t v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
|
||||
o.texcoord1 = TRANSFORM_TEX(v.texcoord,_LavaTex);
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
fixed4 tex = tex2D(_MainTex, i.texcoord);
|
||||
fixed distort = tex2D(_Distort, i.texcoord).a;
|
||||
fixed4 tex2 = tex2D(_LavaTex, fixed2(i.texcoord1.x-distort*_DistortX,i.texcoord1.y-distort*_DistortY));
|
||||
tex = lerp(tex2,tex,tex.a);
|
||||
|
||||
return tex;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a151f652f5ba03458e9a7cd03ae88e8
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,72 @@
|
||||
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
|
||||
|
||||
Shader "Lava Flowing Shader/Unlit/Distort Transparent"
|
||||
{
|
||||
Properties {
|
||||
//_Color ("Main Color", Color) = (1,1,1)
|
||||
_DistortX ("Distortion in X", Range (0,2)) = 1
|
||||
_DistortY ("Distortion in Y", Range (0,2)) = 0
|
||||
_MainTex ("_MainTex RGBA", 2D) = "white" {}
|
||||
_Distort ("_Distort A", 2D) = "white" {}
|
||||
_LavaTex ("_LavaTex RGBA", 2D) = "white" {}
|
||||
}
|
||||
|
||||
Category {
|
||||
//Tags { "RenderType"="Opaque" }
|
||||
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
Cull back Lighting Off ZWrite Off
|
||||
|
||||
SubShader {
|
||||
Pass {
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
sampler2D _MainTex;
|
||||
sampler2D _Distort;
|
||||
sampler2D _LavaTex;
|
||||
|
||||
struct appdata_t {
|
||||
fixed4 vertex : POSITION;
|
||||
fixed2 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f {
|
||||
fixed4 vertex : SV_POSITION;
|
||||
fixed2 texcoord : TEXCOORD0;
|
||||
fixed2 texcoord1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
fixed4 _MainTex_ST;
|
||||
fixed4 _LavaTex_ST;
|
||||
|
||||
fixed _DistortX;
|
||||
fixed _DistortY;
|
||||
|
||||
v2f vert (appdata_t v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
|
||||
o.texcoord1 = TRANSFORM_TEX(v.texcoord,_LavaTex);
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
fixed4 tex = tex2D(_MainTex, i.texcoord);
|
||||
fixed distort = tex2D(_Distort, i.texcoord).a;
|
||||
fixed4 tex2 = tex2D(_LavaTex, fixed2(i.texcoord1.x-distort*_DistortX,i.texcoord1.y-distort*_DistortY));
|
||||
tex = lerp(tex2,tex,tex.a);
|
||||
|
||||
return tex;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0803b816564bc844b9300c6e1572fcff
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,64 @@
|
||||
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
|
||||
|
||||
Shader "Lava Flowing Shader/Unlit/Simple"
|
||||
{
|
||||
Properties {
|
||||
//_Color ("Main Color", Color) = (1,1,1)
|
||||
_MainTex ("_MainTex RGBA", 2D) = "white" {}
|
||||
_LavaTex ("_LavaTex RGB", 2D) = "white" {}
|
||||
}
|
||||
|
||||
Category {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
|
||||
Lighting Off
|
||||
|
||||
SubShader {
|
||||
Pass {
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
sampler2D _MainTex;
|
||||
sampler2D _LavaTex;
|
||||
|
||||
struct appdata_t {
|
||||
fixed4 vertex : POSITION;
|
||||
fixed2 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f {
|
||||
fixed4 vertex : SV_POSITION;
|
||||
fixed2 texcoord : TEXCOORD0;
|
||||
fixed2 texcoord1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
fixed4 _MainTex_ST;
|
||||
fixed4 _LavaTex_ST;
|
||||
|
||||
v2f vert (appdata_t v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
|
||||
o.texcoord1 = TRANSFORM_TEX(v.texcoord,_LavaTex);
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
fixed4 tex = tex2D(_MainTex, i.texcoord);
|
||||
fixed4 tex2 = tex2D(_LavaTex, i.texcoord1);
|
||||
|
||||
tex = lerp(tex2,tex,tex.a);
|
||||
|
||||
return tex;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bec21333d7f8cf84cb75cab616acf589
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in new issue
Block a user