add project files
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
// Rebuilt from the ripped property block: AssetRipper only preserves Properties {} and
|
||||
// stamps a flat-fill placeholder in place of the program, so every mesh using this shader
|
||||
// rendered unlit. The name and every property below are byte-identical to the rip, so the
|
||||
// existing materials bind without being touched.
|
||||
Shader "Mobile/Diffuse + Color " {
|
||||
Properties {
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
_Color ("Color", Vector) = (1,1,1,1)
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 150
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf Lambert noforwardadd
|
||||
#pragma target 3.0
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
|
||||
o.Albedo = c.rgb;
|
||||
o.Alpha = c.a;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Fallback "Mobile/VertexLit"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f644ad47af5c02c42bf77ed30b3fe786
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,45 @@
|
||||
// See "Mobile/Diffuse + Color " for why this had to be rewritten from the property block.
|
||||
// _Gloss drives the specular mask, _Shininess the highlight tightness -- both are
|
||||
// [PowerSlider(5.0)] in the original, i.e. they read as perceptually linear 0..1.
|
||||
Shader "Mobile/Diffuse + Emission + Specular" {
|
||||
Properties {
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
_Color ("Color", Vector) = (1,1,1,1)
|
||||
_EmissionColor ("Emission Color", Vector) = (0,0,0,1)
|
||||
[NoScaleOffset] _EmissionMap ("Emission", 2D) = "white" {}
|
||||
[PowerSlider(5.0)] _Gloss ("Gloss", Range(0, 1)) = 0.078125
|
||||
[PowerSlider(5.0)] _Shininess ("Shininess", Range(0, 1)) = 0.078125
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 250
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf BlinnPhong noforwardadd
|
||||
#pragma target 3.0
|
||||
|
||||
sampler2D _MainTex;
|
||||
sampler2D _EmissionMap;
|
||||
fixed4 _Color;
|
||||
fixed4 _EmissionColor;
|
||||
half _Gloss;
|
||||
half _Shininess;
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
|
||||
o.Albedo = c.rgb;
|
||||
o.Emission = tex2D(_EmissionMap, IN.uv_MainTex).rgb * _EmissionColor.rgb;
|
||||
o.Gloss = _Gloss;
|
||||
o.Specular = _Shininess;
|
||||
o.Alpha = c.a;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Fallback "Mobile/VertexLit"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 268a5d2fcb2243b45baffd27837e197d
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,38 @@
|
||||
// See "Mobile/Diffuse + Color " for why this had to be rewritten from the property block.
|
||||
Shader "Mobile/Diffuse + Emission " {
|
||||
Properties {
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
_Color ("Color", Vector) = (1,1,1,1)
|
||||
_EmissionColor ("Emission Color", Vector) = (0,0,0,1)
|
||||
_EmissionMap ("Emission", 2D) = "white" {}
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 150
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf Lambert noforwardadd
|
||||
#pragma target 3.0
|
||||
|
||||
sampler2D _MainTex;
|
||||
sampler2D _EmissionMap;
|
||||
fixed4 _Color;
|
||||
fixed4 _EmissionColor;
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
float2 uv_EmissionMap;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
|
||||
o.Albedo = c.rgb;
|
||||
o.Emission = tex2D(_EmissionMap, IN.uv_EmissionMap).rgb * _EmissionColor.rgb;
|
||||
o.Alpha = c.a;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Fallback "Mobile/VertexLit"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8770aa06de84da6469d2701954604c51
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,63 @@
|
||||
// Toony Colors Pro 2 is a store asset; only its generated shader shipped in the build, and
|
||||
// AssetRipper kept nothing but the property block. Rewritten as a functional equivalent
|
||||
// against the exact same property names, so the ripped materials bind unchanged.
|
||||
//
|
||||
// The TCP2 "slider ramp" model: remap N.L to 0..1, then push it through a smoothstep
|
||||
// centred on _RampThreshold whose width is _RampSmooth. That gives the hard two-tone
|
||||
// terminator the game's art relies on, lerping _SColor -> _HColor rather than fading to
|
||||
// black the way Lambert would.
|
||||
Shader "Toony Colors Pro 2/User/SliderRamp" {
|
||||
Properties {
|
||||
[TCP2HeaderHelp(BASE, Base Properties)] _Color ("Color", Vector) = (1,1,1,1)
|
||||
_HColor ("Highlight Color", Vector) = (0.785,0.785,0.785,1)
|
||||
_SColor ("Shadow Color", Vector) = (0.195,0.195,0.195,1)
|
||||
_MainTex ("Main Texture", 2D) = "white" {}
|
||||
[TCP2Separator] [TCP2Header(RAMP SETTINGS)] _RampThreshold ("Ramp Threshold", Range(0, 1)) = 0.5
|
||||
_RampSmooth ("Ramp Smoothing", Range(0.001, 1)) = 0.1
|
||||
[TCP2Separator] [HideInInspector] __dummy__ ("unused", Float) = 0
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 200
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf ToonRamp fullforwardshadows
|
||||
#pragma target 3.0
|
||||
|
||||
fixed4 _Color;
|
||||
fixed4 _HColor;
|
||||
fixed4 _SColor;
|
||||
sampler2D _MainTex;
|
||||
half _RampThreshold;
|
||||
half _RampSmooth;
|
||||
|
||||
inline half4 LightingToonRamp (SurfaceOutput s, half3 lightDir, half atten)
|
||||
{
|
||||
half ndl = dot(s.Normal, lightDir) * 0.5 + 0.5;
|
||||
half ramp = smoothstep(_RampThreshold - _RampSmooth * 0.5,
|
||||
_RampThreshold + _RampSmooth * 0.5, ndl);
|
||||
// attenuation darkens the ramp itself, keeping shadowed areas in _SColor
|
||||
ramp *= atten;
|
||||
half3 tint = lerp(_SColor.rgb, _HColor.rgb, ramp);
|
||||
|
||||
half4 c;
|
||||
c.rgb = s.Albedo * _LightColor0.rgb * tint;
|
||||
c.a = s.Alpha;
|
||||
return c;
|
||||
}
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
|
||||
o.Albedo = c.rgb;
|
||||
o.Alpha = c.a;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Fallback "Diffuse"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 53e9e50ca4aea5c42b44e61efe813dbc
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,81 @@
|
||||
// See "Toony Colors Pro 2/User/SliderRamp" for the ramp model, and
|
||||
// "Voodoo_LaunchOps/SliderRampSpecularNormal" for the specular lobe. This variant adds a
|
||||
// rim term: 1 - N.V pushed through smoothstep(_RimMin, _RimMax) and added on top, which is
|
||||
// what gives the character its outline glow.
|
||||
Shader "Voodoo_LaunchOps/SliderRampSpecRimNormal" {
|
||||
Properties {
|
||||
[TCP2HeaderHelp(BASE, Base Properties)] _Color ("Color", Vector) = (1,1,1,1)
|
||||
_HColor ("Highlight Color", Vector) = (0.785,0.785,0.785,1)
|
||||
_SColor ("Shadow Color", Vector) = (0.195,0.195,0.195,1)
|
||||
_MainTex ("Main Texture", 2D) = "white" {}
|
||||
[TCP2Separator] [TCP2Header(RAMP SETTINGS)] _RampThreshold ("Ramp Threshold", Range(0, 1)) = 0.5
|
||||
_RampSmooth ("Ramp Smoothing", Range(0.001, 1)) = 0.1
|
||||
[TCP2Separator] [TCP2HeaderHelp(NORMAL MAPPING, Normal Bump Map,)] _BumpMap ("Normal map (RGB)", 2D) = "bump" {}
|
||||
[TCP2Separator] [TCP2HeaderHelp(SPECULAR, Specular)] _SpecColor ("Specular Color", Vector) = (0.5,0.5,0.5,1)
|
||||
_Smoothness ("Size", Range(0, 1)) = 0.2
|
||||
[TCP2Separator] [TCP2HeaderHelp(RIM, RIM)] _RimColor ("Rim Color", Vector) = (0,0,0,0)
|
||||
_RimMin ("Rim Min", Range(0, 1)) = 1
|
||||
_RimMax ("Rim Max", Range(0, 5)) = 1
|
||||
[TCP2Separator] [HideInInspector] __dummy__ ("unused", Float) = 0
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 250
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf ToonRamp fullforwardshadows
|
||||
#pragma target 3.0
|
||||
|
||||
fixed4 _Color;
|
||||
fixed4 _HColor;
|
||||
fixed4 _SColor;
|
||||
sampler2D _MainTex;
|
||||
sampler2D _BumpMap;
|
||||
half _RampThreshold;
|
||||
half _RampSmooth;
|
||||
half _Smoothness;
|
||||
fixed4 _RimColor;
|
||||
half _RimMin;
|
||||
half _RimMax;
|
||||
|
||||
inline half4 LightingToonRamp (SurfaceOutput s, half3 lightDir, half3 viewDir, half atten)
|
||||
{
|
||||
half ndl = dot(s.Normal, lightDir) * 0.5 + 0.5;
|
||||
half ramp = smoothstep(_RampThreshold - _RampSmooth * 0.5,
|
||||
_RampThreshold + _RampSmooth * 0.5, ndl);
|
||||
ramp *= atten;
|
||||
half3 tint = lerp(_SColor.rgb, _HColor.rgb, ramp);
|
||||
|
||||
half3 h = normalize(lightDir + viewDir);
|
||||
half ndh = max(0, dot(s.Normal, h));
|
||||
half spec = pow(ndh, max(1.0, (1.0 - saturate(_Smoothness)) * 128.0)) * atten;
|
||||
|
||||
half ndv = 1.0 - saturate(dot(normalize(viewDir), s.Normal));
|
||||
// _RimMin == _RimMax would make smoothstep undefined, so keep them apart
|
||||
half rim = smoothstep(_RimMin, max(_RimMax, _RimMin + 0.001), ndv) * _RimColor.a;
|
||||
|
||||
half4 c;
|
||||
c.rgb = s.Albedo * _LightColor0.rgb * tint
|
||||
+ _LightColor0.rgb * _SpecColor.rgb * spec
|
||||
+ _RimColor.rgb * rim;
|
||||
c.a = s.Alpha;
|
||||
return c;
|
||||
}
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
float2 uv_BumpMap;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
|
||||
o.Albedo = c.rgb;
|
||||
o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap));
|
||||
o.Alpha = c.a;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Fallback "Diffuse"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f99e4117984757c4ab81fda65c2f3f4e
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,69 @@
|
||||
// See "Toony Colors Pro 2/User/SliderRamp" for the ramp model. This variant adds a normal
|
||||
// map and a toon specular lobe; _Smoothness is TCP2's "Size" slider, which controls how
|
||||
// wide the highlight is rather than a PBR roughness.
|
||||
Shader "Voodoo_LaunchOps/SliderRampSpecularNormal" {
|
||||
Properties {
|
||||
[TCP2HeaderHelp(BASE, Base Properties)] _Color ("Color", Vector) = (1,1,1,1)
|
||||
_HColor ("Highlight Color", Vector) = (0.785,0.785,0.785,1)
|
||||
_SColor ("Shadow Color", Vector) = (0.195,0.195,0.195,1)
|
||||
_MainTex ("Main Texture", 2D) = "white" {}
|
||||
[TCP2Separator] [TCP2Header(RAMP SETTINGS)] _RampThreshold ("Ramp Threshold", Range(0, 1)) = 0.5
|
||||
_RampSmooth ("Ramp Smoothing", Range(0.001, 1)) = 0.1
|
||||
[TCP2Separator] [TCP2HeaderHelp(NORMAL MAPPING, Normal Bump Map)] _BumpMap ("Normal map (RGB)", 2D) = "bump" {}
|
||||
[TCP2Separator] [TCP2HeaderHelp(SPECULAR, Specular)] _SpecColor ("Specular Color", Vector) = (0.5,0.5,0.5,1)
|
||||
_Smoothness ("Size", Float) = 0.2
|
||||
[TCP2Separator] [HideInInspector] __dummy__ ("unused", Float) = 0
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 250
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf ToonRamp fullforwardshadows
|
||||
#pragma target 3.0
|
||||
|
||||
fixed4 _Color;
|
||||
fixed4 _HColor;
|
||||
fixed4 _SColor;
|
||||
sampler2D _MainTex;
|
||||
sampler2D _BumpMap;
|
||||
half _RampThreshold;
|
||||
half _RampSmooth;
|
||||
half _Smoothness;
|
||||
|
||||
inline half4 LightingToonRamp (SurfaceOutput s, half3 lightDir, half3 viewDir, half atten)
|
||||
{
|
||||
half ndl = dot(s.Normal, lightDir) * 0.5 + 0.5;
|
||||
half ramp = smoothstep(_RampThreshold - _RampSmooth * 0.5,
|
||||
_RampThreshold + _RampSmooth * 0.5, ndl);
|
||||
ramp *= atten;
|
||||
half3 tint = lerp(_SColor.rgb, _HColor.rgb, ramp);
|
||||
|
||||
half3 h = normalize(lightDir + viewDir);
|
||||
half ndh = max(0, dot(s.Normal, h));
|
||||
// _Smoothness reads 0..1 as "highlight size", so map it to an exponent inversely
|
||||
half spec = pow(ndh, max(1.0, (1.0 - saturate(_Smoothness)) * 128.0)) * atten;
|
||||
|
||||
half4 c;
|
||||
c.rgb = s.Albedo * _LightColor0.rgb * tint + _LightColor0.rgb * _SpecColor.rgb * spec;
|
||||
c.a = s.Alpha;
|
||||
return c;
|
||||
}
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
float2 uv_BumpMap;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
|
||||
o.Albedo = c.rgb;
|
||||
o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap));
|
||||
o.Alpha = c.a;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Fallback "Diffuse"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea3c2e4d80699da4cbb206f5d64d9b95
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user