*
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
Shader "Custom/Aperture" {
|
||||
Properties {
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
}
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 200
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf Lambert
|
||||
|
||||
sampler2D _MainTex;
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
half4 c = tex2D (_MainTex, IN.uv_MainTex);
|
||||
o.Albedo = c.rgb * saturate(IN.uv_MainTex.y);
|
||||
o.Alpha = c.a;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
FallBack "Diffuse"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cbafe7d7c74a39645ae3d2d30958310c
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
@@ -0,0 +1,43 @@
|
||||
Shader "Custom/DualLayer" {
|
||||
Properties {
|
||||
_DiffuseColor ("Diffuse Color", Color) = (1.0,1.0,1.0,1.0)
|
||||
_SpecColor ("Spec Color", Color) = (1.0,1.0,1.0,1.0)
|
||||
_MainTex ("DiffuseMap", 2D) = "white" {}
|
||||
_SpecularMap ("SpecularMap", 2D) = "white" {}
|
||||
_ReflectionIntensity ("Reflection Intensity", Float) = 0.5
|
||||
_Shininess ("Specular Shininess", Float) = 0.078125
|
||||
_Gloss ("Specular Gloss", Float) = 0.078125
|
||||
}
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 200
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf BlinnPhong
|
||||
|
||||
sampler2D _MainTex;
|
||||
sampler2D _SpecularMap;
|
||||
float _ReflectionIntensity;
|
||||
float _Shininess;
|
||||
float _Gloss;
|
||||
float4 _DiffuseColor;
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
float3 worldRefl;
|
||||
float3 viewDir;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
half4 d = tex2D (_MainTex, IN.uv_MainTex);
|
||||
half s = tex2D (_SpecularMap, IN.uv_MainTex).a;
|
||||
|
||||
o.Albedo = _DiffuseColor.rgb * d.rgb;
|
||||
o.Alpha = 1;
|
||||
o.Gloss = _Gloss * s;
|
||||
o.Specular = _Shininess;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
FallBack "Diffuse"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f4f1e6ed4d869f46be478c26e308279
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
@@ -0,0 +1,55 @@
|
||||
Shader "Custom/EnergyField" {
|
||||
Properties {
|
||||
_DiffuseColor ("Diffuse Color", Color) = (1.0,1.0,1.0,1.0)
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
}
|
||||
SubShader {
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
Tags { "RenderType"="Transparent" "Queue" = "Transparent"}
|
||||
Cull Front
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf Lambert
|
||||
|
||||
float4 _DiffuseColor;
|
||||
sampler2D _MainTex;
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
half4 c = tex2D (_MainTex, IN.uv_MainTex);
|
||||
o.Emission = _DiffuseColor.rgb;
|
||||
o.Alpha = c.r;
|
||||
}
|
||||
ENDCG
|
||||
|
||||
|
||||
|
||||
|
||||
Tags { "RenderType"="Transparent" "Queue" = "Transparent"}
|
||||
Cull Back
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf Lambert
|
||||
|
||||
float4 _DiffuseColor;
|
||||
sampler2D _MainTex;
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
half4 c = tex2D (_MainTex, IN.uv_MainTex);
|
||||
o.Emission = _DiffuseColor.rgb;
|
||||
o.Alpha = c.a;
|
||||
}
|
||||
ENDCG
|
||||
|
||||
|
||||
|
||||
}
|
||||
FallBack "Diffuse"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 80cf839ff1775f745aada32293e78846
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
@@ -0,0 +1,69 @@
|
||||
/*Shader "Custom/Joystick" {
|
||||
Properties {
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
_TintColor("Color Tint", Color) = (1,1,1,1)
|
||||
}
|
||||
SubShader {
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
CGPROGRAM
|
||||
#pragma surface surf Lambert
|
||||
|
||||
float4 _TintColor;
|
||||
sampler2D _MainTex;
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
float c = tex2D (_MainTex, IN.uv_MainTex).a;
|
||||
|
||||
o.Albedo = _TintColor.rgb;
|
||||
o.Alpha = c * _TintColor.a;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
FallBack "Diffuse"
|
||||
}*/
|
||||
|
||||
|
||||
Shader "Custom/Joystick" {
|
||||
Properties {
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
_TintColor("Color Tint", Color) = (1,1,1,1)
|
||||
}
|
||||
SubShader {
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
Pass {
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#include "UnityCG.cginc"
|
||||
float4 _TintColor;
|
||||
sampler2D _MainTex;
|
||||
|
||||
struct v2f {
|
||||
float4 pos : SV_POSITION;
|
||||
float3 tc : COLOR0;
|
||||
};
|
||||
|
||||
v2f vert (appdata_base v)
|
||||
{
|
||||
v2f o;
|
||||
o.pos = mul (UNITY_MATRIX_MVP, v.vertex);
|
||||
o.tc = v.texcoord;
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag (v2f i) : COLOR
|
||||
{
|
||||
float c = tex2D (_MainTex, i.tc).a;
|
||||
return float4(_TintColor.rgb, c * _TintColor.a);
|
||||
}
|
||||
ENDCG
|
||||
|
||||
}
|
||||
}
|
||||
Fallback "VertexLit"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc60c7c82a0cae746bf5cb022efcbb9a
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
@@ -0,0 +1,60 @@
|
||||
Shader "Custom/WaterSimple" {
|
||||
Properties {
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
_NormalMap ("Normal map", 2D) = "bump" {}
|
||||
_Bumpiness ("Bumpiness", Float) = 1.0
|
||||
_Shininess ("Specular Shininess", Float) = 0.078125
|
||||
_Gloss ("Specular Gloss", Float) = 0.078125
|
||||
_Fresnel("Fresnel Coef.", Float) = 0.35
|
||||
_SpecColor ("Spec Color", Color) = (1.0,1.0,1.0,1.0)
|
||||
_WorldS("World Scale", Float) = 1.0
|
||||
_Opacity("Opacity", Float) = 0.5
|
||||
_Scroll("Scroll", Vector) = (0,0,0,0)
|
||||
}
|
||||
SubShader {
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
Tags { "RenderType"="Transparent" "Queue"="Transparent"}
|
||||
LOD 200
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf BlinnPhong
|
||||
#pragma target 3.0
|
||||
sampler2D _MainTex;
|
||||
sampler2D _NormalMap;
|
||||
float _Bumpiness;
|
||||
float _Shininess;
|
||||
float _Gloss;
|
||||
float _Fresnel;
|
||||
float _WorldS;
|
||||
float _Opacity;
|
||||
float4 _Scroll;
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
float3 worldPos;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
half4 c = tex2D (_MainTex, IN.uv_MainTex);
|
||||
o.Albedo = c.rgb;
|
||||
o.Alpha = c.a;
|
||||
|
||||
float2 uvSrc = IN.worldPos.xz * _WorldS;
|
||||
float2 uv1 = uvSrc + _Time.y * _Scroll.xy;
|
||||
float2 uv2 = uvSrc + _Time.y * _Scroll.zw;
|
||||
|
||||
float3 nm1 = UnpackNormal (tex2D (_NormalMap, uv1));
|
||||
float3 nm2 = UnpackNormal (tex2D (_NormalMap, uv2));
|
||||
float3 nm3 = (nm1 + nm2) * 0.5f;
|
||||
|
||||
|
||||
float3 nm = lerp(float3(0,0,1), nm3, _Bumpiness);
|
||||
o.Normal = nm;
|
||||
o.Gloss = _Gloss;
|
||||
o.Specular = _Shininess;
|
||||
o.Alpha =_Opacity;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
FallBack "Diffuse"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28b01123449a808409ca904a206f2f58
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
Reference in New Issue
Block a user