init
This commit is contained in:
38
Assets/Quirky Series Vol.1 [v1.3]/_Shader/SoftSurface.shader
Normal file
38
Assets/Quirky Series Vol.1 [v1.3]/_Shader/SoftSurface.shader
Normal file
@@ -0,0 +1,38 @@
|
||||
Shader "Toon/SoftSurface"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Color ("Color", Color) = (0.4,0.4,0.4,1)
|
||||
_MainTex ("Albedo (RGB)", 2D) = "white" {}
|
||||
_Emission ("Emission", Range (0,1)) = 0.5
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 100
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf Lambert
|
||||
#pragma target 3.0
|
||||
|
||||
struct Input
|
||||
{
|
||||
float2 uv_MainTex;
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
fixed _Emission;
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o)
|
||||
{
|
||||
fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color;
|
||||
o.Albedo = c.rgb;
|
||||
// Re-use the same texture on emission to give the soft look
|
||||
o.Emission = tex2D (_MainTex, IN.uv_MainTex) * _Emission;
|
||||
o.Alpha = c.a;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
FallBack "Diffuse"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42f746eaacbc2a24d9618184e5392aa2
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
62
Assets/Quirky Series Vol.1 [v1.3]/_Shader/ToonRamp.shader
Normal file
62
Assets/Quirky Series Vol.1 [v1.3]/_Shader/ToonRamp.shader
Normal file
@@ -0,0 +1,62 @@
|
||||
Shader "Toon/ToonRamp" {
|
||||
|
||||
Properties {
|
||||
_Color ("Main Color", Color) = (0.5,0.5,0.5,1)
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
// _BumpMap ("Bumpmap", 2D) = "bump" {}
|
||||
_Ramp ("Toon Ramp (RGB)", 2D) = "white" {}
|
||||
_RimColor ("Rim Color", Color) = (1,1,1,1)
|
||||
_RimPower ("Rim Power", Range (0.1,10)) = 5.25
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 100
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf ToonRamp
|
||||
|
||||
sampler2D _Ramp;
|
||||
|
||||
// custom lighting function that uses a texture ramp based
|
||||
// on angle between light direction and normal
|
||||
#pragma lighting ToonRamp exclude_path:prepass
|
||||
inline half4 LightingToonRamp (SurfaceOutput o, half3 lightDir, half atten)
|
||||
{
|
||||
#ifndef USING_DIRECTIONAL_LIGHT
|
||||
lightDir = normalize (lightDir);
|
||||
#endif
|
||||
|
||||
half d = dot (o.Normal, lightDir) * 0.5 + 0.5;
|
||||
half3 ramp = tex2D (_Ramp, float2 (d,0)).rgb;
|
||||
|
||||
half4 c;
|
||||
c.rgb = o.Albedo * _LightColor0.rgb * ramp * atten * 2;
|
||||
c.a = 0;
|
||||
return c;
|
||||
}
|
||||
|
||||
sampler2D _MainTex;
|
||||
// sampler2D _BumpMap;
|
||||
float4 _Color;
|
||||
float4 _RimColor;
|
||||
float _RimPower;
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex : TEXCOORD0;
|
||||
// float2 uv_BumpMap : TEXCOORD1;
|
||||
float3 viewDir;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
half4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
|
||||
o.Albedo = c.rgb;
|
||||
// o.Normal = UnpackNormal (tex2D (_BumpMap, IN.uv_BumpMap));
|
||||
half rim = 1.0 - saturate(dot (normalize(IN.viewDir), o.Normal));
|
||||
o.Emission = (_RimColor.rgb * c) * pow (rim, _RimPower);
|
||||
o.Alpha = c.a;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
Fallback "Diffuse"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cee7e1e6fc45ff143867419e97f4c348
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ab4973614efc1741ba4e7595196f92e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a44401f8b3d263c4e9c2ed62b3f5adff
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user