mirror of
https://github.com/muskit/H3VR-TNH-Quality-of-Life-Improvements.git
synced 2026-06-02 20:24:26 -07:00
Initial commit
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3d47b2bb113220c4db1b7441733ca1d6
|
||||
folderAsset: yes
|
||||
timeCreated: 1467836679
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c4c634823dda5844bb73e007881bdbd2
|
||||
folderAsset: yes
|
||||
timeCreated: 1467836685
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,244 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
Shader "Alloy/Legacy/Human/Eye/Eyeball (Forward)" {
|
||||
Properties {
|
||||
// Main Textures
|
||||
_MainTextures ("'Eyeball Textures' {Section:{Color:0}}", Float) = 0
|
||||
[LM_Albedo] [LM_Transparency]
|
||||
_Color ("'Tint' {}", Color) = (1,1,1,1)
|
||||
[LM_MasterTilingOffset] [LM_Albedo]
|
||||
_MainTex ("'Base Color(RGB) Iris Depth(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_MainTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_MainTexUV ("UV Set", Float) = 0
|
||||
[LM_Metallic]
|
||||
_SpecTex ("'Iris(R) AO(G) Spec(B) Rough(A)' {Visualize:{R, G, B, A}, Parent:_MainTex}", 2D) = "white" {}
|
||||
[LM_NormalMap]
|
||||
_BumpMap ("'Normals' {Visualize:{NRM}, Parent:_MainTex}", 2D) = "bump" {}
|
||||
_BaseColorVertexTint ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Main Properties
|
||||
_MainPhysicalProperties ("'Main Properties' {Section:{Color:1}}", Float) = 0
|
||||
_Specularity ("'Specularity' {Min:0, Max:1}", Float) = 1
|
||||
_Roughness ("'Roughness' {Min:0, Max:1}", Float) = 1
|
||||
_Occlusion ("'Occlusion Strength' {Min:0, Max:1}", Float) = 1
|
||||
_BumpScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Eye Properties
|
||||
_EyeProperties ("'Eye' {Section:{Color:2}}", Float) = 0
|
||||
_EyeScleraColor ("'Sclera Tint' {}", Color) = (1,1,1)
|
||||
_EyeScleraScattering ("'Sclera Scattering' {Min:0, Max:1}", Float) = 0
|
||||
_EyeSpecularity ("'Cornea Specularity' {Min:0, Max:1}", Float) = 0.36
|
||||
_EyeRoughness ("'Cornea Roughness' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Iris Properties
|
||||
_IrisProperties ("'Iris' {Section:{Color:3}}", Float) = 0
|
||||
_EyeColor ("'Tint' {}", Color) = (1,1,1)
|
||||
_EyeIrisScattering ("'Scattering' {Min:0, Max:1}", Float) = 0
|
||||
_EyeSpecularTint ("'Specular Tint' {Min:0, Max:1}", Float) = 1
|
||||
_EyeParallax ("'Depth' {Min:0, Max:0.08}", Float) = 0.08
|
||||
_EyePupilSize ("'Pupil Dilation' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Detail
|
||||
[Toggle(_DETAIL_MULX2)]
|
||||
_DetailT ("'Detail' {Feature:{Color:7}}", Float) = 0
|
||||
[Enum(Mul, 0, MulX2, 1)]
|
||||
_DetailMode ("'Color Mode' {Dropdown:{Mul:{}, MulX2:{}}}", Float) = 0
|
||||
_DetailAlbedoMap ("'Color(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_DetailAlbedoMapVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_DetailAlbedoMapUV ("UV Set", Float) = 0
|
||||
_DetailNormalMap ("'Normals' {Visualize:{NRM}, Parent:_DetailAlbedoMap}", 2D) = "bump" {}
|
||||
_DetailWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DetailNormalMapScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Decal
|
||||
[Toggle(_DECAL_ON)]
|
||||
_Decal ("'Decal' {Feature:{Color:9}}", Float) = 0
|
||||
_DecalColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_DecalTex ("'Base Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "black" {}
|
||||
_DecalTexUV ("UV Set", Float) = 0
|
||||
_DecalWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DecalSpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_DecalAlphaVertexTint ("'Vertex Alpha Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Emission
|
||||
[Toggle(_EMISSION)]
|
||||
_Emission ("'Emission' {Feature:{Color:10}}", Float) = 0
|
||||
[LM_Emission]
|
||||
[HDR]
|
||||
_EmissionColor ("'Tint' {}", Color) = (1,1,1)
|
||||
[LM_Emission]
|
||||
_EmissionMap ("'Mask(RGB)' {Visualize:{RGB}, Parent:_MainTex}", 2D) = "white" {}
|
||||
_IncandescenceMap ("'Effect(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_IncandescenceMapVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_IncandescenceMapUV ("UV Set", Float) = 0
|
||||
[Gamma]
|
||||
_EmissionWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
|
||||
// Rim Emission
|
||||
[Toggle(_RIM_ON)]
|
||||
_Rim ("'Rim Emission' {Feature:{Color:11}}", Float) = 0
|
||||
[HDR]
|
||||
_RimColor ("'Tint' {}", Color) = (1,1,1)
|
||||
_RimTex ("'Effect(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_RimTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_RimTexUV ("UV Set", Float) = 0
|
||||
[Gamma]
|
||||
_RimWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
[Gamma]
|
||||
_RimBias ("'Fill' {Min:0, Max:1}", Float) = 0
|
||||
_RimPower ("'Falloff' {Min:0.01}", Float) = 4
|
||||
|
||||
// Dissolve
|
||||
[Toggle(_DISSOLVE_ON)]
|
||||
_Dissolve ("'Dissolve' {Feature:{Color:12}}", Float) = 0
|
||||
[HDR]
|
||||
_DissolveGlowColor ("'Glow Tint' {}", Color) = (1,1,1,1)
|
||||
_DissolveTex ("'Glow Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_DissolveTexUV ("UV Set", Float) = 0
|
||||
_DissolveCutoff ("'Cutoff' {Min:0, Max:1}", Float) = 0
|
||||
[Gamma]
|
||||
_DissolveGlowWeight ("'Glow Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DissolveEdgeWidth ("'Glow Width' {Min:0, Max:1}", Float) = 0.01
|
||||
|
||||
// Forward Rendering Options
|
||||
_ForwardRenderingOptions ("'Forward Rendering Options' {Section:{Color:19}}", Float) = 0
|
||||
[ToggleOff]
|
||||
_SpecularHighlights ("'Specular Highlights' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
[ToggleOff]
|
||||
_GlossyReflections ("'Glossy Reflections' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
|
||||
// Advanced Options
|
||||
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||||
_Lightmapping ("'GI' {LightmapEmissionProperty:{}}", Float) = 1
|
||||
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||||
_EnableInstancing ("'Enable Instancing' {EnableInstancing:{}}", Float) = 0
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags {
|
||||
"Queue" = "Geometry"
|
||||
"RenderType" = "Opaque"
|
||||
//"DisableBatching" = "LODFading"
|
||||
}
|
||||
LOD 400
|
||||
|
||||
Pass {
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _EMISSION
|
||||
#pragma shader_feature _RIM_ON
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdbase
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile_instancing
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/EyeballForward.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD_DELTA"
|
||||
Tags { "LightMode" = "ForwardAdd" }
|
||||
|
||||
Blend One One
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdadd_fullshadows
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDADD
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/EyeballForward.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Add.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "SHADOWCASTER"
|
||||
Tags { "LightMode" = "ShadowCaster" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
|
||||
#pragma multi_compile_shadowcaster
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_SHADOWCASTER
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/EyeballForward.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Shadow.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Meta"
|
||||
Tags { "LightMode" = "Meta" }
|
||||
|
||||
Cull Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _EMISSION
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_META
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/EyeballForward.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Meta.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
FallBack "VertexLit"
|
||||
CustomEditor "AlloyFieldBasedEditor"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a6700881f29f31948bdf60ba565ab71c
|
||||
ShaderImporter:
|
||||
defaultTextures:
|
||||
- _MainTex: {instanceID: 0}
|
||||
- _SpecTex: {instanceID: 0}
|
||||
- _BumpMap: {instanceID: 0}
|
||||
- _DetailMask: {instanceID: 0}
|
||||
- _DetailAlbedoMap: {instanceID: 0}
|
||||
- _DetailMaterialMap: {fileID: 2800000, guid: 2b77d5cb601375f4ba50c6194c126e59,
|
||||
type: 3}
|
||||
- _DetailNormalMap: {instanceID: 0}
|
||||
- _DecalTex: {instanceID: 0}
|
||||
- _EmissionMap: {instanceID: 0}
|
||||
- _IncandescenceMap: {instanceID: 0}
|
||||
- _RimTex: {instanceID: 0}
|
||||
- _DissolveTex: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,274 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
Shader "Alloy/Legacy/Human/Eye/Eyeball" {
|
||||
Properties {
|
||||
// Main Textures
|
||||
_MainTextures ("'Eyeball Textures' {Section:{Color:0}}", Float) = 0
|
||||
[LM_Albedo] [LM_Transparency]
|
||||
_Color ("'Tint' {}", Color) = (1,1,1,1)
|
||||
[LM_MasterTilingOffset] [LM_Albedo]
|
||||
_MainTex ("'Base Color(RGB) Iris Depth(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_MainTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_MainTexUV ("UV Set", Float) = 0
|
||||
[LM_Metallic]
|
||||
_SpecTex ("'Iris(R) AO(G) Spec(B) Rough(A)' {Visualize:{R, G, B, A}, Parent:_MainTex}", 2D) = "white" {}
|
||||
[LM_NormalMap]
|
||||
_BumpMap ("'Normals' {Visualize:{NRM}, Parent:_MainTex}", 2D) = "bump" {}
|
||||
_BaseColorVertexTint ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Main Properties
|
||||
_MainPhysicalProperties ("'Main Properties' {Section:{Color:1}}", Float) = 0
|
||||
_Specularity ("'Specularity' {Min:0, Max:1}", Float) = 1
|
||||
_Roughness ("'Roughness' {Min:0, Max:1}", Float) = 1
|
||||
_Occlusion ("'Occlusion Strength' {Min:0, Max:1}", Float) = 1
|
||||
_BumpScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Eye Properties
|
||||
_EyeProperties ("'Cornea' {Section:{Color:2}}", Float) = 0
|
||||
_EyeBumpMap ("'Normals' {Visualize:{NRM}, Parent:_MainTex}", 2D) = "bump" {}
|
||||
_EyeCorneaWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_EyeRoughness ("'Roughness' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Iris Properties
|
||||
_IrisProperties ("'Iris' {Section:{Color:3}}", Float) = 0
|
||||
_EyeScleraColor("'Sclera Tint' {}", Color) = (1,1,1)
|
||||
_EyeColor ("'Tint' {}", Color) = (1,1,1)
|
||||
_EyeSpecularTint ("'Specular Tint' {Min:0, Max:1}", Float) = 1
|
||||
_EyeParallax ("'Depth' {Min:0, Max:0.08}", Float) = 0.08
|
||||
_EyePupilSize ("'Pupil Dilation' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Detail
|
||||
[Toggle(_DETAIL_MULX2)]
|
||||
_DetailT ("'Detail' {Feature:{Color:7}}", Float) = 0
|
||||
[Enum(Mul, 0, MulX2, 1)]
|
||||
_DetailMode ("'Color Mode' {Dropdown:{Mul:{}, MulX2:{}}}", Float) = 0
|
||||
_DetailAlbedoMap ("'Color(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_DetailAlbedoMapVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_DetailAlbedoMapUV ("UV Set", Float) = 0
|
||||
_DetailNormalMap ("'Normals' {Visualize:{NRM}, Parent:_DetailAlbedoMap}", 2D) = "bump" {}
|
||||
_DetailWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DetailNormalMapScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Decal
|
||||
[Toggle(_DECAL_ON)]
|
||||
_Decal ("'Decal' {Feature:{Color:9}}", Float) = 0
|
||||
_DecalColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_DecalTex ("'Base Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "black" {}
|
||||
_DecalTexUV ("UV Set", Float) = 0
|
||||
_DecalWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DecalSpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_DecalAlphaVertexTint ("'Vertex Alpha Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Emission
|
||||
[Toggle(_EMISSION)]
|
||||
_Emission ("'Emission' {Feature:{Color:10}}", Float) = 0
|
||||
[LM_Emission]
|
||||
[HDR]
|
||||
_EmissionColor ("'Tint' {}", Color) = (1,1,1)
|
||||
[LM_Emission]
|
||||
_EmissionMap ("'Mask(RGB)' {Visualize:{RGB}, Parent:_MainTex}", 2D) = "white" {}
|
||||
_IncandescenceMap ("'Effect(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_IncandescenceMapVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_IncandescenceMapUV ("UV Set", Float) = 0
|
||||
[Gamma]
|
||||
_EmissionWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
|
||||
// Rim Emission
|
||||
[Toggle(_RIM_ON)]
|
||||
_Rim ("'Rim Emission' {Feature:{Color:11}}", Float) = 0
|
||||
[HDR]
|
||||
_RimColor ("'Tint' {}", Color) = (1,1,1)
|
||||
_RimTex ("'Effect(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_RimTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_RimTexUV ("UV Set", Float) = 0
|
||||
[Gamma]
|
||||
_RimWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
[Gamma]
|
||||
_RimBias ("'Fill' {Min:0, Max:1}", Float) = 0
|
||||
_RimPower ("'Falloff' {Min:0.01}", Float) = 4
|
||||
|
||||
// Dissolve
|
||||
[Toggle(_DISSOLVE_ON)]
|
||||
_Dissolve ("'Dissolve' {Feature:{Color:12}}", Float) = 0
|
||||
[HDR]
|
||||
_DissolveGlowColor ("'Glow Tint' {}", Color) = (1,1,1,1)
|
||||
_DissolveTex ("'Glow Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_DissolveTexUV ("UV Set", Float) = 0
|
||||
_DissolveCutoff ("'Cutoff' {Min:0, Max:1}", Float) = 0
|
||||
[Gamma]
|
||||
_DissolveGlowWeight ("'Glow Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DissolveEdgeWidth ("'Glow Width' {Min:0, Max:1}", Float) = 0.01
|
||||
|
||||
// Forward Rendering Options
|
||||
_ForwardRenderingOptions ("'Forward Rendering Options' {Section:{Color:19}}", Float) = 0
|
||||
[ToggleOff]
|
||||
_SpecularHighlights ("'Specular Highlights' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
[ToggleOff]
|
||||
_GlossyReflections ("'Glossy Reflections' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
|
||||
// Advanced Options
|
||||
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||||
_Lightmapping ("'GI' {LightmapEmissionProperty:{}}", Float) = 1
|
||||
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||||
_EnableInstancing ("'Enable Instancing' {EnableInstancing:{}}", Float) = 0
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags {
|
||||
"Queue" = "Geometry"
|
||||
"RenderType" = "Opaque"
|
||||
//"DisableBatching" = "LODFading"
|
||||
}
|
||||
LOD 400
|
||||
|
||||
Pass {
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _EMISSION
|
||||
#pragma shader_feature _RIM_ON
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdbase
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile_instancing
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/Eyeball.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD_DELTA"
|
||||
Tags { "LightMode" = "ForwardAdd" }
|
||||
|
||||
Blend One One
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdadd_fullshadows
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDADD
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/Eyeball.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Add.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "SHADOWCASTER"
|
||||
Tags { "LightMode" = "ShadowCaster" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
|
||||
#pragma multi_compile_shadowcaster
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_SHADOWCASTER
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/Eyeball.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Shadow.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "DEFERRED"
|
||||
Tags { "LightMode" = "Deferred" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _EMISSION
|
||||
#pragma shader_feature _RIM_ON
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_prepassfinal
|
||||
#pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_DEFERRED
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/Eyeball.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Gbuffer.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Meta"
|
||||
Tags { "LightMode" = "Meta" }
|
||||
|
||||
Cull Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _EMISSION
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_META
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/Eyeball.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Meta.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
FallBack "VertexLit"
|
||||
CustomEditor "AlloyFieldBasedEditor"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6e89d7e3bc26b204eb42d1294311d135
|
||||
timeCreated: 1439166597
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures:
|
||||
- _MainTex: {instanceID: 0}
|
||||
- _SpecTex: {instanceID: 0}
|
||||
- _BumpMap: {instanceID: 0}
|
||||
- _EyeBumpMap: {instanceID: 0}
|
||||
- _DetailAlbedoMap: {instanceID: 0}
|
||||
- _DetailMaterialMap: {fileID: 2800000, guid: 2b77d5cb601375f4ba50c6194c126e59,
|
||||
type: 3}
|
||||
- _DetailNormalMap: {instanceID: 0}
|
||||
- _DecalTex: {instanceID: 0}
|
||||
- _EmissionMap: {instanceID: 0}
|
||||
- _IncandescenceMap: {instanceID: 0}
|
||||
- _RimTex: {instanceID: 0}
|
||||
- _DissolveTex: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,86 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
Shader "Alloy/Legacy/Human/Eye/Occlusion" {
|
||||
Properties {
|
||||
// Main Textures
|
||||
_MainTextures ("'Eye OcclusionTextures' {Section:{Color:0}}", Float) = 0
|
||||
_Color ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_MainTex ("'Base Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_MainTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_MainTexUV ("UV Set", Float) = 0
|
||||
_AoMap ("'Ambient Occlusion(G)' {Visualize:{RGB}, Parent:_MainTex}", 2D) = "white" {}
|
||||
_BaseColorVertexTint ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Main Properties
|
||||
_MainPhysicalProperties ("'Main Properties' {Section:{Color:1}}", Float) = 0
|
||||
_Occlusion ("'Occlusion Strength' {Min:0, Max:1}", Float) = 1
|
||||
|
||||
// Dissolve
|
||||
[Toggle(_DISSOLVE_ON)]
|
||||
_Dissolve ("'Dissolve' {Feature:{Color:12}}", Float) = 0
|
||||
[HDR]
|
||||
_DissolveGlowColor ("'Glow Tint' {}", Color) = (1,1,1,1)
|
||||
_DissolveTex ("'Glow Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_DissolveTexUV ("UV Set", Float) = 0
|
||||
_DissolveCutoff ("'Cutoff' {Min:0, Max:1}", Float) = 0
|
||||
[Gamma]
|
||||
_DissolveGlowWeight ("'Glow Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DissolveEdgeWidth ("'Glow Width' {Min:0, Max:1}", Float) = 0.01
|
||||
|
||||
// Advanced Options
|
||||
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||||
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||||
_EnableInstancing ("'Enable Instancing' {EnableInstancing:{}}", Float) = 0
|
||||
}
|
||||
|
||||
CGINCLUDE
|
||||
#define _ALPHAPREMULTIPLY_ON
|
||||
ENDCG
|
||||
|
||||
SubShader {
|
||||
Tags {
|
||||
"Queue" = "Transparent-1"
|
||||
"IgnoreProjector" = "True"
|
||||
"RenderType" = "Transparent"
|
||||
"ForceNoShadowCasting" = "True"
|
||||
//"DisableBatching" = "LODFading"
|
||||
}
|
||||
LOD 400
|
||||
Offset -1,-1
|
||||
|
||||
Pass {
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdbase
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile_instancing
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/EyeOcclusion.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
FallBack "VertexLit"
|
||||
CustomEditor "AlloyFieldBasedEditor"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf9bfe7eee33c564f8336f9a075aff86
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,272 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
Shader "Alloy/Legacy/Human/Skin (Forward)" {
|
||||
Properties {
|
||||
[Toggle(EFFECT_BUMP)]
|
||||
_HasBumpMap ("'Normals Source' {Dropdown:{VertexNormals:{_BumpMap,_BumpScale,_SssBumpBlur,_DetailNormalMap,_DetailNormalMapScale,_WetNormalMap,_WetNormalMapScale}, NormalMaps:{}}}", Float) = 1
|
||||
|
||||
// Skin Textures
|
||||
_MainTextures ("'Skin Textures' {Section:{Color:0}}", Float) = 0
|
||||
[LM_Albedo] [LM_Transparency]
|
||||
_Color ("'Tint' {}", Color) = (1,1,1,1)
|
||||
[LM_MasterTilingOffset] [LM_Albedo]
|
||||
_MainTex ("'Base Color(RGB) SSS(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_MainTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_MainTexUV ("UV Set", Float) = 0
|
||||
[LM_Metallic]
|
||||
_SpecTex ("'Skin(R) AO(G) Spec(B) Rough(A)' {Visualize:{R, G, B, A}, Parent:_MainTex}", 2D) = "white" {}
|
||||
[LM_NormalMap]
|
||||
_BumpMap ("'Normals' {Visualize:{NRM}, Parent:_MainTex}", 2D) = "bump" {}
|
||||
_BaseColorVertexTint ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Skin Properties
|
||||
_MainPhysicalProperties ("'Skin Properties' {Section:{Color:1}}", Float) = 0
|
||||
_Specularity ("'Specularity' {Min:0, Max:1}", Float) = 1
|
||||
_Roughness ("'Roughness' {Min:0, Max:1}", Float) = 1
|
||||
_Occlusion ("'Occlusion Strength' {Min:0, Max:1}", Float) = 1
|
||||
_BumpScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Scattering
|
||||
_ScatteringProperties ("'Scattering' {Section:{Color:2}}", Float) = 0
|
||||
_SssBrdfTex ("'LUT' {Controls:False}", 2D) = "gray" {}
|
||||
_SssBias ("'Bias' {Min:0, Max:1}", Float) = 0
|
||||
_SssScale ("'Scale' {Min:0, Max:1}", Float) = 1
|
||||
_SssAoSaturation ("'AO Saturation' {Min:0, Max:1}", Float) = 0.5
|
||||
_SssBumpBlur ("'Bump Blur' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Transmission
|
||||
_TransmissionProperties ("'Transmission' {Section:{Color:3}}", Float) = 0
|
||||
_TransColor ("'Tint' {}", Color) = (1,1,1)
|
||||
[Gamma]
|
||||
_TransScale ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_TransPower ("'Falloff' {Min:1}", Float) = 1
|
||||
_TransDistortion ("'Bump Distortion' {Min:0, Max:1}", Float) = 0.1
|
||||
|
||||
// Detail
|
||||
[Toggle(_DETAIL_MULX2)]
|
||||
_DetailT ("'Detail' {Feature:{Color:7}}", Float) = 0
|
||||
[Toggle(_NORMALMAP)]
|
||||
_DetailMaskSource ("'Mask Source' {Dropdown:{TextureAlpha:{}, VertexColorAlpha:{_DetailMask}}}", Float) = 0
|
||||
_DetailMask ("'Mask(A)' {Visualize:{A}, Parent:_MainTex}", 2D) = "white" {}
|
||||
_DetailMaskStrength ("'Mask Strength' {Min:0, Max:1}", Float) = 1
|
||||
[Enum(Mul, 0, MulX2, 1)]
|
||||
_DetailMode ("'Color Mode' {Dropdown:{Mul:{}, MulX2:{}}}", Float) = 0
|
||||
_DetailAlbedoMap ("'Color(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_DetailAlbedoMapVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_DetailAlbedoMapUV ("UV Set", Float) = 0
|
||||
_DetailNormalMap ("'Normals' {Visualize:{NRM}, Parent:_DetailAlbedoMap}", 2D) = "bump" {}
|
||||
_DetailWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DetailNormalMapScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Team Color
|
||||
[Toggle(_TEAMCOLOR_ON)]
|
||||
_TeamColor ("'Team Color' {Feature:{Color:8}}", Float) = 0
|
||||
[Enum(Masks, 0, Tint, 1)]
|
||||
_TeamColorMasksAsTint ("'Texture Mode' {Dropdown:{Masks:{}, Tint:{_TeamColorMasks, _TeamColor0, _TeamColor1, _TeamColor2, _TeamColor3}}}", Float) = 0
|
||||
_TeamColorMaskMap ("'Masks(RGBA)' {Visualize:{R, G, B, A, RGB}, Parent:_MainTex}", 2D) = "black" {}
|
||||
_TeamColorMasks ("'Channels' {Vector:Channels}", Vector) = (1,1,1,0)
|
||||
_TeamColor0 ("'Tint R' {}", Color) = (1,0,0)
|
||||
_TeamColor1 ("'Tint G' {}", Color) = (0,1,0)
|
||||
_TeamColor2 ("'Tint B' {}", Color) = (0,0,1)
|
||||
_TeamColor3 ("'Tint A' {}", Color) = (0.5,0.5,0.5)
|
||||
|
||||
// Decal
|
||||
[Toggle(_DECAL_ON)]
|
||||
_Decal ("'Decal' {Feature:{Color:9}}", Float) = 0
|
||||
_DecalColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_DecalTex ("'Base Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "black" {}
|
||||
_DecalTexUV ("UV Set", Float) = 0
|
||||
_DecalWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DecalSpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_DecalAlphaVertexTint ("'Vertex Alpha Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Emission
|
||||
[Toggle(_EMISSION)]
|
||||
_Emission ("'Emission' {Feature:{Color:10}}", Float) = 0
|
||||
[LM_Emission]
|
||||
[HDR]
|
||||
_EmissionColor ("'Tint' {}", Color) = (1,1,1)
|
||||
[LM_Emission]
|
||||
_EmissionMap ("'Mask(RGB)' {Visualize:{RGB}, Parent:_MainTex}", 2D) = "white" {}
|
||||
_IncandescenceMap ("'Effect(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_IncandescenceMapVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_IncandescenceMapUV ("UV Set", Float) = 0
|
||||
[Gamma]
|
||||
_EmissionWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
|
||||
// Rim Emission
|
||||
[Toggle(_RIM_ON)]
|
||||
_Rim ("'Rim Emission' {Feature:{Color:11}}", Float) = 0
|
||||
[HDR]
|
||||
_RimColor ("'Tint' {}", Color) = (1,1,1)
|
||||
_RimTex ("'Effect(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_RimTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_RimTexUV ("UV Set", Float) = 0
|
||||
[Gamma]
|
||||
_RimWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
[Gamma]
|
||||
_RimBias ("'Fill' {Min:0, Max:1}", Float) = 0
|
||||
_RimPower ("'Falloff' {Min:0.01}", Float) = 4
|
||||
|
||||
// Dissolve
|
||||
[Toggle(_DISSOLVE_ON)]
|
||||
_Dissolve ("'Dissolve' {Feature:{Color:12}}", Float) = 0
|
||||
[HDR]
|
||||
_DissolveGlowColor ("'Glow Tint' {}", Color) = (1,1,1,1)
|
||||
_DissolveTex ("'Glow Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_DissolveTexUV ("UV Set", Float) = 0
|
||||
_DissolveCutoff ("'Cutoff' {Min:0, Max:1}", Float) = 0
|
||||
[Gamma]
|
||||
_DissolveGlowWeight ("'Glow Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DissolveEdgeWidth ("'Glow Width' {Min:0, Max:1}", Float) = 0.01
|
||||
|
||||
// Forward Rendering Options
|
||||
_ForwardRenderingOptions ("'Forward Rendering Options' {Section:{Color:19}}", Float) = 0
|
||||
[ToggleOff]
|
||||
_SpecularHighlights ("'Specular Highlights' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
[ToggleOff]
|
||||
_GlossyReflections ("'Glossy Reflections' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
|
||||
// Advanced Options
|
||||
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||||
_Lightmapping ("'GI' {LightmapEmissionProperty:{}}", Float) = 1
|
||||
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||||
_EnableInstancing ("'Enable Instancing' {EnableInstancing:{}}", Float) = 0
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags {
|
||||
"Queue" = "Geometry"
|
||||
"RenderType" = "Opaque"
|
||||
//"DisableBatching" = "LODFading"
|
||||
}
|
||||
LOD 400
|
||||
|
||||
Pass {
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _NORMALMAP
|
||||
#pragma shader_feature _TEAMCOLOR_ON
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _EMISSION
|
||||
#pragma shader_feature _RIM_ON
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdbase
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile_instancing
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/SkinForward.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD_DELTA"
|
||||
Tags { "LightMode" = "ForwardAdd" }
|
||||
|
||||
Blend One One
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _NORMALMAP
|
||||
#pragma shader_feature _TEAMCOLOR_ON
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdadd_fullshadows
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDADD
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/SkinForward.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Add.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "SHADOWCASTER"
|
||||
Tags { "LightMode" = "ShadowCaster" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
|
||||
#pragma multi_compile_shadowcaster
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_SHADOWCASTER
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/SkinForward.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Shadow.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Meta"
|
||||
Tags { "LightMode" = "Meta" }
|
||||
|
||||
Cull Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _NORMALMAP
|
||||
#pragma shader_feature _TEAMCOLOR_ON
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _EMISSION
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_META
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/SkinForward.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Meta.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
FallBack "VertexLit"
|
||||
CustomEditor "AlloyFieldBasedEditor"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 892fa42de78ef6445a6371150008d68a
|
||||
ShaderImporter:
|
||||
defaultTextures:
|
||||
- _MainTex: {instanceID: 0}
|
||||
- _SpecTex: {instanceID: 0}
|
||||
- _BumpMap: {instanceID: 0}
|
||||
- _SssBrdfTex: {fileID: 2800000, guid: d13510bb2be49aa40a66a0101efb6a36, type: 3}
|
||||
- _DetailMask: {instanceID: 0}
|
||||
- _DetailAlbedoMap: {instanceID: 0}
|
||||
- _DetailMaterialMap: {fileID: 2800000, guid: 2b77d5cb601375f4ba50c6194c126e59,
|
||||
type: 3}
|
||||
- _DetailNormalMap: {instanceID: 0}
|
||||
- _TeamColorMaskMap: {instanceID: 0}
|
||||
- _DecalTex: {instanceID: 0}
|
||||
- _EmissionMap: {instanceID: 0}
|
||||
- _IncandescenceMap: {instanceID: 0}
|
||||
- _RimTex: {instanceID: 0}
|
||||
- _DissolveTex: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,228 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
Shader "Alloy/Legacy/Nature/Terrain/4Splat TriPlanar" {
|
||||
Properties {
|
||||
// Splat 0 Properties
|
||||
_Splat0Properties ("'Splat 0 Properties' {Section:{Color:0}}", Float) = 0
|
||||
_SplatSpecularity0 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint0 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
|
||||
// Splat 1 Properties
|
||||
_Splat1Properties ("'Splat 1 Properties' {Section:{Color:0}}", Float) = 0
|
||||
_SplatSpecularity1 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint1 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
|
||||
// Splat 2 Properties
|
||||
_Splat2Properties ("'Splat 2 Properties' {Section:{Color:0}}", Float) = 0
|
||||
_SplatSpecularity2 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint2 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
|
||||
// Splat 3 Properties
|
||||
_Splat3Properties ("'Splat 3 Properties' {Section:{Color:0}}", Float) = 0
|
||||
_SplatSpecularity3 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint3 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
|
||||
// Distant Terrain
|
||||
_DistantTerrainProperties ("'Distant Terrain' {Section:{Color:1}}", Float) = 0
|
||||
_FadeDist ("'Fade Distance' {Min:0}", Float) = 500.0
|
||||
_FadeRange ("'Fade Range' {Min:0.0001}", Float) = 100.0
|
||||
_DistantSpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_DistantSpecularTint ("'Specular Tint' {Min:0, Max:1}", Float) = 0
|
||||
_DistantRoughness ("'Roughness' {Min:0, Max:1}", Float) = 0.5
|
||||
|
||||
// Triplanar
|
||||
_TriplanarProperties ("'Triplanar' {Section:{Color:4}}", Float) = 0
|
||||
_TriplanarBlendSharpness ("'Sharpness' {Min:1, Max:50}", Float) = 2
|
||||
|
||||
// Detail
|
||||
[Toggle(_DETAIL_MULX2)]
|
||||
_DetailT ("'Detail' {Feature:{Color:7}}", Float) = 0
|
||||
[Enum(Mul, 0, MulX2, 1)]
|
||||
_DetailMode ("'Color Mode' {Dropdown:{Mul:{}, MulX2:{}}}", Float) = 0
|
||||
_DetailAlbedoMap ("'Color(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_DetailNormalMap ("'Normals' {Visualize:{NRM}, Parent:_DetailAlbedoMap}", 2D) = "bump" {}
|
||||
_DetailWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DetailNormalMapScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Forward Rendering Options
|
||||
_ForwardRenderingOptions ("'Forward Rendering Options' {Section:{Color:19}}", Float) = 0
|
||||
[ToggleOff]
|
||||
_SpecularHighlights ("'Specular Highlights' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
[ToggleOff]
|
||||
_GlossyReflections ("'Glossy Reflections' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
|
||||
// Advanced Options
|
||||
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||||
_Lightmapping ("'GI' {LightmapEmissionProperty:{}}", Float) = 1
|
||||
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||||
|
||||
// set by terrain engine
|
||||
_Control ("Control (RGBA)", 2D) = "red" {}
|
||||
_Splat3 ("Layer 3 (A)", 2D) = "white" {}
|
||||
_Splat2 ("Layer 2 (B)", 2D) = "white" {}
|
||||
_Splat1 ("Layer 1 (G)", 2D) = "white" {}
|
||||
_Splat0 ("Layer 0 (R)", 2D) = "white" {}
|
||||
_Normal3 ("Normal 3 (A)", 2D) = "bump" {}
|
||||
_Normal2 ("Normal 2 (B)", 2D) = "bump" {}
|
||||
_Normal1 ("Normal 1 (G)", 2D) = "bump" {}
|
||||
_Normal0 ("Normal 0 (R)", 2D) = "bump" {}
|
||||
_Metallic0 ("Metallic 0", Range(0.0, 1.0)) = 0.0
|
||||
_Metallic1 ("Metallic 1", Range(0.0, 1.0)) = 0.0
|
||||
_Metallic2 ("Metallic 2", Range(0.0, 1.0)) = 0.0
|
||||
_Metallic3 ("Metallic 3", Range(0.0, 1.0)) = 0.0
|
||||
|
||||
// used in fallback on old cards & base map
|
||||
_MainTex ("BaseMap (RGB)", 2D) = "white" {}
|
||||
_Color ("Main Color", Color) = (1,1,1,1)
|
||||
}
|
||||
|
||||
CGINCLUDE
|
||||
#define _METALLICGLOSSMAP
|
||||
ENDCG
|
||||
|
||||
SubShader {
|
||||
Tags {
|
||||
"SplatCount" = "4"
|
||||
"Queue" = "Geometry-100"
|
||||
"RenderType" = "Opaque"
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
#pragma multi_compile __ _TERRAIN_NORMAL_MAP
|
||||
|
||||
#pragma multi_compile_fwdbase
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
|
||||
#include "Assets/Alloy/Shaders/Definition/Terrain.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD_DELTA"
|
||||
Tags { "LightMode" = "ForwardAdd" }
|
||||
|
||||
Blend One One
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
|
||||
#pragma multi_compile __ _TERRAIN_NORMAL_MAP
|
||||
|
||||
#pragma multi_compile_fwdadd_fullshadows
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDADD
|
||||
|
||||
#include "Assets/Alloy/Shaders/Definition/Terrain.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Add.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "SHADOWCASTER"
|
||||
Tags { "LightMode" = "ShadowCaster" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma multi_compile_shadowcaster
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_SHADOWCASTER
|
||||
|
||||
#include "Assets/Alloy/Shaders/Definition/Terrain.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Shadow.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "DEFERRED"
|
||||
Tags { "LightMode" = "Deferred" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
#pragma multi_compile __ _TERRAIN_NORMAL_MAP
|
||||
|
||||
#pragma multi_compile_prepassfinal
|
||||
#pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_DEFERRED
|
||||
|
||||
#include "Assets/Alloy/Shaders/Definition/Terrain.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Gbuffer.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Meta"
|
||||
Tags { "LightMode" = "Meta" }
|
||||
|
||||
Cull Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_META
|
||||
|
||||
#include "Assets/Alloy/Shaders/Definition/Terrain.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Meta.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
Dependency "BaseMapShader" = "Hidden/Alloy/Nature/Terrain/Distant"
|
||||
|
||||
Fallback "Hidden/Alloy/Nature/Terrain/Distant"
|
||||
CustomEditor "AlloyFieldBasedEditor"
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3c6bb95e34002934c85cc13970eee004
|
||||
timeCreated: 1456951947
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures:
|
||||
- _DetailAlbedoMap: {instanceID: 0}
|
||||
- _DetailMaterialMap: {fileID: 2800000, guid: 2b77d5cb601375f4ba50c6194c126e59,
|
||||
type: 3}
|
||||
- _DetailNormalMap: {instanceID: 0}
|
||||
- _Control: {instanceID: 0}
|
||||
- _Splat3: {instanceID: 0}
|
||||
- _Splat2: {instanceID: 0}
|
||||
- _Splat1: {instanceID: 0}
|
||||
- _Splat0: {instanceID: 0}
|
||||
- _Normal3: {instanceID: 0}
|
||||
- _Normal2: {instanceID: 0}
|
||||
- _Normal1: {instanceID: 0}
|
||||
- _Normal0: {instanceID: 0}
|
||||
- _MainTex: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,213 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
Shader "Hidden/Alloy/Legacy/Nature/Terrain/nSplat TriPlanar AddPass" {
|
||||
Properties {
|
||||
// Distant Terrain
|
||||
_DistantTerrainProperties ("'Distant Terrain' {Section:{Color:1}}", Float) = 0
|
||||
_FadeDist ("'Fade Distance' {Min:0}", Float) = 500.0
|
||||
_FadeRange ("'Fade Range' {Min:0.0001}", Float) = 100.0
|
||||
_DistantSpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_DistantSpecularTint ("'Specular Tint' {Min:0, Max:1}", Float) = 0
|
||||
_DistantRoughness ("'Roughness' {Min:0, Max:1}", Float) = 0.5
|
||||
|
||||
// Triplanar
|
||||
_TriplanarProperties ("'Triplanar' {Section:{Color:4}}", Float) = 0
|
||||
_TriplanarBlendSharpness ("'Sharpness' {Min:1, Max:50}", Float) = 2
|
||||
|
||||
// Detail
|
||||
[Toggle(_DETAIL_MULX2)]
|
||||
_DetailT ("'Detail' {Feature:{Color:7}}", Float) = 0
|
||||
[Enum(Mul, 0, MulX2, 1)]
|
||||
_DetailMode ("'Color Mode' {Dropdown:{Mul:{}, MulX2:{}}}", Float) = 0
|
||||
_DetailAlbedoMap ("'Color(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_DetailNormalMap ("'Normals' {Visualize:{NRM}, Parent:_DetailAlbedoMap}", 2D) = "bump" {}
|
||||
_DetailWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DetailNormalMapScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Forward Rendering Options
|
||||
_ForwardRenderingOptions ("'Forward Rendering Options' {Section:{Color:19}}", Float) = 0
|
||||
[ToggleOff]
|
||||
_SpecularHighlights ("'Specular Highlights' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
[ToggleOff]
|
||||
_GlossyReflections ("'Glossy Reflections' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
|
||||
// Advanced Options
|
||||
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||||
_Lightmapping ("'GI' {LightmapEmissionProperty:{}}", Float) = 1
|
||||
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||||
|
||||
// set by terrain engine
|
||||
_Control ("Control (RGBA)", 2D) = "red" {}
|
||||
_Splat3 ("Layer 3 (A)", 2D) = "white" {}
|
||||
_Splat2 ("Layer 2 (B)", 2D) = "white" {}
|
||||
_Splat1 ("Layer 1 (G)", 2D) = "white" {}
|
||||
_Splat0 ("Layer 0 (R)", 2D) = "white" {}
|
||||
_Normal3 ("Normal 3 (A)", 2D) = "bump" {}
|
||||
_Normal2 ("Normal 2 (B)", 2D) = "bump" {}
|
||||
_Normal1 ("Normal 1 (G)", 2D) = "bump" {}
|
||||
_Normal0 ("Normal 0 (R)", 2D) = "bump" {}
|
||||
_Metallic0 ("Metallic 0", Range(0.0, 1.0)) = 0.0
|
||||
_Metallic1 ("Metallic 1", Range(0.0, 1.0)) = 0.0
|
||||
_Metallic2 ("Metallic 2", Range(0.0, 1.0)) = 0.0
|
||||
_Metallic3 ("Metallic 3", Range(0.0, 1.0)) = 0.0
|
||||
|
||||
// used in fallback on old cards & base map
|
||||
_MainTex ("BaseMap (RGB)", 2D) = "white" {}
|
||||
_Color ("Main Color", Color) = (1,1,1,1)
|
||||
}
|
||||
|
||||
CGINCLUDE
|
||||
#define A_TERRAIN_NSPLAT_ADDPASS_SHADER
|
||||
#define _METALLICGLOSSMAP
|
||||
#define A_TERRAIN_NSPLAT_SHADER
|
||||
ENDCG
|
||||
|
||||
SubShader {
|
||||
Tags{
|
||||
"Queue" = "Geometry-99"
|
||||
"IgnoreProjector" = "True"
|
||||
"RenderType" = "Opaque"
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
|
||||
Blend One One
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
#pragma multi_compile __ _TERRAIN_NORMAL_MAP
|
||||
|
||||
#pragma multi_compile_fwdbase
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
|
||||
#include "Assets/Alloy/Shaders/Definition/Terrain.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD_DELTA"
|
||||
Tags { "LightMode" = "ForwardAdd" }
|
||||
|
||||
Blend One One
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
|
||||
#pragma multi_compile __ _TERRAIN_NORMAL_MAP
|
||||
|
||||
#pragma multi_compile_fwdadd_fullshadows
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDADD
|
||||
|
||||
#include "Assets/Alloy/Shaders/Definition/Terrain.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Add.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "SHADOWCASTER"
|
||||
Tags { "LightMode" = "ShadowCaster" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma multi_compile_shadowcaster
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_SHADOWCASTER
|
||||
|
||||
#include "Assets/Alloy/Shaders/Definition/Terrain.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Shadow.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "DEFERRED"
|
||||
Tags { "LightMode" = "Deferred" }
|
||||
|
||||
Blend One One
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
#pragma multi_compile __ _TERRAIN_NORMAL_MAP
|
||||
|
||||
#pragma multi_compile_prepassfinal
|
||||
#pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_DEFERRED
|
||||
|
||||
#include "Assets/Alloy/Shaders/Definition/Terrain.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Gbuffer.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Meta"
|
||||
Tags { "LightMode" = "Meta" }
|
||||
|
||||
Cull Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_META
|
||||
|
||||
#include "Assets/Alloy/Shaders/Definition/Terrain.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Meta.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
Fallback "Hidden/Alloy/Nature/Terrain/Distant"
|
||||
CustomEditor "AlloyFieldBasedEditor"
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 193d0086544cd0a4f965e6a50b5ac986
|
||||
timeCreated: 1456951922
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures:
|
||||
- _DetailAlbedoMap: {instanceID: 0}
|
||||
- _DetailMaterialMap: {fileID: 2800000, guid: 2b77d5cb601375f4ba50c6194c126e59,
|
||||
type: 3}
|
||||
- _DetailNormalMap: {instanceID: 0}
|
||||
- _Control: {instanceID: 0}
|
||||
- _Splat3: {instanceID: 0}
|
||||
- _Splat2: {instanceID: 0}
|
||||
- _Splat1: {instanceID: 0}
|
||||
- _Splat0: {instanceID: 0}
|
||||
- _Normal3: {instanceID: 0}
|
||||
- _Normal2: {instanceID: 0}
|
||||
- _Normal1: {instanceID: 0}
|
||||
- _Normal0: {instanceID: 0}
|
||||
- _MainTex: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,209 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
Shader "Alloy/Legacy/Nature/Terrain/nSplat TriPlanar" {
|
||||
Properties {
|
||||
// Distant Terrain
|
||||
_DistantTerrainProperties ("'Distant Terrain' {Section:{Color:1}}", Float) = 0
|
||||
_FadeDist ("'Fade Distance' {Min:0}", Float) = 500.0
|
||||
_FadeRange ("'Fade Range' {Min:0.0001}", Float) = 100.0
|
||||
_DistantSpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_DistantSpecularTint ("'Specular Tint' {Min:0, Max:1}", Float) = 0
|
||||
_DistantRoughness ("'Roughness' {Min:0, Max:1}", Float) = 0.5
|
||||
|
||||
// Triplanar
|
||||
_TriplanarProperties ("'Triplanar' {Section:{Color:4}}", Float) = 0
|
||||
_TriplanarBlendSharpness ("'Sharpness' {Min:1, Max:50}", Float) = 2
|
||||
|
||||
// Detail
|
||||
[Toggle(_DETAIL_MULX2)]
|
||||
_DetailT ("'Detail' {Feature:{Color:7}}", Float) = 0
|
||||
[Enum(Mul, 0, MulX2, 1)]
|
||||
_DetailMode ("'Color Mode' {Dropdown:{Mul:{}, MulX2:{}}}", Float) = 0
|
||||
_DetailAlbedoMap ("'Color(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_DetailNormalMap ("'Normals' {Visualize:{NRM}, Parent:_DetailAlbedoMap}", 2D) = "bump" {}
|
||||
_DetailWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DetailNormalMapScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Forward Rendering Options
|
||||
_ForwardRenderingOptions ("'Forward Rendering Options' {Section:{Color:19}}", Float) = 0
|
||||
[ToggleOff]
|
||||
_SpecularHighlights ("'Specular Highlights' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
[ToggleOff]
|
||||
_GlossyReflections ("'Glossy Reflections' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
|
||||
// Advanced Options
|
||||
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||||
_Lightmapping ("'GI' {LightmapEmissionProperty:{}}", Float) = 1
|
||||
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||||
|
||||
// set by terrain engine
|
||||
_Control ("Control (RGBA)", 2D) = "red" {}
|
||||
_Splat3 ("Layer 3 (A)", 2D) = "white" {}
|
||||
_Splat2 ("Layer 2 (B)", 2D) = "white" {}
|
||||
_Splat1 ("Layer 1 (G)", 2D) = "white" {}
|
||||
_Splat0 ("Layer 0 (R)", 2D) = "white" {}
|
||||
_Normal3 ("Normal 3 (A)", 2D) = "bump" {}
|
||||
_Normal2 ("Normal 2 (B)", 2D) = "bump" {}
|
||||
_Normal1 ("Normal 1 (G)", 2D) = "bump" {}
|
||||
_Normal0 ("Normal 0 (R)", 2D) = "bump" {}
|
||||
_Metallic0 ("Metallic 0", Range(0.0, 1.0)) = 0.0
|
||||
_Metallic1 ("Metallic 1", Range(0.0, 1.0)) = 0.0
|
||||
_Metallic2 ("Metallic 2", Range(0.0, 1.0)) = 0.0
|
||||
_Metallic3 ("Metallic 3", Range(0.0, 1.0)) = 0.0
|
||||
|
||||
// used in fallback on old cards & base map
|
||||
_MainTex ("BaseMap (RGB)", 2D) = "white" {}
|
||||
_Color ("Main Color", Color) = (1,1,1,1)
|
||||
}
|
||||
|
||||
CGINCLUDE
|
||||
#define _METALLICGLOSSMAP
|
||||
#define A_TERRAIN_NSPLAT_SHADER
|
||||
ENDCG
|
||||
|
||||
SubShader {
|
||||
Tags{
|
||||
"Queue" = "Geometry-100"
|
||||
"RenderType" = "Opaque"
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
#pragma multi_compile __ _TERRAIN_NORMAL_MAP
|
||||
|
||||
#pragma multi_compile_fwdbase
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
|
||||
#include "Assets/Alloy/Shaders/Definition/Terrain.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD_DELTA"
|
||||
Tags { "LightMode" = "ForwardAdd" }
|
||||
|
||||
Blend One One
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
|
||||
#pragma multi_compile __ _TERRAIN_NORMAL_MAP
|
||||
|
||||
#pragma multi_compile_fwdadd_fullshadows
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDADD
|
||||
|
||||
#include "Assets/Alloy/Shaders/Definition/Terrain.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Add.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "SHADOWCASTER"
|
||||
Tags { "LightMode" = "ShadowCaster" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma multi_compile_shadowcaster
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_SHADOWCASTER
|
||||
|
||||
#include "Assets/Alloy/Shaders/Definition/Terrain.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Shadow.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "DEFERRED"
|
||||
Tags { "LightMode" = "Deferred" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
#pragma multi_compile __ _TERRAIN_NORMAL_MAP
|
||||
|
||||
#pragma multi_compile_prepassfinal
|
||||
#pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_DEFERRED
|
||||
|
||||
#include "Assets/Alloy/Shaders/Definition/Terrain.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Gbuffer.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Meta"
|
||||
Tags { "LightMode" = "Meta" }
|
||||
|
||||
Cull Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_META
|
||||
|
||||
#include "Assets/Alloy/Shaders/Definition/Terrain.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Meta.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
Dependency "AddPassShader" = "Hidden/Alloy/Legacy/Nature/Terrain/nSplat TriPlanar AddPass"
|
||||
Dependency "BaseMapShader" = "Hidden/Alloy/Nature/Terrain/Distant"
|
||||
|
||||
Fallback "Hidden/Alloy/Nature/Terrain/Distant"
|
||||
CustomEditor "AlloyFieldBasedEditor"
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e82d56854c63d4e4295dc63c542b0649
|
||||
timeCreated: 1456951907
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures:
|
||||
- _DetailAlbedoMap: {instanceID: 0}
|
||||
- _DetailMaterialMap: {fileID: 2800000, guid: 2b77d5cb601375f4ba50c6194c126e59,
|
||||
type: 3}
|
||||
- _DetailNormalMap: {instanceID: 0}
|
||||
- _Control: {instanceID: 0}
|
||||
- _Splat3: {instanceID: 0}
|
||||
- _Splat2: {instanceID: 0}
|
||||
- _Splat1: {instanceID: 0}
|
||||
- _Splat0: {instanceID: 0}
|
||||
- _Normal3: {instanceID: 0}
|
||||
- _Normal2: {instanceID: 0}
|
||||
- _Normal1: {instanceID: 0}
|
||||
- _Normal0: {instanceID: 0}
|
||||
- _MainTex: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,274 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
Shader "Alloy/Legacy/TriPlanar/Lite" {
|
||||
Properties {
|
||||
// Global Settings
|
||||
_Mode ("'Rendering Mode' {RenderingMode:{Opaque:{_Cutoff}, Cutout:{}, Fade:{_Cutoff}, Transparent:{_Cutoff}}}", Float) = 0
|
||||
_SrcBlend ("__src", Float) = 0
|
||||
_DstBlend ("__dst", Float) = 0
|
||||
_ZWrite ("__zw", Float) = 1
|
||||
[LM_TransparencyCutOff]
|
||||
_Cutoff ("'Opacity Cutoff' {Min:0, Max:1}", Float) = 0.5
|
||||
[Toggle(EFFECT_BUMP)]
|
||||
_HasBumpMap ("'Normals Source' {Dropdown:{VertexNormals:{_PrimaryBumpMap,_PrimaryBumpScale,_SecondaryBumpMap,_SecondaryBumpScale,_TertiaryBumpMap,_TertiaryBumpScale,_QuaternaryBumpMap,_QuaternaryBumpScale}, NormalMaps:{}}}", Float) = 1
|
||||
|
||||
// Primary Textures
|
||||
_PrimaryTextures ("'Primary Textures' {Section:{Color:0}}", Float) = 0
|
||||
_PrimaryColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_PrimaryMainTex ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_PrimaryMainTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_PrimaryBumpMap ("'Normals' {Visualize:{NRM}, Parent:_PrimaryMainTex}", 2D) = "bump" {}
|
||||
_PrimaryColorVertexTint ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0
|
||||
_PrimaryMetallic ("'Metallic' {Min:0, Max:1}", Float) = 0
|
||||
_PrimarySpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_PrimarySpecularTint ("'Specular Tint' {Min:0, Max:1}", Float) = 0
|
||||
_PrimaryRoughness ("'Roughness' {Min:0, Max:1}", Float) = 1
|
||||
_PrimaryBumpScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Secondary Textures
|
||||
[Toggle(_SECONDARY_TRIPLANAR_ON)]
|
||||
_SecondaryTextures ("'Secondary Textures' {Feature:{Color:1}}", Float) = 0
|
||||
_SecondaryColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_SecondaryMainTex ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_SecondaryMainTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_SecondaryBumpMap ("'Normals' {Visualize:{NRM}, Parent:_SecondaryMainTex}", 2D) = "bump" {}
|
||||
_SecondaryColorVertexTint ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0
|
||||
_SecondaryMetallic ("'Metallic' {Min:0, Max:1}", Float) = 0
|
||||
_SecondarySpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SecondarySpecularTint ("'Specular Tint' {Min:0, Max:1}", Float) = 0
|
||||
_SecondaryRoughness ("'Roughness' {Min:0, Max:1}", Float) = 1
|
||||
_SecondaryBumpScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Tertiary Textures
|
||||
[Toggle(_TERTIARY_TRIPLANAR_ON)]
|
||||
_TertiaryTextures ("'Tertiary Textures' {Feature:{Color:2}}", Float) = 0
|
||||
_TertiaryColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_TertiaryMainTex ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_TertiaryMainTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_TertiaryBumpMap ("'Normals' {Visualize:{NRM}, Parent:_TertiaryMainTex}", 2D) = "bump" {}
|
||||
_TertiaryColorVertexTint ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0
|
||||
_TertiaryMetallic ("'Metallic' {Min:0, Max:1}", Float) = 0
|
||||
_TertiarySpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_TertiarySpecularTint ("'Specular Tint' {Min:0, Max:1}", Float) = 0
|
||||
_TertiaryRoughness ("'Roughness' {Min:0, Max:1}", Float) = 1
|
||||
_TertiaryBumpScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Quaternary Textures
|
||||
[Toggle(_QUATERNARY_TRIPLANAR_ON)]
|
||||
_QuaternaryTextures ("'Quaternary Textures' {Feature:{Color:3}}", Float) = 0
|
||||
_QuaternaryColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_QuaternaryMainTex ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_QuaternaryMainTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_QuaternaryBumpMap ("'Normals' {Visualize:{NRM}, Parent:_QuaternaryMainTex}", 2D) = "bump" {}
|
||||
_QuaternaryColorVertexTint ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0
|
||||
_QuaternaryMetallic ("'Metallic' {Min:0, Max:1}", Float) = 0
|
||||
_QuaternarySpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_QuaternarySpecularTint ("'Specular Tint' {Min:0, Max:1}", Float) = 0
|
||||
_QuaternaryRoughness ("'Roughness' {Min:0, Max:1}", Float) = 1
|
||||
_QuaternaryBumpScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Triplanar
|
||||
_TriplanarProperties ("'Triplanar' {Section:{Color:4}}", Float) = 0
|
||||
[Toggle(_TRIPLANARMODE_WORLD)]
|
||||
_TriplanarMode ("'Mode' {Dropdown:{Object:{}, World:{}}}", Float) = 1
|
||||
_TriplanarBlendSharpness ("'Sharpness' {Min:1, Max:50}", Float) = 2
|
||||
|
||||
// Rim Emission
|
||||
[Toggle(_RIM_ON)]
|
||||
_Rim ("'Rim Emission' {Feature:{Color:11}}", Float) = 0
|
||||
[HDR]
|
||||
_RimColor ("'Tint' {}", Color) = (1,1,1)
|
||||
[Gamma]
|
||||
_RimWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
[Gamma]
|
||||
_RimBias ("'Fill' {Min:0, Max:1}", Float) = 0
|
||||
_RimPower ("'Falloff' {Min:0.01}", Float) = 4
|
||||
|
||||
// Forward Rendering Options
|
||||
_ForwardRenderingOptions ("'Forward Rendering Options' {Section:{Color:19}}", Float) = 0
|
||||
[ToggleOff]
|
||||
_SpecularHighlights ("'Specular Highlights' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
[ToggleOff]
|
||||
_GlossyReflections ("'Glossy Reflections' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
|
||||
// Advanced Options
|
||||
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||||
_Lightmapping ("'GI' {LightmapEmissionProperty:{}}", Float) = 1
|
||||
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||||
_EnableInstancing ("'Enable Instancing' {EnableInstancing:{}}", Float) = 0
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags {
|
||||
"Queue" = "Geometry"
|
||||
"RenderType" = "Opaque"
|
||||
//"DisableBatching" = "LODFading"
|
||||
}
|
||||
LOD 400
|
||||
|
||||
Pass {
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
|
||||
Blend [_SrcBlend] [_DstBlend]
|
||||
ZWrite [_ZWrite]
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _SECONDARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _TERTIARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _QUATERNARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _RIM_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdbase
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile_instancing
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/TriPlanar.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD_DELTA"
|
||||
Tags { "LightMode" = "ForwardAdd" }
|
||||
|
||||
Blend [_SrcBlend] One
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _SECONDARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _TERTIARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _QUATERNARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdadd_fullshadows
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDADD
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/TriPlanar.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Add.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "SHADOWCASTER"
|
||||
Tags { "LightMode" = "ShadowCaster" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _SECONDARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _TERTIARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _QUATERNARY_TRIPLANAR_ON
|
||||
|
||||
#pragma multi_compile_shadowcaster
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_SHADOWCASTER
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/TriPlanar.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Shadow.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "DEFERRED"
|
||||
Tags { "LightMode" = "Deferred" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _SECONDARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _TERTIARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _QUATERNARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _RIM_ON
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_prepassfinal
|
||||
#pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_DEFERRED
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/TriPlanar.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Gbuffer.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Meta"
|
||||
Tags { "LightMode" = "Meta" }
|
||||
|
||||
Cull Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _SECONDARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _TERTIARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _QUATERNARY_TRIPLANAR_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_META
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/TriPlanar.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Meta.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
FallBack "VertexLit"
|
||||
CustomEditor "AlloyFieldBasedEditor"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 52a4bae08c3e93d4e8afd6dba372345e
|
||||
timeCreated: 1432476384
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,278 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
Shader "Alloy/Legacy/Vertex Blend/4Splat TriPlanar" {
|
||||
Properties {
|
||||
// Global Settings
|
||||
_Mode ("'Rendering Mode' {RenderingMode:{Opaque:{_Cutoff}, Cutout:{}, Fade:{_Cutoff}, Transparent:{_Cutoff}}}", Float) = 0
|
||||
_SrcBlend ("__src", Float) = 0
|
||||
_DstBlend ("__dst", Float) = 0
|
||||
_ZWrite ("__zw", Float) = 1
|
||||
[LM_TransparencyCutOff]
|
||||
_Cutoff ("'Opacity Cutoff' {Min:0, Max:1}", Float) = 0.5
|
||||
[Toggle(EFFECT_BUMP)]
|
||||
_HasBumpMap ("'Normals Source' {Dropdown:{VertexNormals:{_Normal0,_Normal1,_Normal2,_Normal3,_DetailNormalMap,_DetailNormalMapScale}, NormalMaps:{}}}", Float) = 1
|
||||
|
||||
// Splat0 Properties
|
||||
_Splat0Properties ("'Splat0' {Section:{Color:0}}", Float) = 0
|
||||
_Splat0Tint ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_Splat0 ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_Splat0Velocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Normal0 ("'Normals' {Visualize:{NRM}, Parent:_Splat0}", 2D) = "bump" {}
|
||||
_Metallic0 ("'Metallic' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatSpecularity0 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint0 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatRoughness0 ("'Roughness' {Min:0, Max:1}", Float) = 1.0
|
||||
|
||||
// Splat1 Properties
|
||||
_Splat1Properties ("'Splat1' {Section:{Color:1}}", Float) = 0
|
||||
_Splat1Tint ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_Splat1 ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_Splat1Velocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Normal1 ("'Normals' {Visualize:{NRM}, Parent:_Splat1}", 2D) = "bump" {}
|
||||
_Metallic1 ("'Metallic' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatSpecularity1 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint1 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatRoughness1 ("'Roughness' {Min:0, Max:1}", Float) = 1.0
|
||||
|
||||
// Splat2 Properties
|
||||
_Splat2Properties ("'Splat2' {Section:{Color:2}}", Float) = 0
|
||||
_Splat2Tint ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_Splat2 ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_Splat2Velocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Normal2 ("'Normals' {Visualize:{NRM}, Parent:_Splat2}", 2D) = "bump" {}
|
||||
_Metallic2 ("'Metallic' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatSpecularity2 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint2 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatRoughness2 ("'Roughness' {Min:0, Max:1}", Float) = 1.0
|
||||
|
||||
// Splat3 Properties
|
||||
_Splat3Properties ("'Splat3' {Section:{Color:3}}", Float) = 0
|
||||
_Splat3Tint ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_Splat3 ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_Splat3Velocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Normal3 ("'Normals' {Visualize:{NRM}, Parent:_Splat3}", 2D) = "bump" {}
|
||||
_Metallic3 ("'Metallic' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatSpecularity3 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint3 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatRoughness3 ("'Roughness' {Min:0, Max:1}", Float) = 1.0
|
||||
|
||||
// Triplanar
|
||||
_TriplanarProperties ("'Triplanar' {Section:{Color:4}}", Float) = 0
|
||||
[Toggle(_TRIPLANARMODE_WORLD)]
|
||||
_TriplanarMode ("'Mode' {Dropdown:{Object:{}, World:{}}}", Float) = 1
|
||||
_TriplanarBlendSharpness ("'Sharpness' {Min:1, Max:50}", Float) = 2
|
||||
|
||||
// AO2
|
||||
[Toggle(_AO2_ON)]
|
||||
_AO2 ("'AO2' {Feature:{Color:6}}", Float) = 0
|
||||
_Ao2Map ("'AO2(G)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_Ao2MapUV ("UV Set", Float) = 1
|
||||
_Ao2Occlusion ("'Occlusion Strength' {Min:0, Max:1}", Float) = 1
|
||||
|
||||
// Detail
|
||||
[Toggle(_DETAIL_MULX2)]
|
||||
_DetailT ("'Detail' {Feature:{Color:7}}", Float) = 0
|
||||
[Enum(Mul, 0, MulX2, 1)]
|
||||
_DetailMode ("'Color Mode' {Dropdown:{Mul:{}, MulX2:{}}}", Float) = 0
|
||||
_DetailAlbedoMap ("'Color(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_DetailAlbedoMapUV ("UV Set", Float) = 0
|
||||
_DetailNormalMap ("'Normals' {Visualize:{NRM}, Parent:_DetailAlbedoMap}", 2D) = "bump" {}
|
||||
_DetailWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DetailNormalMapScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Decal
|
||||
[Toggle(_DECAL_ON)]
|
||||
_Decal ("'Decal' {Feature:{Color:9}}", Float) = 0
|
||||
_DecalColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_DecalTex ("'Base Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "black" {}
|
||||
_DecalTexUV ("UV Set", Float) = 0
|
||||
_DecalWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DecalSpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_DecalAlphaVertexTint ("'Vertex Alpha Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Forward Rendering Options
|
||||
_ForwardRenderingOptions ("'Forward Rendering Options' {Section:{Color:19}}", Float) = 0
|
||||
[ToggleOff]
|
||||
_SpecularHighlights ("'Specular Highlights' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
[ToggleOff]
|
||||
_GlossyReflections ("'Glossy Reflections' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
|
||||
// Advanced Options
|
||||
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||||
_Lightmapping ("'GI' {LightmapEmissionProperty:{}}", Float) = 1
|
||||
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||||
_EnableInstancing ("'Enable Instancing' {EnableInstancing:{}}", Float) = 0
|
||||
}
|
||||
|
||||
CGINCLUDE
|
||||
#define _METALLICGLOSSMAP
|
||||
ENDCG
|
||||
|
||||
SubShader {
|
||||
Tags {
|
||||
"Queue" = "Geometry"
|
||||
"RenderType" = "Opaque"
|
||||
//"DisableBatching" = "LODFading"
|
||||
}
|
||||
LOD 400
|
||||
|
||||
Pass {
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
|
||||
Blend [_SrcBlend] [_DstBlend]
|
||||
ZWrite [_ZWrite]
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _AO2_ON
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdbase
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile_instancing
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD_DELTA"
|
||||
Tags { "LightMode" = "ForwardAdd" }
|
||||
|
||||
Blend [_SrcBlend] One
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _AO2_ON
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdadd_fullshadows
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDADD
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Add.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "SHADOWCASTER"
|
||||
Tags { "LightMode" = "ShadowCaster" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
|
||||
#pragma multi_compile_shadowcaster
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_SHADOWCASTER
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Shadow.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "DEFERRED"
|
||||
Tags { "LightMode" = "Deferred" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _AO2_ON
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_prepassfinal
|
||||
#pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_DEFERRED
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Gbuffer.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Meta"
|
||||
Tags { "LightMode" = "Meta" }
|
||||
|
||||
Cull Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_META
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Meta.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
Fallback "VertexLit"
|
||||
CustomEditor "AlloyFieldBasedEditor"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 71329306b34654143a1092afc9197576
|
||||
timeCreated: 1456952688
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures:
|
||||
- _Splat0: {instanceID: 0}
|
||||
- _Normal0: {instanceID: 0}
|
||||
- _Splat1: {instanceID: 0}
|
||||
- _Normal1: {instanceID: 0}
|
||||
- _Splat2: {instanceID: 0}
|
||||
- _Normal2: {instanceID: 0}
|
||||
- _Splat3: {instanceID: 0}
|
||||
- _Normal3: {instanceID: 0}
|
||||
- _DetailAlbedoMap: {instanceID: 0}
|
||||
- _DetailMaterialMap: {fileID: 2800000, guid: 2b77d5cb601375f4ba50c6194c126e59,
|
||||
type: 3}
|
||||
- _DetailNormalMap: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,267 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
Shader "Alloy/Legacy/Vertex Blend/4Splat" {
|
||||
Properties {
|
||||
// Global Settings
|
||||
_Mode ("'Rendering Mode' {RenderingMode:{Opaque:{_Cutoff}, Cutout:{}, Fade:{_Cutoff}, Transparent:{_Cutoff}}}", Float) = 0
|
||||
_SrcBlend ("__src", Float) = 0
|
||||
_DstBlend ("__dst", Float) = 0
|
||||
_ZWrite ("__zw", Float) = 1
|
||||
[LM_TransparencyCutOff]
|
||||
_Cutoff ("'Opacity Cutoff' {Min:0, Max:1}", Float) = 0.5
|
||||
[Toggle(EFFECT_BUMP)]
|
||||
_HasBumpMap ("'Normals Source' {Dropdown:{VertexNormals:{_Normal0,_Normal1,_Normal2,_Normal3,_DetailNormalMap,_DetailNormalMapScale}, NormalMaps:{}}}", Float) = 1
|
||||
|
||||
// Splat0 Properties
|
||||
_Splat0Properties ("'Splat0' {Section:{Color:0}}", Float) = 0
|
||||
_Splat0Tint ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_Splat0 ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_Splat0Velocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Splat0UV ("UV Set", Float) = 0
|
||||
_Normal0 ("'Normals' {Visualize:{NRM}, Parent:_Splat0}", 2D) = "bump" {}
|
||||
_Metallic0 ("'Metallic' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatSpecularity0 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint0 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatRoughness0 ("'Roughness' {Min:0, Max:1}", Float) = 1.0
|
||||
|
||||
// Splat1 Properties
|
||||
_Splat1Properties ("'Splat1' {Section:{Color:0}}", Float) = 0
|
||||
_Splat1Tint ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_Splat1 ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_Splat1Velocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Splat1UV ("UV Set", Float) = 0
|
||||
_Normal1 ("'Normals' {Visualize:{NRM}, Parent:_Splat1}", 2D) = "bump" {}
|
||||
_Metallic1 ("'Metallic' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatSpecularity1 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint1 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatRoughness1 ("'Roughness' {Min:0, Max:1}", Float) = 1.0
|
||||
|
||||
// Splat2 Properties
|
||||
_Splat2Properties ("'Splat2' {Section:{Color:0}}", Float) = 0
|
||||
_Splat2Tint ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_Splat2 ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_Splat2Velocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Splat2UV ("UV Set", Float) = 0
|
||||
_Normal2 ("'Normals' {Visualize:{NRM}, Parent:_Splat2}", 2D) = "bump" {}
|
||||
_Metallic2 ("'Metallic' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatSpecularity2 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint2 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatRoughness2 ("'Roughness' {Min:0, Max:1}", Float) = 1.0
|
||||
|
||||
// Splat3 Properties
|
||||
_Splat3Properties ("'Splat3' {Section:{Color:0}}", Float) = 0
|
||||
_Splat3Tint ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_Splat3 ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_Splat3Velocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Splat3UV ("UV Set", Float) = 0
|
||||
_Normal3 ("'Normals' {Visualize:{NRM}, Parent:_Splat3}", 2D) = "bump" {}
|
||||
_Metallic3 ("'Metallic' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatSpecularity3 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint3 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatRoughness3 ("'Roughness' {Min:0, Max:1}", Float) = 1.0
|
||||
|
||||
// AO2
|
||||
[Toggle(_AO2_ON)]
|
||||
_AO2 ("'AO2' {Feature:{Color:6}}", Float) = 0
|
||||
_Ao2Map ("'AO2(G)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_Ao2MapUV ("UV Set", Float) = 1
|
||||
_Ao2Occlusion ("'Occlusion Strength' {Min:0, Max:1}", Float) = 1
|
||||
|
||||
// Detail
|
||||
[Toggle(_DETAIL_MULX2)]
|
||||
_DetailT ("'Detail' {Feature:{Color:7}}", Float) = 0
|
||||
[Enum(Mul, 0, MulX2, 1)]
|
||||
_DetailMode ("'Color Mode' {Dropdown:{Mul:{}, MulX2:{}}}", Float) = 0
|
||||
_DetailAlbedoMap ("'Color(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_DetailAlbedoMapUV ("UV Set", Float) = 0
|
||||
_DetailNormalMap ("'Normals' {Visualize:{NRM}, Parent:_DetailAlbedoMap}", 2D) = "bump" {}
|
||||
_DetailWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DetailNormalMapScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Decal
|
||||
[Toggle(_DECAL_ON)]
|
||||
_Decal ("'Decal' {Feature:{Color:9}}", Float) = 0
|
||||
_DecalColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_DecalTex ("'Base Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "black" {}
|
||||
_DecalTexUV ("UV Set", Float) = 0
|
||||
_DecalWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DecalSpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_DecalAlphaVertexTint ("'Vertex Alpha Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Forward Rendering Options
|
||||
_ForwardRenderingOptions ("'Forward Rendering Options' {Section:{Color:19}}", Float) = 0
|
||||
[ToggleOff]
|
||||
_SpecularHighlights ("'Specular Highlights' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
[ToggleOff]
|
||||
_GlossyReflections ("'Glossy Reflections' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
|
||||
// Advanced Options
|
||||
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||||
_Lightmapping ("'GI' {LightmapEmissionProperty:{}}", Float) = 1
|
||||
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||||
_EnableInstancing ("'Enable Instancing' {EnableInstancing:{}}", Float) = 0
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags {
|
||||
"RenderType" = "Opaque"
|
||||
"PerformanceChecks" = "False"
|
||||
//"DisableBatching" = "LODFading"
|
||||
}
|
||||
LOD 300
|
||||
|
||||
Pass {
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
|
||||
Blend [_SrcBlend] [_DstBlend]
|
||||
ZWrite [_ZWrite]
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _AO2_ON
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdbase
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile_instancing
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD_DELTA"
|
||||
Tags { "LightMode" = "ForwardAdd" }
|
||||
|
||||
Blend [_SrcBlend] One
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _AO2_ON
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdadd_fullshadows
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDADD
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Add.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "SHADOWCASTER"
|
||||
Tags { "LightMode" = "ShadowCaster" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
|
||||
#pragma multi_compile_shadowcaster
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_SHADOWCASTER
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Shadow.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "DEFERRED"
|
||||
Tags { "LightMode" = "Deferred" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _AO2_ON
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_prepassfinal
|
||||
#pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_DEFERRED
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Gbuffer.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Meta"
|
||||
Tags { "LightMode" = "Meta" }
|
||||
|
||||
Cull Off
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_META
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Meta.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
Fallback "VertexLit"
|
||||
CustomEditor "AlloyFieldBasedEditor"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7444e11578bca814e8e904991541ad38
|
||||
timeCreated: 1430267036
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures:
|
||||
- _Splat0: {instanceID: 0}
|
||||
- _Normal0: {instanceID: 0}
|
||||
- _Splat1: {instanceID: 0}
|
||||
- _Normal1: {instanceID: 0}
|
||||
- _Splat2: {instanceID: 0}
|
||||
- _Normal2: {instanceID: 0}
|
||||
- _Splat3: {instanceID: 0}
|
||||
- _Normal3: {instanceID: 0}
|
||||
- _DetailAlbedoMap: {instanceID: 0}
|
||||
- _DetailMaterialMap: {fileID: 2800000, guid: 2b77d5cb601375f4ba50c6194c126e59,
|
||||
type: 3}
|
||||
- _DetailNormalMap: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 538255ee068bbd14590d179e4730dc77
|
||||
folderAsset: yes
|
||||
timeCreated: 1467836690
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,267 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
Shader "Alloy/Legacy/Tessellation/Human/Eye/Eyeball (Forward)" {
|
||||
Properties {
|
||||
// Main Textures
|
||||
_MainTextures ("'Eyeball Textures' {Section:{Color:0}}", Float) = 0
|
||||
[LM_Albedo] [LM_Transparency]
|
||||
_Color ("'Tint' {}", Color) = (1,1,1,1)
|
||||
[LM_MasterTilingOffset] [LM_Albedo]
|
||||
_MainTex ("'Base Color(RGB) Iris Depth(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_MainTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_MainTexUV ("UV Set", Float) = 0
|
||||
[LM_Metallic]
|
||||
_SpecTex ("'Iris(R) AO(G) Spec(B) Rough(A)' {Visualize:{R, G, B, A}, Parent:_MainTex}", 2D) = "white" {}
|
||||
[LM_NormalMap]
|
||||
_BumpMap ("'Normals' {Visualize:{NRM}, Parent:_MainTex}", 2D) = "bump" {}
|
||||
_BaseColorVertexTint ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Main Properties
|
||||
_MainPhysicalProperties ("'Main Properties' {Section:{Color:1}}", Float) = 0
|
||||
_Specularity ("'Specularity' {Min:0, Max:1}", Float) = 1
|
||||
_Roughness ("'Roughness' {Min:0, Max:1}", Float) = 1
|
||||
_Occlusion ("'Occlusion Strength' {Min:0, Max:1}", Float) = 1
|
||||
_BumpScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Eye Properties
|
||||
_EyeProperties ("'Eye' {Section:{Color:2}}", Float) = 0
|
||||
_EyeScleraColor ("'Sclera Tint' {}", Color) = (1,1,1)
|
||||
_EyeScleraScattering ("'Sclera Scattering' {Min:0, Max:1}", Float) = 0
|
||||
_EyeSpecularity ("'Cornea Specularity' {Min:0, Max:1}", Float) = 0.36
|
||||
_EyeRoughness ("'Cornea Roughness' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Iris Properties
|
||||
_IrisProperties ("'Iris' {Section:{Color:3}}", Float) = 0
|
||||
_EyeColor ("'Tint' {}", Color) = (1,1,1)
|
||||
_EyeIrisScattering ("'Scattering' {Min:0, Max:1}", Float) = 0
|
||||
_EyeSpecularTint ("'Specular Tint' {Min:0, Max:1}", Float) = 1
|
||||
_EyeParallax ("'Depth' {Min:0, Max:0.08}", Float) = 0.08
|
||||
_EyePupilSize ("'Pupil Dilation' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Tessellation
|
||||
_TessellationProperties ("'Tessellation' {Section:{Color:5}}", Float) = 0
|
||||
[KeywordEnum(Displacement, Phong)]
|
||||
_TessellationMode ("'Mode' {Dropdown:{Displacement:{_Phong}, Phong:{_DispTex, _Displacement}}}", Float) = 0
|
||||
_DispTex ("'Heightmap(G)' {Visualize:{RGB}}", 2D) = "black" {}
|
||||
_DispTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Displacement ("'Displacement' {Min:0, Max:30}", Float) = 0.3
|
||||
_Phong ("'Phong Strength' {Min:0, Max:1}", Float) = 0.5
|
||||
_EdgeLength ("'Edge Length' {Min:2, Max:50}", Float) = 15
|
||||
|
||||
// Detail
|
||||
[Toggle(_DETAIL_MULX2)]
|
||||
_DetailT ("'Detail' {Feature:{Color:7}}", Float) = 0
|
||||
[Enum(Mul, 0, MulX2, 1)]
|
||||
_DetailMode ("'Color Mode' {Dropdown:{Mul:{}, MulX2:{}}}", Float) = 0
|
||||
_DetailAlbedoMap ("'Color(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_DetailAlbedoMapVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_DetailAlbedoMapUV ("UV Set", Float) = 0
|
||||
_DetailNormalMap ("'Normals' {Visualize:{NRM}, Parent:_DetailAlbedoMap}", 2D) = "bump" {}
|
||||
_DetailWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DetailNormalMapScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Decal
|
||||
[Toggle(_DECAL_ON)]
|
||||
_Decal ("'Decal' {Feature:{Color:9}}", Float) = 0
|
||||
_DecalColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_DecalTex ("'Base Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "black" {}
|
||||
_DecalTexUV ("UV Set", Float) = 0
|
||||
_DecalWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DecalSpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_DecalAlphaVertexTint ("'Vertex Alpha Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Emission
|
||||
[Toggle(_EMISSION)]
|
||||
_Emission ("'Emission' {Feature:{Color:10}}", Float) = 0
|
||||
[LM_Emission]
|
||||
[HDR]
|
||||
_EmissionColor ("'Tint' {}", Color) = (1,1,1)
|
||||
[LM_Emission]
|
||||
_EmissionMap ("'Mask(RGB)' {Visualize:{RGB}, Parent:_MainTex}", 2D) = "white" {}
|
||||
_IncandescenceMap ("'Effect(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_IncandescenceMapVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_IncandescenceMapUV ("UV Set", Float) = 0
|
||||
[Gamma]
|
||||
_EmissionWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
|
||||
// Rim Emission
|
||||
[Toggle(_RIM_ON)]
|
||||
_Rim ("'Rim Emission' {Feature:{Color:11}}", Float) = 0
|
||||
[HDR]
|
||||
_RimColor ("'Tint' {}", Color) = (1,1,1)
|
||||
_RimTex ("'Effect(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_RimTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_RimTexUV ("UV Set", Float) = 0
|
||||
[Gamma]
|
||||
_RimWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
[Gamma]
|
||||
_RimBias ("'Fill' {Min:0, Max:1}", Float) = 0
|
||||
_RimPower ("'Falloff' {Min:0.01}", Float) = 4
|
||||
|
||||
// Dissolve
|
||||
[Toggle(_DISSOLVE_ON)]
|
||||
_Dissolve ("'Dissolve' {Feature:{Color:12}}", Float) = 0
|
||||
[HDR]
|
||||
_DissolveGlowColor ("'Glow Tint' {}", Color) = (1,1,1,1)
|
||||
_DissolveTex ("'Glow Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_DissolveTexUV ("UV Set", Float) = 0
|
||||
_DissolveCutoff ("'Cutoff' {Min:0, Max:1}", Float) = 0
|
||||
[Gamma]
|
||||
_DissolveGlowWeight ("'Glow Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DissolveEdgeWidth ("'Glow Width' {Min:0, Max:1}", Float) = 0.01
|
||||
|
||||
// Forward Rendering Options
|
||||
_ForwardRenderingOptions ("'Forward Rendering Options' {Section:{Color:19}}", Float) = 0
|
||||
[ToggleOff]
|
||||
_SpecularHighlights ("'Specular Highlights' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
[ToggleOff]
|
||||
_GlossyReflections ("'Glossy Reflections' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
|
||||
// Advanced Options
|
||||
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||||
_Lightmapping ("'GI' {LightmapEmissionProperty:{}}", Float) = 1
|
||||
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||||
_EnableInstancing ("'Enable Instancing' {EnableInstancing:{}}", Float) = 0
|
||||
}
|
||||
|
||||
CGINCLUDE
|
||||
#define A_TESSELLATION_SHADER
|
||||
ENDCG
|
||||
|
||||
SubShader {
|
||||
Tags {
|
||||
"Queue" = "Geometry"
|
||||
"RenderType" = "Opaque"
|
||||
//"DisableBatching" = "LODFading"
|
||||
}
|
||||
LOD 400
|
||||
|
||||
Pass {
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _TESSELLATIONMODE_DISPLACEMENT _TESSELLATIONMODE_PHONG
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _EMISSION
|
||||
#pragma shader_feature _RIM_ON
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdbase
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile_instancing
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/EyeballForward.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD_DELTA"
|
||||
Tags { "LightMode" = "ForwardAdd" }
|
||||
|
||||
Blend One One
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _TESSELLATIONMODE_DISPLACEMENT _TESSELLATIONMODE_PHONG
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdadd_fullshadows
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDADD
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/EyeballForward.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Add.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "SHADOWCASTER"
|
||||
Tags { "LightMode" = "ShadowCaster" }
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _TESSELLATIONMODE_DISPLACEMENT _TESSELLATIONMODE_PHONG
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
|
||||
#pragma multi_compile_shadowcaster
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_SHADOWCASTER
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/EyeballForward.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Shadow.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Meta"
|
||||
Tags { "LightMode" = "Meta" }
|
||||
|
||||
Cull Off
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _EMISSION
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_META
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/EyeballForward.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Meta.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
FallBack "Alloy/Legacy/Human/Eye/Eyeball (Forward)"
|
||||
CustomEditor "AlloyFieldBasedEditor"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 45fdb5e0258f7bf44916ac39114720f4
|
||||
ShaderImporter:
|
||||
defaultTextures:
|
||||
- _MainTex: {instanceID: 0}
|
||||
- _SpecTex: {instanceID: 0}
|
||||
- _BumpMap: {instanceID: 0}
|
||||
- _DetailMask: {instanceID: 0}
|
||||
- _DetailAlbedoMap: {instanceID: 0}
|
||||
- _DetailMaterialMap: {fileID: 2800000, guid: 2b77d5cb601375f4ba50c6194c126e59,
|
||||
type: 3}
|
||||
- _DetailNormalMap: {instanceID: 0}
|
||||
- _DecalTex: {instanceID: 0}
|
||||
- _EmissionMap: {instanceID: 0}
|
||||
- _IncandescenceMap: {instanceID: 0}
|
||||
- _RimTex: {instanceID: 0}
|
||||
- _DissolveTex: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,300 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
Shader "Alloy/Legacy/Tessellation/Human/Eye/Eyeball" {
|
||||
Properties {
|
||||
// Main Textures
|
||||
_MainTextures ("'Eyeball Textures' {Section:{Color:0}}", Float) = 0
|
||||
[LM_Albedo] [LM_Transparency]
|
||||
_Color ("'Tint' {}", Color) = (1,1,1,1)
|
||||
[LM_MasterTilingOffset] [LM_Albedo]
|
||||
_MainTex ("'Base Color(RGB) Iris Depth(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_MainTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_MainTexUV ("UV Set", Float) = 0
|
||||
[LM_Metallic]
|
||||
_SpecTex ("'Iris(R) AO(G) Spec(B) Rough(A)' {Visualize:{R, G, B, A}, Parent:_MainTex}", 2D) = "white" {}
|
||||
[LM_NormalMap]
|
||||
_BumpMap ("'Normals' {Visualize:{NRM}, Parent:_MainTex}", 2D) = "bump" {}
|
||||
_BaseColorVertexTint ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Main Properties
|
||||
_MainPhysicalProperties ("'Main Properties' {Section:{Color:1}}", Float) = 0
|
||||
_Specularity ("'Specularity' {Min:0, Max:1}", Float) = 1
|
||||
_Roughness ("'Roughness' {Min:0, Max:1}", Float) = 1
|
||||
_Occlusion ("'Occlusion Strength' {Min:0, Max:1}", Float) = 1
|
||||
_BumpScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Eye Properties
|
||||
_EyeProperties ("'Cornea' {Section:{Color:2}}", Float) = 0
|
||||
_EyeBumpMap ("'Normals' {Visualize:{NRM}, Parent:_MainTex}", 2D) = "bump" {}
|
||||
_EyeCorneaWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_EyeRoughness ("'Roughness' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Iris Properties
|
||||
_IrisProperties ("'Iris' {Section:{Color:3}}", Float) = 0
|
||||
_EyeScleraColor("'Sclera Tint' {}", Color) = (1,1,1)
|
||||
_EyeColor ("'Tint' {}", Color) = (1,1,1)
|
||||
_EyeSpecularTint ("'Specular Tint' {Min:0, Max:1}", Float) = 1
|
||||
_EyeParallax ("'Depth' {Min:0, Max:0.08}", Float) = 0.08
|
||||
_EyePupilSize ("'Pupil Dilation' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Tessellation
|
||||
_TessellationProperties ("'Tessellation' {Section:{Color:5}}", Float) = 0
|
||||
[KeywordEnum(Displacement, Phong)]
|
||||
_TessellationMode ("'Mode' {Dropdown:{Displacement:{_Phong}, Phong:{_DispTex, _Displacement}}}", Float) = 0
|
||||
_DispTex ("'Heightmap(G)' {Visualize:{RGB}}", 2D) = "black" {}
|
||||
_DispTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Displacement ("'Displacement' {Min:0, Max:30}", Float) = 0.3
|
||||
_Phong ("'Phong Strength' {Min:0, Max:1}", Float) = 0.5
|
||||
_EdgeLength ("'Edge Length' {Min:2, Max:50}", Float) = 15
|
||||
|
||||
// Detail
|
||||
[Toggle(_DETAIL_MULX2)]
|
||||
_DetailT ("'Detail' {Feature:{Color:7}}", Float) = 0
|
||||
[Enum(Mul, 0, MulX2, 1)]
|
||||
_DetailMode ("'Color Mode' {Dropdown:{Mul:{}, MulX2:{}}}", Float) = 0
|
||||
_DetailAlbedoMap ("'Color(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_DetailAlbedoMapVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_DetailAlbedoMapUV ("UV Set", Float) = 0
|
||||
_DetailNormalMap ("'Normals' {Visualize:{NRM}, Parent:_DetailAlbedoMap}", 2D) = "bump" {}
|
||||
_DetailWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DetailNormalMapScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Decal
|
||||
[Toggle(_DECAL_ON)]
|
||||
_Decal ("'Decal' {Feature:{Color:9}}", Float) = 0
|
||||
_DecalColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_DecalTex ("'Base Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "black" {}
|
||||
_DecalTexUV ("UV Set", Float) = 0
|
||||
_DecalWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DecalSpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_DecalAlphaVertexTint ("'Vertex Alpha Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Emission
|
||||
[Toggle(_EMISSION)]
|
||||
_Emission ("'Emission' {Feature:{Color:10}}", Float) = 0
|
||||
[LM_Emission]
|
||||
[HDR]
|
||||
_EmissionColor ("'Tint' {}", Color) = (1,1,1)
|
||||
[LM_Emission]
|
||||
_EmissionMap ("'Mask(RGB)' {Visualize:{RGB}, Parent:_MainTex}", 2D) = "white" {}
|
||||
_IncandescenceMap ("'Effect(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_IncandescenceMapVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_IncandescenceMapUV ("UV Set", Float) = 0
|
||||
[Gamma]
|
||||
_EmissionWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
|
||||
// Rim Emission
|
||||
[Toggle(_RIM_ON)]
|
||||
_Rim ("'Rim Emission' {Feature:{Color:11}}", Float) = 0
|
||||
[HDR]
|
||||
_RimColor ("'Tint' {}", Color) = (1,1,1)
|
||||
_RimTex ("'Effect(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_RimTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_RimTexUV ("UV Set", Float) = 0
|
||||
[Gamma]
|
||||
_RimWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
[Gamma]
|
||||
_RimBias ("'Fill' {Min:0, Max:1}", Float) = 0
|
||||
_RimPower ("'Falloff' {Min:0.01}", Float) = 4
|
||||
|
||||
// Dissolve
|
||||
[Toggle(_DISSOLVE_ON)]
|
||||
_Dissolve ("'Dissolve' {Feature:{Color:12}}", Float) = 0
|
||||
[HDR]
|
||||
_DissolveGlowColor ("'Glow Tint' {}", Color) = (1,1,1,1)
|
||||
_DissolveTex ("'Glow Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_DissolveTexUV ("UV Set", Float) = 0
|
||||
_DissolveCutoff ("'Cutoff' {Min:0, Max:1}", Float) = 0
|
||||
[Gamma]
|
||||
_DissolveGlowWeight ("'Glow Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DissolveEdgeWidth ("'Glow Width' {Min:0, Max:1}", Float) = 0.01
|
||||
|
||||
// Forward Rendering Options
|
||||
_ForwardRenderingOptions ("'Forward Rendering Options' {Section:{Color:19}}", Float) = 0
|
||||
[ToggleOff]
|
||||
_SpecularHighlights ("'Specular Highlights' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
[ToggleOff]
|
||||
_GlossyReflections ("'Glossy Reflections' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
|
||||
// Advanced Options
|
||||
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||||
_Lightmapping ("'GI' {LightmapEmissionProperty:{}}", Float) = 1
|
||||
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||||
_EnableInstancing ("'Enable Instancing' {EnableInstancing:{}}", Float) = 0
|
||||
}
|
||||
|
||||
CGINCLUDE
|
||||
#define A_TESSELLATION_SHADER
|
||||
ENDCG
|
||||
|
||||
SubShader {
|
||||
Tags {
|
||||
"Queue" = "Geometry"
|
||||
"RenderType" = "Opaque"
|
||||
//"DisableBatching" = "LODFading"
|
||||
}
|
||||
LOD 400
|
||||
|
||||
Pass {
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _TESSELLATIONMODE_DISPLACEMENT _TESSELLATIONMODE_PHONG
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _EMISSION
|
||||
#pragma shader_feature _RIM_ON
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdbase
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile_instancing
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/Eyeball.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD_DELTA"
|
||||
Tags { "LightMode" = "ForwardAdd" }
|
||||
|
||||
Blend One One
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _TESSELLATIONMODE_DISPLACEMENT _TESSELLATIONMODE_PHONG
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdadd_fullshadows
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDADD
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/Eyeball.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Add.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "SHADOWCASTER"
|
||||
Tags { "LightMode" = "ShadowCaster" }
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _TESSELLATIONMODE_DISPLACEMENT _TESSELLATIONMODE_PHONG
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
|
||||
#pragma multi_compile_shadowcaster
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_SHADOWCASTER
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/Eyeball.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Shadow.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "DEFERRED"
|
||||
Tags { "LightMode" = "Deferred" }
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _TESSELLATIONMODE_DISPLACEMENT _TESSELLATIONMODE_PHONG
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _EMISSION
|
||||
#pragma shader_feature _RIM_ON
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_prepassfinal
|
||||
#pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_DEFERRED
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/Eyeball.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Gbuffer.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Meta"
|
||||
Tags { "LightMode" = "Meta" }
|
||||
|
||||
Cull Off
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _EMISSION
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_META
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/Eyeball.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Meta.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
FallBack "Alloy/Legacy/Human/Eye/Eyeball"
|
||||
CustomEditor "AlloyFieldBasedEditor"
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c58fa41adb95452478df012706cfffba
|
||||
timeCreated: 1445805716
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures:
|
||||
- _MainTex: {instanceID: 0}
|
||||
- _SpecTex: {instanceID: 0}
|
||||
- _BumpMap: {instanceID: 0}
|
||||
- _EyeBumpMap: {instanceID: 0}
|
||||
- _DispTex: {instanceID: 0}
|
||||
- _DetailAlbedoMap: {instanceID: 0}
|
||||
- _DetailMaterialMap: {fileID: 2800000, guid: 2b77d5cb601375f4ba50c6194c126e59,
|
||||
type: 3}
|
||||
- _DetailNormalMap: {instanceID: 0}
|
||||
- _DecalTex: {instanceID: 0}
|
||||
- _EmissionMap: {instanceID: 0}
|
||||
- _IncandescenceMap: {instanceID: 0}
|
||||
- _RimTex: {instanceID: 0}
|
||||
- _DissolveTex: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,100 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
Shader "Alloy/Legacy/Tessellation/Human/Eye/Occlusion" {
|
||||
Properties {
|
||||
// Main Textures
|
||||
_MainTextures ("'Eye OcclusionTextures' {Section:{Color:0}}", Float) = 0
|
||||
_Color ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_MainTex ("'Base Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_MainTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_MainTexUV ("UV Set", Float) = 0
|
||||
_AoMap ("'Ambient Occlusion(G)' {Visualize:{RGB}, Parent:_MainTex}", 2D) = "white" {}
|
||||
_BaseColorVertexTint ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Main Properties
|
||||
_MainPhysicalProperties ("'Main Properties' {Section:{Color:1}}", Float) = 0
|
||||
_Occlusion ("'Occlusion Strength' {Min:0, Max:1}", Float) = 1
|
||||
|
||||
// Tessellation
|
||||
_TessellationProperties ("'Tessellation' {Section:{Color:5}}", Float) = 0
|
||||
[KeywordEnum(Displacement, Phong)]
|
||||
_TessellationMode ("'Mode' {Dropdown:{Displacement:{_Phong}, Phong:{_DispTex, _Displacement}}}", Float) = 0
|
||||
_DispTex ("'Heightmap(G)' {Visualize:{RGB}}", 2D) = "black" {}
|
||||
_DispTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Displacement ("'Displacement' {Min:0, Max:30}", Float) = 0.3
|
||||
_Phong ("'Phong Strength' {Min:0, Max:1}", Float) = 0.5
|
||||
_EdgeLength ("'Edge Length' {Min:2, Max:50}", Float) = 15
|
||||
|
||||
// Dissolve
|
||||
[Toggle(_DISSOLVE_ON)]
|
||||
_Dissolve ("'Dissolve' {Feature:{Color:12}}", Float) = 0
|
||||
[HDR]
|
||||
_DissolveGlowColor ("'Glow Tint' {}", Color) = (1,1,1,1)
|
||||
_DissolveTex ("'Glow Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_DissolveTexUV ("UV Set", Float) = 0
|
||||
_DissolveCutoff ("'Cutoff' {Min:0, Max:1}", Float) = 0
|
||||
[Gamma]
|
||||
_DissolveGlowWeight ("'Glow Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DissolveEdgeWidth ("'Glow Width' {Min:0, Max:1}", Float) = 0.01
|
||||
|
||||
// Advanced Options
|
||||
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||||
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||||
_EnableInstancing ("'Enable Instancing' {EnableInstancing:{}}", Float) = 0
|
||||
}
|
||||
|
||||
CGINCLUDE
|
||||
#define _ALPHAPREMULTIPLY_ON
|
||||
#define A_TESSELLATION_SHADER
|
||||
ENDCG
|
||||
|
||||
SubShader {
|
||||
Tags {
|
||||
"Queue" = "Transparent-1"
|
||||
"IgnoreProjector" = "True"
|
||||
"RenderType" = "Transparent"
|
||||
"ForceNoShadowCasting" = "True"
|
||||
//"DisableBatching" = "LODFading"
|
||||
}
|
||||
LOD 400
|
||||
Offset -1,-1
|
||||
|
||||
Pass {
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _TESSELLATIONMODE_DISPLACEMENT _TESSELLATIONMODE_PHONG
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdbase
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile_instancing
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/EyeOcclusion.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
FallBack "Alloy/Legacy/Human/Eye/Occlusion"
|
||||
CustomEditor "AlloyFieldBasedEditor"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fd2ba45ab46492449b2d6f4dc2916d5d
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,295 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
Shader "Alloy/Legacy/Tessellation/Human/Skin (Forward)" {
|
||||
Properties {
|
||||
[Toggle(EFFECT_BUMP)]
|
||||
_HasBumpMap ("'Normals Source' {Dropdown:{VertexNormals:{_BumpMap,_BumpScale,_SssBumpBlur,_DetailNormalMap,_DetailNormalMapScale,_WetNormalMap,_WetNormalMapScale}, NormalMaps:{}}}", Float) = 1
|
||||
|
||||
// Skin Textures
|
||||
_MainTextures ("'Skin Textures' {Section:{Color:0}}", Float) = 0
|
||||
[LM_Albedo] [LM_Transparency]
|
||||
_Color ("'Tint' {}", Color) = (1,1,1,1)
|
||||
[LM_MasterTilingOffset] [LM_Albedo]
|
||||
_MainTex ("'Base Color(RGB) SSS(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_MainTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_MainTexUV ("UV Set", Float) = 0
|
||||
[LM_Metallic]
|
||||
_SpecTex ("'Skin(R) AO(G) Spec(B) Rough(A)' {Visualize:{R, G, B, A}, Parent:_MainTex}", 2D) = "white" {}
|
||||
[LM_NormalMap]
|
||||
_BumpMap ("'Normals' {Visualize:{NRM}, Parent:_MainTex}", 2D) = "bump" {}
|
||||
_BaseColorVertexTint ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Skin Properties
|
||||
_MainPhysicalProperties ("'Skin Properties' {Section:{Color:1}}", Float) = 0
|
||||
_Specularity ("'Specularity' {Min:0, Max:1}", Float) = 1
|
||||
_Roughness ("'Roughness' {Min:0, Max:1}", Float) = 1
|
||||
_Occlusion ("'Occlusion Strength' {Min:0, Max:1}", Float) = 1
|
||||
_BumpScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Scattering
|
||||
_ScatteringProperties ("'Scattering' {Section:{Color:2}}", Float) = 0
|
||||
_SssBrdfTex ("'LUT' {Controls:False}", 2D) = "gray" {}
|
||||
_SssBias ("'Bias' {Min:0, Max:1}", Float) = 0
|
||||
_SssScale ("'Scale' {Min:0, Max:1}", Float) = 1
|
||||
_SssAoSaturation ("'AO Saturation' {Min:0, Max:1}", Float) = 0.5
|
||||
_SssBumpBlur ("'Bump Blur' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Transmission
|
||||
_TransmissionProperties ("'Transmission' {Section:{Color:3}}", Float) = 0
|
||||
_TransColor ("'Tint' {}", Color) = (1,1,1)
|
||||
[Gamma]
|
||||
_TransScale ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_TransPower ("'Falloff' {Min:1}", Float) = 1
|
||||
_TransDistortion ("'Bump Distortion' {Min:0, Max:1}", Float) = 0.1
|
||||
|
||||
// Tessellation
|
||||
_TessellationProperties ("'Tessellation' {Section:{Color:5}}", Float) = 0
|
||||
[KeywordEnum(Displacement, Phong)]
|
||||
_TessellationMode ("'Mode' {Dropdown:{Displacement:{_Phong}, Phong:{_DispTex, _Displacement}}}", Float) = 0
|
||||
_DispTex ("'Heightmap(G)' {Visualize:{RGB}}", 2D) = "black" {}
|
||||
_DispTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Displacement ("'Displacement' {Min:0, Max:30}", Float) = 0.3
|
||||
_Phong ("'Phong Strength' {Min:0, Max:1}", Float) = 0.5
|
||||
_EdgeLength ("'Edge Length' {Min:2, Max:50}", Float) = 15
|
||||
|
||||
// Detail
|
||||
[Toggle(_DETAIL_MULX2)]
|
||||
_DetailT ("'Detail' {Feature:{Color:7}}", Float) = 0
|
||||
[Toggle(_NORMALMAP)]
|
||||
_DetailMaskSource ("'Mask Source' {Dropdown:{TextureAlpha:{}, VertexColorAlpha:{_DetailMask}}}", Float) = 0
|
||||
_DetailMask ("'Mask(A)' {Visualize:{A}, Parent:_MainTex}", 2D) = "white" {}
|
||||
_DetailMaskStrength ("'Mask Strength' {Min:0, Max:1}", Float) = 1
|
||||
[Enum(Mul, 0, MulX2, 1)]
|
||||
_DetailMode ("'Color Mode' {Dropdown:{Mul:{}, MulX2:{}}}", Float) = 0
|
||||
_DetailAlbedoMap ("'Color(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_DetailAlbedoMapVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_DetailAlbedoMapUV ("UV Set", Float) = 0
|
||||
_DetailNormalMap ("'Normals' {Visualize:{NRM}, Parent:_DetailAlbedoMap}", 2D) = "bump" {}
|
||||
_DetailWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DetailNormalMapScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Team Color
|
||||
[Toggle(_TEAMCOLOR_ON)]
|
||||
_TeamColor ("'Team Color' {Feature:{Color:8}}", Float) = 0
|
||||
[Enum(Masks, 0, Tint, 1)]
|
||||
_TeamColorMasksAsTint ("'Texture Mode' {Dropdown:{Masks:{}, Tint:{_TeamColorMasks, _TeamColor0, _TeamColor1, _TeamColor2, _TeamColor3}}}", Float) = 0
|
||||
_TeamColorMaskMap ("'Masks(RGBA)' {Visualize:{R, G, B, A, RGB}, Parent:_MainTex}", 2D) = "black" {}
|
||||
_TeamColorMasks ("'Channels' {Vector:Channels}", Vector) = (1,1,1,0)
|
||||
_TeamColor0 ("'Tint R' {}", Color) = (1,0,0)
|
||||
_TeamColor1 ("'Tint G' {}", Color) = (0,1,0)
|
||||
_TeamColor2 ("'Tint B' {}", Color) = (0,0,1)
|
||||
_TeamColor3 ("'Tint A' {}", Color) = (0.5,0.5,0.5)
|
||||
|
||||
// Decal
|
||||
[Toggle(_DECAL_ON)]
|
||||
_Decal ("'Decal' {Feature:{Color:9}}", Float) = 0
|
||||
_DecalColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_DecalTex ("'Base Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "black" {}
|
||||
_DecalTexUV ("UV Set", Float) = 0
|
||||
_DecalWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DecalSpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_DecalAlphaVertexTint ("'Vertex Alpha Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Emission
|
||||
[Toggle(_EMISSION)]
|
||||
_Emission ("'Emission' {Feature:{Color:10}}", Float) = 0
|
||||
[LM_Emission]
|
||||
[HDR]
|
||||
_EmissionColor ("'Tint' {}", Color) = (1,1,1)
|
||||
[LM_Emission]
|
||||
_EmissionMap ("'Mask(RGB)' {Visualize:{RGB}, Parent:_MainTex}", 2D) = "white" {}
|
||||
_IncandescenceMap ("'Effect(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_IncandescenceMapVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_IncandescenceMapUV ("UV Set", Float) = 0
|
||||
[Gamma]
|
||||
_EmissionWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
|
||||
// Rim Emission
|
||||
[Toggle(_RIM_ON)]
|
||||
_Rim ("'Rim Emission' {Feature:{Color:11}}", Float) = 0
|
||||
[HDR]
|
||||
_RimColor ("'Tint' {}", Color) = (1,1,1)
|
||||
_RimTex ("'Effect(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_RimTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_RimTexUV ("UV Set", Float) = 0
|
||||
[Gamma]
|
||||
_RimWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
[Gamma]
|
||||
_RimBias ("'Fill' {Min:0, Max:1}", Float) = 0
|
||||
_RimPower ("'Falloff' {Min:0.01}", Float) = 4
|
||||
|
||||
// Dissolve
|
||||
[Toggle(_DISSOLVE_ON)]
|
||||
_Dissolve ("'Dissolve' {Feature:{Color:12}}", Float) = 0
|
||||
[HDR]
|
||||
_DissolveGlowColor ("'Glow Tint' {}", Color) = (1,1,1,1)
|
||||
_DissolveTex ("'Glow Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_DissolveTexUV ("UV Set", Float) = 0
|
||||
_DissolveCutoff ("'Cutoff' {Min:0, Max:1}", Float) = 0
|
||||
[Gamma]
|
||||
_DissolveGlowWeight ("'Glow Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DissolveEdgeWidth ("'Glow Width' {Min:0, Max:1}", Float) = 0.01
|
||||
|
||||
// Forward Rendering Options
|
||||
_ForwardRenderingOptions ("'Forward Rendering Options' {Section:{Color:19}}", Float) = 0
|
||||
[ToggleOff]
|
||||
_SpecularHighlights ("'Specular Highlights' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
[ToggleOff]
|
||||
_GlossyReflections ("'Glossy Reflections' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
|
||||
// Advanced Options
|
||||
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||||
_Lightmapping ("'GI' {LightmapEmissionProperty:{}}", Float) = 1
|
||||
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||||
_EnableInstancing ("'Enable Instancing' {EnableInstancing:{}}", Float) = 0
|
||||
}
|
||||
|
||||
CGINCLUDE
|
||||
#define A_TESSELLATION_SHADER
|
||||
ENDCG
|
||||
|
||||
SubShader {
|
||||
Tags {
|
||||
"Queue" = "Geometry"
|
||||
"RenderType" = "Opaque"
|
||||
//"DisableBatching" = "LODFading"
|
||||
}
|
||||
LOD 400
|
||||
|
||||
Pass {
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _TESSELLATIONMODE_DISPLACEMENT _TESSELLATIONMODE_PHONG
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _NORMALMAP
|
||||
#pragma shader_feature _TEAMCOLOR_ON
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _EMISSION
|
||||
#pragma shader_feature _RIM_ON
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdbase
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile_instancing
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/SkinForward.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD_DELTA"
|
||||
Tags { "LightMode" = "ForwardAdd" }
|
||||
|
||||
Blend One One
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _TESSELLATIONMODE_DISPLACEMENT _TESSELLATIONMODE_PHONG
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _NORMALMAP
|
||||
#pragma shader_feature _TEAMCOLOR_ON
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdadd_fullshadows
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDADD
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/SkinForward.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Add.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "SHADOWCASTER"
|
||||
Tags { "LightMode" = "ShadowCaster" }
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _TESSELLATIONMODE_DISPLACEMENT _TESSELLATIONMODE_PHONG
|
||||
#pragma shader_feature _DISSOLVE_ON
|
||||
|
||||
#pragma multi_compile_shadowcaster
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_SHADOWCASTER
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/SkinForward.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Shadow.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Meta"
|
||||
Tags { "LightMode" = "Meta" }
|
||||
|
||||
Cull Off
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _NORMALMAP
|
||||
#pragma shader_feature _TEAMCOLOR_ON
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _EMISSION
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_META
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/SkinForward.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Meta.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
FallBack "Alloy/Legacy/Human/Skin (Forward)"
|
||||
CustomEditor "AlloyFieldBasedEditor"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2eb313efdbec1e74582aaa1d35f62038
|
||||
ShaderImporter:
|
||||
defaultTextures:
|
||||
- _MainTex: {instanceID: 0}
|
||||
- _SpecTex: {instanceID: 0}
|
||||
- _BumpMap: {instanceID: 0}
|
||||
- _SssBrdfTex: {fileID: 2800000, guid: d13510bb2be49aa40a66a0101efb6a36, type: 3}
|
||||
- _DispTex: {instanceID: 0}
|
||||
- _DetailMask: {instanceID: 0}
|
||||
- _DetailAlbedoMap: {instanceID: 0}
|
||||
- _DetailMaterialMap: {fileID: 2800000, guid: 2b77d5cb601375f4ba50c6194c126e59,
|
||||
type: 3}
|
||||
- _DetailNormalMap: {instanceID: 0}
|
||||
- _TeamColorMaskMap: {instanceID: 0}
|
||||
- _DecalTex: {instanceID: 0}
|
||||
- _EmissionMap: {instanceID: 0}
|
||||
- _IncandescenceMap: {instanceID: 0}
|
||||
- _RimTex: {instanceID: 0}
|
||||
- _DissolveTex: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,292 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
Shader "Alloy/Legacy/Tessellation/TriPlanar/Lite" {
|
||||
Properties {
|
||||
// Global Settings
|
||||
_Mode ("'Rendering Mode' {RenderingMode:{Opaque:{_Cutoff}, Cutout:{}, Fade:{_Cutoff}, Transparent:{_Cutoff}}}", Float) = 0
|
||||
_SrcBlend ("__src", Float) = 0
|
||||
_DstBlend ("__dst", Float) = 0
|
||||
_ZWrite ("__zw", Float) = 1
|
||||
[LM_TransparencyCutOff]
|
||||
_Cutoff ("'Opacity Cutoff' {Min:0, Max:1}", Float) = 0.5
|
||||
[Toggle(EFFECT_BUMP)]
|
||||
_HasBumpMap ("'Normals Source' {Dropdown:{VertexNormals:{_PrimaryBumpMap,_PrimaryBumpScale,_SecondaryBumpMap,_SecondaryBumpScale,_TertiaryBumpMap,_TertiaryBumpScale,_QuaternaryBumpMap,_QuaternaryBumpScale}, NormalMaps:{}}}", Float) = 1
|
||||
|
||||
// Primary Textures
|
||||
_PrimaryTextures ("'Primary Textures' {Section:{Color:0}}", Float) = 0
|
||||
_PrimaryColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_PrimaryMainTex ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_PrimaryMainTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_PrimaryBumpMap ("'Normals' {Visualize:{NRM}, Parent:_PrimaryMainTex}", 2D) = "bump" {}
|
||||
_PrimaryColorVertexTint ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0
|
||||
_PrimaryMetallic ("'Metallic' {Min:0, Max:1}", Float) = 0
|
||||
_PrimarySpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_PrimarySpecularTint ("'Specular Tint' {Min:0, Max:1}", Float) = 0
|
||||
_PrimaryRoughness ("'Roughness' {Min:0, Max:1}", Float) = 1
|
||||
_PrimaryBumpScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Secondary Textures
|
||||
[Toggle(_SECONDARY_TRIPLANAR_ON)]
|
||||
_SecondaryTextures ("'Secondary Textures' {Feature:{Color:1}}", Float) = 0
|
||||
_SecondaryColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_SecondaryMainTex ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_SecondaryMainTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_SecondaryBumpMap ("'Normals' {Visualize:{NRM}, Parent:_SecondaryMainTex}", 2D) = "bump" {}
|
||||
_SecondaryColorVertexTint ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0
|
||||
_SecondaryMetallic ("'Metallic' {Min:0, Max:1}", Float) = 0
|
||||
_SecondarySpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SecondarySpecularTint ("'Specular Tint' {Min:0, Max:1}", Float) = 0
|
||||
_SecondaryRoughness ("'Roughness' {Min:0, Max:1}", Float) = 1
|
||||
_SecondaryBumpScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Tertiary Textures
|
||||
[Toggle(_TERTIARY_TRIPLANAR_ON)]
|
||||
_TertiaryTextures ("'Tertiary Textures' {Feature:{Color:2}}", Float) = 0
|
||||
_TertiaryColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_TertiaryMainTex ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_TertiaryMainTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_TertiaryBumpMap ("'Normals' {Visualize:{NRM}, Parent:_TertiaryMainTex}", 2D) = "bump" {}
|
||||
_TertiaryColorVertexTint ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0
|
||||
_TertiaryMetallic ("'Metallic' {Min:0, Max:1}", Float) = 0
|
||||
_TertiarySpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_TertiarySpecularTint ("'Specular Tint' {Min:0, Max:1}", Float) = 0
|
||||
_TertiaryRoughness ("'Roughness' {Min:0, Max:1}", Float) = 1
|
||||
_TertiaryBumpScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Quaternary Textures
|
||||
[Toggle(_QUATERNARY_TRIPLANAR_ON)]
|
||||
_QuaternaryTextures ("'Quaternary Textures' {Feature:{Color:3}}", Float) = 0
|
||||
_QuaternaryColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_QuaternaryMainTex ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_QuaternaryMainTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_QuaternaryBumpMap ("'Normals' {Visualize:{NRM}, Parent:_QuaternaryMainTex}", 2D) = "bump" {}
|
||||
_QuaternaryColorVertexTint ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0
|
||||
_QuaternaryMetallic ("'Metallic' {Min:0, Max:1}", Float) = 0
|
||||
_QuaternarySpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_QuaternarySpecularTint ("'Specular Tint' {Min:0, Max:1}", Float) = 0
|
||||
_QuaternaryRoughness ("'Roughness' {Min:0, Max:1}", Float) = 1
|
||||
_QuaternaryBumpScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Triplanar
|
||||
_TriplanarProperties ("'Triplanar' {Section:{Color:4}}", Float) = 0
|
||||
[Toggle(_TRIPLANARMODE_WORLD)]
|
||||
_TriplanarMode ("'Mode' {Dropdown:{Object:{}, World:{}}}", Float) = 1
|
||||
_TriplanarBlendSharpness ("'Sharpness' {Min:1, Max:50}", Float) = 2
|
||||
|
||||
// Tessellation
|
||||
_TessellationProperties ("'Tessellation' {Section:{Color:5}}", Float) = 0
|
||||
_Phong ("'Phong Strength' {Min:0, Max:1}", Float) = 0.5
|
||||
_EdgeLength ("'Edge Length' {Min:2, Max:50}", Float) = 15
|
||||
|
||||
// Rim Emission
|
||||
[Toggle(_RIM_ON)]
|
||||
_Rim ("'Rim Emission' {Feature:{Color:11}}", Float) = 0
|
||||
[HDR]
|
||||
_RimColor ("'Tint' {}", Color) = (1,1,1)
|
||||
[Gamma]
|
||||
_RimWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
[Gamma]
|
||||
_RimBias ("'Fill' {Min:0, Max:1}", Float) = 0
|
||||
_RimPower ("'Falloff' {Min:0.01}", Float) = 4
|
||||
|
||||
// Forward Rendering Options
|
||||
_ForwardRenderingOptions ("'Forward Rendering Options' {Section:{Color:19}}", Float) = 0
|
||||
[ToggleOff]
|
||||
_SpecularHighlights ("'Specular Highlights' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
[ToggleOff]
|
||||
_GlossyReflections ("'Glossy Reflections' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
|
||||
// Advanced Options
|
||||
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||||
_Lightmapping ("'GI' {LightmapEmissionProperty:{}}", Float) = 1
|
||||
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||||
_EnableInstancing ("'Enable Instancing' {EnableInstancing:{}}", Float) = 0
|
||||
}
|
||||
|
||||
CGINCLUDE
|
||||
#define A_TESSELLATION_SHADER
|
||||
#define _TESSELLATIONMODE_PHONG
|
||||
ENDCG
|
||||
|
||||
SubShader {
|
||||
Tags {
|
||||
"Queue" = "Geometry"
|
||||
"RenderType" = "Opaque"
|
||||
//"DisableBatching" = "LODFading"
|
||||
}
|
||||
LOD 400
|
||||
|
||||
Pass {
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
|
||||
Blend [_SrcBlend] [_DstBlend]
|
||||
ZWrite [_ZWrite]
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _SECONDARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _TERTIARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _QUATERNARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _RIM_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdbase
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile_instancing
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/TriPlanar.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD_DELTA"
|
||||
Tags { "LightMode" = "ForwardAdd" }
|
||||
|
||||
Blend [_SrcBlend] One
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _SECONDARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _TERTIARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _QUATERNARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdadd_fullshadows
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDADD
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/TriPlanar.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Add.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "SHADOWCASTER"
|
||||
Tags { "LightMode" = "ShadowCaster" }
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _SECONDARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _TERTIARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _QUATERNARY_TRIPLANAR_ON
|
||||
|
||||
#pragma multi_compile_shadowcaster
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_SHADOWCASTER
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/TriPlanar.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Shadow.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "DEFERRED"
|
||||
Tags { "LightMode" = "Deferred" }
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _SECONDARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _TERTIARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _QUATERNARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _RIM_ON
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_prepassfinal
|
||||
#pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_DEFERRED
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/TriPlanar.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Gbuffer.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Meta"
|
||||
Tags { "LightMode" = "Meta" }
|
||||
|
||||
Cull Off
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _SECONDARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _TERTIARY_TRIPLANAR_ON
|
||||
#pragma shader_feature _QUATERNARY_TRIPLANAR_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_META
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/TriPlanar.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Meta.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
FallBack "Alloy/Legacy/TriPlanar/Lite"
|
||||
CustomEditor "AlloyFieldBasedEditor"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f70ed737cdfac2b4fa9e10ac4cc4afcf
|
||||
timeCreated: 1432487252
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,293 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
Shader "Alloy/Legacy/Tessellation/Vertex Blend/4Splat TriPlanar" {
|
||||
Properties {
|
||||
// Global Settings
|
||||
_Mode ("'Rendering Mode' {RenderingMode:{Opaque:{_Cutoff}, Cutout:{}, Fade:{_Cutoff}, Transparent:{_Cutoff}}}", Float) = 0
|
||||
_SrcBlend ("__src", Float) = 0
|
||||
_DstBlend ("__dst", Float) = 0
|
||||
_ZWrite ("__zw", Float) = 1
|
||||
[LM_TransparencyCutOff]
|
||||
_Cutoff ("'Opacity Cutoff' {Min:0, Max:1}", Float) = 0.5
|
||||
[Toggle(EFFECT_BUMP)]
|
||||
_HasBumpMap ("'Normals Source' {Dropdown:{VertexNormals:{_Normal0,_Normal1,_Normal2,_Normal3,_DetailNormalMap,_DetailNormalMapScale}, NormalMaps:{}}}", Float) = 1
|
||||
|
||||
// Splat0 Properties
|
||||
_Splat0Properties ("'Splat0' {Section:{Color:0}}", Float) = 0
|
||||
_Splat0Tint ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_Splat0 ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_Splat0Velocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Normal0 ("'Normals' {Visualize:{NRM}, Parent:_Splat0}", 2D) = "bump" {}
|
||||
_Metallic0 ("'Metallic' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatSpecularity0 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint0 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatRoughness0 ("'Roughness' {Min:0, Max:1}", Float) = 1.0
|
||||
|
||||
// Splat1 Properties
|
||||
_Splat1Properties ("'Splat1' {Section:{Color:1}}", Float) = 0
|
||||
_Splat1Tint ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_Splat1 ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_Splat1Velocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Normal1 ("'Normals' {Visualize:{NRM}, Parent:_Splat1}", 2D) = "bump" {}
|
||||
_Metallic1 ("'Metallic' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatSpecularity1 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint1 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatRoughness1 ("'Roughness' {Min:0, Max:1}", Float) = 1.0
|
||||
|
||||
// Splat2 Properties
|
||||
_Splat2Properties ("'Splat2' {Section:{Color:2}}", Float) = 0
|
||||
_Splat2Tint ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_Splat2 ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_Splat2Velocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Normal2 ("'Normals' {Visualize:{NRM}, Parent:_Splat2}", 2D) = "bump" {}
|
||||
_Metallic2 ("'Metallic' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatSpecularity2 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint2 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatRoughness2 ("'Roughness' {Min:0, Max:1}", Float) = 1.0
|
||||
|
||||
// Splat3 Properties
|
||||
_Splat3Properties ("'Splat3' {Section:{Color:3}}", Float) = 0
|
||||
_Splat3Tint ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_Splat3 ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_Splat3Velocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Normal3 ("'Normals' {Visualize:{NRM}, Parent:_Splat3}", 2D) = "bump" {}
|
||||
_Metallic3 ("'Metallic' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatSpecularity3 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint3 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatRoughness3 ("'Roughness' {Min:0, Max:1}", Float) = 1.0
|
||||
|
||||
// Triplanar
|
||||
_TriplanarProperties ("'Triplanar' {Section:{Color:4}}", Float) = 0
|
||||
[Toggle(_TRIPLANARMODE_WORLD)]
|
||||
_TriplanarMode ("'Mode' {Dropdown:{Object:{}, World:{}}}", Float) = 1
|
||||
_TriplanarBlendSharpness ("'Sharpness' {Min:1, Max:50}", Float) = 2
|
||||
|
||||
// Tessellation
|
||||
_TessellationProperties ("'Tessellation' {Section:{Color:5}}", Float) = 0
|
||||
_Phong ("'Phong Strength' {Min:0, Max:1}", Float) = 0.5
|
||||
_EdgeLength ("'Edge Length' {Min:2, Max:50}", Float) = 15
|
||||
|
||||
// AO2
|
||||
[Toggle(_AO2_ON)]
|
||||
_AO2 ("'AO2' {Feature:{Color:6}}", Float) = 0
|
||||
_Ao2Map ("'AO2(G)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_Ao2MapUV ("UV Set", Float) = 1
|
||||
_Ao2Occlusion ("'Occlusion Strength' {Min:0, Max:1}", Float) = 1
|
||||
|
||||
// Detail
|
||||
[Toggle(_DETAIL_MULX2)]
|
||||
_DetailT ("'Detail' {Feature:{Color:7}}", Float) = 0
|
||||
[Enum(Mul, 0, MulX2, 1)]
|
||||
_DetailMode ("'Color Mode' {Dropdown:{Mul:{}, MulX2:{}}}", Float) = 0
|
||||
_DetailAlbedoMap ("'Color(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_DetailAlbedoMapUV ("UV Set", Float) = 0
|
||||
_DetailNormalMap ("'Normals' {Visualize:{NRM}, Parent:_DetailAlbedoMap}", 2D) = "bump" {}
|
||||
_DetailWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DetailNormalMapScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Decal
|
||||
[Toggle(_DECAL_ON)]
|
||||
_Decal ("'Decal' {Feature:{Color:9}}", Float) = 0
|
||||
_DecalColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_DecalTex ("'Base Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "black" {}
|
||||
_DecalTexUV ("UV Set", Float) = 0
|
||||
_DecalWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DecalSpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_DecalAlphaVertexTint ("'Vertex Alpha Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Forward Rendering Options
|
||||
_ForwardRenderingOptions ("'Forward Rendering Options' {Section:{Color:19}}", Float) = 0
|
||||
[ToggleOff]
|
||||
_SpecularHighlights ("'Specular Highlights' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
[ToggleOff]
|
||||
_GlossyReflections ("'Glossy Reflections' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
|
||||
// Advanced Options
|
||||
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||||
_Lightmapping ("'GI' {LightmapEmissionProperty:{}}", Float) = 1
|
||||
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||||
_EnableInstancing ("'Enable Instancing' {EnableInstancing:{}}", Float) = 0
|
||||
}
|
||||
|
||||
CGINCLUDE
|
||||
#define _METALLICGLOSSMAP
|
||||
#define A_TESSELLATION_SHADER
|
||||
#define _TESSELLATIONMODE_PHONG
|
||||
ENDCG
|
||||
|
||||
SubShader {
|
||||
Tags {
|
||||
"RenderType" = "Opaque"
|
||||
"PerformanceChecks" = "False"
|
||||
//"DisableBatching" = "LODFading"
|
||||
}
|
||||
LOD 300
|
||||
|
||||
Pass {
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
|
||||
Blend [_SrcBlend] [_DstBlend]
|
||||
ZWrite [_ZWrite]
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _AO2_ON
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdbase
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile_instancing
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD_DELTA"
|
||||
Tags { "LightMode" = "ForwardAdd" }
|
||||
|
||||
Blend [_SrcBlend] One
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _AO2_ON
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdadd_fullshadows
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDADD
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Add.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "SHADOWCASTER"
|
||||
Tags { "LightMode" = "ShadowCaster" }
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
|
||||
#pragma multi_compile_shadowcaster
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_SHADOWCASTER
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Shadow.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "DEFERRED"
|
||||
Tags { "LightMode" = "Deferred" }
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _AO2_ON
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_prepassfinal
|
||||
#pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_DEFERRED
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Gbuffer.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Meta"
|
||||
Tags { "LightMode" = "Meta" }
|
||||
|
||||
Cull Off
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _TRIPLANARMODE_WORLD
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_META
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Meta.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
Fallback "Alloy/Legacy/Vertex Blend/4Splat TriPlanar"
|
||||
CustomEditor "AlloyFieldBasedEditor"
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 54dced0a2f15f5f459d21edaf7e8b721
|
||||
timeCreated: 1456952662
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures:
|
||||
- _Splat0: {instanceID: 0}
|
||||
- _Normal0: {instanceID: 0}
|
||||
- _Splat1: {instanceID: 0}
|
||||
- _Normal1: {instanceID: 0}
|
||||
- _Splat2: {instanceID: 0}
|
||||
- _Normal2: {instanceID: 0}
|
||||
- _Splat3: {instanceID: 0}
|
||||
- _Normal3: {instanceID: 0}
|
||||
- _DetailAlbedoMap: {instanceID: 0}
|
||||
- _DetailMaterialMap: {fileID: 2800000, guid: 2b77d5cb601375f4ba50c6194c126e59,
|
||||
type: 3}
|
||||
- _DetailNormalMap: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,293 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
Shader "Alloy/Legacy/Tessellation/Vertex Blend/4Splat" {
|
||||
Properties {
|
||||
// Global Settings
|
||||
_Mode ("'Rendering Mode' {RenderingMode:{Opaque:{_Cutoff}, Cutout:{}, Fade:{_Cutoff}, Transparent:{_Cutoff}}}", Float) = 0
|
||||
_SrcBlend ("__src", Float) = 0
|
||||
_DstBlend ("__dst", Float) = 0
|
||||
_ZWrite ("__zw", Float) = 1
|
||||
[LM_TransparencyCutOff]
|
||||
_Cutoff ("'Opacity Cutoff' {Min:0, Max:1}", Float) = 0.5
|
||||
[Toggle(EFFECT_BUMP)]
|
||||
_HasBumpMap ("'Normals Source' {Dropdown:{VertexNormals:{_Normal0,_Normal1,_Normal2,_Normal3,_DetailNormalMap,_DetailNormalMapScale}, NormalMaps:{}}}", Float) = 1
|
||||
|
||||
// Splat0 Properties
|
||||
_Splat0Properties ("'Splat0' {Section:{Color:0}}", Float) = 0
|
||||
_Splat0Tint ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_Splat0 ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_Splat0Velocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Splat0UV ("UV Set", Float) = 0
|
||||
_Normal0 ("'Normals' {Visualize:{NRM}, Parent:_Splat0}", 2D) = "bump" {}
|
||||
_Metallic0 ("'Metallic' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatSpecularity0 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint0 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatRoughness0 ("'Roughness' {Min:0, Max:1}", Float) = 1.0
|
||||
|
||||
// Splat1 Properties
|
||||
_Splat1Properties ("'Splat1' {Section:{Color:0}}", Float) = 0
|
||||
_Splat1Tint ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_Splat1 ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_Splat1Velocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Splat1UV ("UV Set", Float) = 0
|
||||
_Normal1 ("'Normals' {Visualize:{NRM}, Parent:_Splat1}", 2D) = "bump" {}
|
||||
_Metallic1 ("'Metallic' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatSpecularity1 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint1 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatRoughness1 ("'Roughness' {Min:0, Max:1}", Float) = 1.0
|
||||
|
||||
// Splat2 Properties
|
||||
_Splat2Properties ("'Splat2' {Section:{Color:0}}", Float) = 0
|
||||
_Splat2Tint ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_Splat2 ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_Splat2Velocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Splat2UV ("UV Set", Float) = 0
|
||||
_Normal2 ("'Normals' {Visualize:{NRM}, Parent:_Splat2}", 2D) = "bump" {}
|
||||
_Metallic2 ("'Metallic' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatSpecularity2 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint2 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatRoughness2 ("'Roughness' {Min:0, Max:1}", Float) = 1.0
|
||||
|
||||
// Splat3 Properties
|
||||
_Splat3Properties ("'Splat3' {Section:{Color:0}}", Float) = 0
|
||||
_Splat3Tint ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_Splat3 ("'Base Color(RGB) Rough(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||||
_Splat3Velocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Splat3UV ("UV Set", Float) = 0
|
||||
_Normal3 ("'Normals' {Visualize:{NRM}, Parent:_Splat3}", 2D) = "bump" {}
|
||||
_Metallic3 ("'Metallic' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatSpecularity3 ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_SplatSpecularTint3 ("'Specular Tint' {Min:0, Max:1}", Float) = 0.0
|
||||
_SplatRoughness3 ("'Roughness' {Min:0, Max:1}", Float) = 1.0
|
||||
|
||||
// Tessellation
|
||||
_TessellationProperties ("'Tessellation' {Section:{Color:5}}", Float) = 0
|
||||
[KeywordEnum(Displacement, Phong)]
|
||||
_TessellationMode ("'Mode' {Dropdown:{Displacement:{_Phong}, Phong:{_DispTex, _Displacement}}}", Float) = 0
|
||||
_DispTex ("'Heightmap(G)' {Visualize:{RGB}}", 2D) = "black" {}
|
||||
_DispTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||||
_Displacement ("'Displacement' {Min:0, Max:30}", Float) = 0.3
|
||||
_Phong ("'Phong Strength' {Min:0, Max:1}", Float) = 0.5
|
||||
_EdgeLength ("'Edge Length' {Min:2, Max:50}", Float) = 15
|
||||
|
||||
// AO2
|
||||
[Toggle(_AO2_ON)]
|
||||
_AO2 ("'AO2' {Feature:{Color:6}}", Float) = 0
|
||||
_Ao2Map ("'AO2(G)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_Ao2MapUV ("UV Set", Float) = 1
|
||||
_Ao2Occlusion ("'Occlusion Strength' {Min:0, Max:1}", Float) = 1
|
||||
|
||||
// Detail
|
||||
[Toggle(_DETAIL_MULX2)]
|
||||
_DetailT ("'Detail' {Feature:{Color:7}}", Float) = 0
|
||||
[Enum(Mul, 0, MulX2, 1)]
|
||||
_DetailMode ("'Color Mode' {Dropdown:{Mul:{}, MulX2:{}}}", Float) = 0
|
||||
_DetailAlbedoMap ("'Color(RGB)' {Visualize:{RGB}}", 2D) = "white" {}
|
||||
_DetailAlbedoMapUV ("UV Set", Float) = 0
|
||||
_DetailNormalMap ("'Normals' {Visualize:{NRM}, Parent:_DetailAlbedoMap}", 2D) = "bump" {}
|
||||
_DetailWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DetailNormalMapScale ("'Normal Strength' {}", Float) = 1
|
||||
|
||||
// Decal
|
||||
[Toggle(_DECAL_ON)]
|
||||
_Decal ("'Decal' {Feature:{Color:9}}", Float) = 0
|
||||
_DecalColor ("'Tint' {}", Color) = (1,1,1,1)
|
||||
_DecalTex ("'Base Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "black" {}
|
||||
_DecalTexUV ("UV Set", Float) = 0
|
||||
_DecalWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
||||
_DecalSpecularity ("'Specularity' {Min:0, Max:1}", Float) = 0.5
|
||||
_DecalAlphaVertexTint ("'Vertex Alpha Tint' {Min:0, Max:1}", Float) = 0
|
||||
|
||||
// Forward Rendering Options
|
||||
_ForwardRenderingOptions ("'Forward Rendering Options' {Section:{Color:19}}", Float) = 0
|
||||
[ToggleOff]
|
||||
_SpecularHighlights ("'Specular Highlights' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
[ToggleOff]
|
||||
_GlossyReflections ("'Glossy Reflections' {Toggle:{On:{}, Off:{}}}", Float) = 1.0
|
||||
|
||||
// Advanced Options
|
||||
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||||
_Lightmapping ("'GI' {LightmapEmissionProperty:{}}", Float) = 1
|
||||
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||||
_EnableInstancing ("'Enable Instancing' {EnableInstancing:{}}", Float) = 0
|
||||
}
|
||||
|
||||
CGINCLUDE
|
||||
#define A_TESSELLATION_SHADER
|
||||
ENDCG
|
||||
|
||||
SubShader {
|
||||
Tags {
|
||||
"RenderType" = "Opaque"
|
||||
"PerformanceChecks" = "False"
|
||||
//"DisableBatching" = "LODFading"
|
||||
}
|
||||
LOD 300
|
||||
|
||||
Pass {
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "ForwardBase" }
|
||||
|
||||
Blend [_SrcBlend] [_DstBlend]
|
||||
ZWrite [_ZWrite]
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _TESSELLATIONMODE_DISPLACEMENT _TESSELLATIONMODE_PHONG
|
||||
#pragma shader_feature _AO2_ON
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdbase
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile_instancing
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDBASE
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "FORWARD_DELTA"
|
||||
Tags { "LightMode" = "ForwardAdd" }
|
||||
|
||||
Blend [_SrcBlend] One
|
||||
ZWrite Off
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _TESSELLATIONMODE_DISPLACEMENT _TESSELLATIONMODE_PHONG
|
||||
#pragma shader_feature _AO2_ON
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_fwdadd_fullshadows
|
||||
#pragma multi_compile_fog
|
||||
//#pragma multi_compile __ VTRANSPARENCY_ON
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_FORWARDADD
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Add.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "SHADOWCASTER"
|
||||
Tags { "LightMode" = "ShadowCaster" }
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature _TESSELLATIONMODE_DISPLACEMENT _TESSELLATIONMODE_PHONG
|
||||
|
||||
#pragma multi_compile_shadowcaster
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_SHADOWCASTER
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Shadow.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "DEFERRED"
|
||||
Tags { "LightMode" = "Deferred" }
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
|
||||
#pragma shader_feature EFFECT_BUMP
|
||||
#pragma shader_feature _TESSELLATIONMODE_DISPLACEMENT _TESSELLATIONMODE_PHONG
|
||||
#pragma shader_feature _AO2_ON
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
|
||||
|
||||
//#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||||
#pragma multi_compile_prepassfinal
|
||||
#pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma hull aMainHullShader
|
||||
#pragma vertex aMainTessellationVertexShader
|
||||
#pragma domain aMainDomainShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_DEFERRED
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Gbuffer.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
Pass {
|
||||
Name "Meta"
|
||||
Tags { "LightMode" = "Meta" }
|
||||
|
||||
Cull Off
|
||||
|
||||
CGPROGRAM
|
||||
//#pragma target 4.6
|
||||
#pragma exclude_renderers nomrt gles
|
||||
|
||||
#pragma shader_feature _DETAIL_MULX2
|
||||
#pragma shader_feature _DECAL_ON
|
||||
|
||||
#pragma vertex aMainVertexShader
|
||||
#pragma fragment aMainFragmentShader
|
||||
|
||||
#define UNITY_PASS_META
|
||||
|
||||
#include "Assets/Alloy/Legacy/Shaders/Definition/VertexBlend.cginc"
|
||||
#include "Assets/Alloy/Shaders/Forward/Meta.cginc"
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
Fallback "Alloy/Legacy/Vertex Blend/4Splat"
|
||||
CustomEditor "AlloyFieldBasedEditor"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83274b1e531b99b4ab201213dbb130f2
|
||||
timeCreated: 1430267111
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures:
|
||||
- _Splat0: {instanceID: 0}
|
||||
- _Normal0: {instanceID: 0}
|
||||
- _Splat1: {instanceID: 0}
|
||||
- _Normal1: {instanceID: 0}
|
||||
- _Splat2: {instanceID: 0}
|
||||
- _Normal2: {instanceID: 0}
|
||||
- _Splat3: {instanceID: 0}
|
||||
- _Normal3: {instanceID: 0}
|
||||
- _DetailAlbedoMap: {instanceID: 0}
|
||||
- _DetailMaterialMap: {fileID: 2800000, guid: 2b77d5cb601375f4ba50c6194c126e59,
|
||||
type: 3}
|
||||
- _DetailNormalMap: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: de96743fb3712fc48a3d55bdb34f7e9e
|
||||
folderAsset: yes
|
||||
timeCreated: 1467836697
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,53 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
/// @file EyeOcclusion.cginc
|
||||
/// @brief Eye Occlusion surface shader definition.
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ALLOY_LEGACY_SHADERS_DEFINITION_EYE_OCCLUSION_CGINC
|
||||
#define ALLOY_LEGACY_SHADERS_DEFINITION_EYE_OCCLUSION_CGINC
|
||||
|
||||
#define A_AMBIENT_OCCLUSION_ON
|
||||
#define A_EXPANDED_MATERIAL_MAPS
|
||||
|
||||
#include "Assets/Alloy/Shaders/Framework/Lighting.cginc"
|
||||
#include "Assets/Alloy/Shaders/Type/Standard.cginc"
|
||||
|
||||
void aPreLighting(
|
||||
inout ASurface s)
|
||||
{
|
||||
aStandardPreLighting(s);
|
||||
s.opacity *= 1.0h - s.specularOcclusion;
|
||||
}
|
||||
|
||||
half3 aDirectLighting(
|
||||
ADirect d,
|
||||
ASurface s)
|
||||
{
|
||||
return d.color * (d.shadow * d.NdotL * s.ambientOcclusion) * s.albedo;
|
||||
}
|
||||
|
||||
half3 aIndirectLighting(
|
||||
AIndirect i,
|
||||
ASurface s)
|
||||
{
|
||||
return i.diffuse * s.ambientOcclusion * s.albedo;
|
||||
}
|
||||
|
||||
void aSurfaceShader(
|
||||
inout ASurface s)
|
||||
{
|
||||
aDissolve(s);
|
||||
|
||||
half4 base = aBase(s);
|
||||
|
||||
s.baseColor = base.rgb;
|
||||
s.opacity = base.a;
|
||||
|
||||
s.ambientOcclusion = aLerpOneTo(tex2D(_AoMap, s.baseUv).g, _Occlusion);
|
||||
}
|
||||
|
||||
#endif // ALLOY_LEGACY_SHADERS_DEFINITION_EYE_OCCLUSION_CGINC
|
||||
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f6ce6c59434b4bd42829fc8e6a52e473
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,108 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
/// @file Eyeball.cginc
|
||||
/// @brief Eyeball surface shader definition.
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ALLOY_LEGACY_SHADERS_DEFINITION_EYEBALL_CGINC
|
||||
#define ALLOY_LEGACY_SHADERS_DEFINITION_EYEBALL_CGINC
|
||||
|
||||
#define A_NORMAL_MAPPING_ON
|
||||
#define A_AMBIENT_OCCLUSION_ON
|
||||
#define A_SPECULAR_TINT_ON
|
||||
#define A_CLEARCOAT_ON
|
||||
#define A_EYE_PARALLAX_REFRACTION
|
||||
#define A_DETAIL_MASK_OFF
|
||||
|
||||
#include "Assets/Alloy/Shaders/Lighting/Standard.cginc"
|
||||
#include "Assets/Alloy/Shaders/Type/Standard.cginc"
|
||||
#include "Assets/Alloy/Legacy/Shaders/Feature/EyeParallax.cginc"
|
||||
|
||||
/// Cornea normals.
|
||||
/// Expects a compressed normal map.
|
||||
sampler2D _EyeBumpMap;
|
||||
|
||||
/// Cornea weight.
|
||||
/// Expects values in the range [0,1].
|
||||
half _EyeCorneaWeight;
|
||||
|
||||
/// Cornea roughness.
|
||||
/// Expects values in the range [0,1].
|
||||
half _EyeRoughness;
|
||||
|
||||
/// Schlera tint color.
|
||||
/// Expects a linear LDR color.
|
||||
half3 _EyeScleraColor;
|
||||
|
||||
/// Iris tint color.
|
||||
/// Expects a linear LDR color.
|
||||
half3 _EyeColor;
|
||||
|
||||
/// Iris specular tint by base color.
|
||||
/// Expects values in the range [0,1].
|
||||
half _EyeSpecularTint;
|
||||
|
||||
/// Samples and scales the base bump map.
|
||||
/// @param s Material surface data.
|
||||
/// @param scale Normal XY scale factor.
|
||||
/// @return Normalized tangent-space normal.
|
||||
half3 aSampleBumpScaleOld(
|
||||
ASurface s,
|
||||
half scale)
|
||||
{
|
||||
half4 result = 0.0h;
|
||||
|
||||
#ifdef _VIRTUALTEXTURING_ON
|
||||
result = VTSampleNormal(s.baseVirtualCoord);
|
||||
#else
|
||||
result = tex2D(_BumpMap, s.baseUv);
|
||||
#endif
|
||||
|
||||
return UnpackScaleNormal(result, _BumpScale * scale);
|
||||
}
|
||||
|
||||
void aSurfaceShader(
|
||||
inout ASurface s)
|
||||
{
|
||||
float4 uv01 = s.uv01;
|
||||
|
||||
aEyeParallax(s);
|
||||
aDissolve(s);
|
||||
|
||||
// Iris
|
||||
half4 base = aBase(s);
|
||||
half4 material = aSampleMaterial(s);
|
||||
half irisMask = material.A_METALLIC_CHANNEL;
|
||||
|
||||
s.baseColor = base.rgb * lerp(_EyeScleraColor, _EyeColor, irisMask);
|
||||
s.metallic = 0.0h;
|
||||
s.ambientOcclusion = aLerpOneTo(material.A_AO_CHANNEL, _Occlusion);
|
||||
s.specularity = _Specularity * material.A_SPECULARITY_CHANNEL;
|
||||
s.specularTint = _EyeSpecularTint * irisMask;
|
||||
s.roughness = _Roughness * material.A_ROUGHNESS_CHANNEL;
|
||||
|
||||
// Cornea
|
||||
half bumpMask = s.clearCoat * 0.95h;
|
||||
half3 corneaNormalTangent = UnpackScaleNormal(tex2D(_EyeBumpMap, s.baseUv), bumpMask);
|
||||
half3 irisScleraNormalTangent = aSampleBumpScaleOld(s, 1.0h - bumpMask);
|
||||
|
||||
s.clearCoat = _EyeCorneaWeight * irisMask;
|
||||
s.clearCoatRoughness = _EyeRoughness;
|
||||
s.normalTangent = A_NT(s, BlendNormals(irisScleraNormalTangent, corneaNormalTangent));
|
||||
|
||||
s.mask = 1.0h - irisMask;
|
||||
aDetail(s);
|
||||
s.mask = 1.0h;
|
||||
|
||||
aEmission(s);
|
||||
|
||||
// Remove parallax so these appears on top of the cornea!
|
||||
s.uv01 = uv01;
|
||||
aDecal(s);
|
||||
aRim(s);
|
||||
}
|
||||
|
||||
#endif // ALLOY_LEGACY_SHADERS_DEFINITION_EYEBALL_CGINC
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c178cd0ac649324487ffea244d7e632
|
||||
timeCreated: 1438268034
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,273 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
/// @file Eyeball.cginc
|
||||
/// @brief Eyeball surface shader definition.
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ALLOY_LEGACY_SHADERS_DEFINITION_EYEBALL_CGINC
|
||||
#define ALLOY_LEGACY_SHADERS_DEFINITION_EYEBALL_CGINC
|
||||
|
||||
#define A_NORMAL_MAPPING_ON
|
||||
#define A_VIEW_DIR_TANGENT_ON
|
||||
#define A_AMBIENT_OCCLUSION_ON
|
||||
#define A_SPECULAR_TINT_ON
|
||||
#define A_EYE_PARALLAX_REFRACTION
|
||||
#define A_DETAIL_MASK_OFF
|
||||
|
||||
#define A_SURFACE_CUSTOM_FIELDS \
|
||||
half3 corneaNormalWorld; \
|
||||
half3 irisF0; \
|
||||
half scattering; \
|
||||
half irisMask; \
|
||||
half corneaSpecularity; \
|
||||
half corneaRoughness; \
|
||||
half irisSpecularOcclusion; \
|
||||
half irisRoughness; \
|
||||
half irisBeckmannRoughness; \
|
||||
half irisNdotV;
|
||||
|
||||
#include "Assets/Alloy/Shaders/Framework/Lighting.cginc"
|
||||
#include "Assets/Alloy/Shaders/Type/Standard.cginc"
|
||||
#include "Assets/Alloy/Legacy/Shaders/Feature/EyeParallax.cginc"
|
||||
|
||||
/// Implements a scattering diffuse BRDF affected by roughness.
|
||||
/// @param albedo Diffuse albedo LDR color.
|
||||
/// @param subsurface Blend value between diffuse and scattering [0,1].
|
||||
/// @param roughness Linear roughness [0,1].
|
||||
/// @param LdotH Light and half-angle clamped dot product [0,1].
|
||||
/// @param NdotL Normal and light clamped dot product [0,1].
|
||||
/// @param NdotV Normal and view clamped dot product [0,1].
|
||||
/// @return Direct diffuse BRDF.
|
||||
half3 aDiffuseBssrdf(
|
||||
half3 albedo,
|
||||
half subsurface,
|
||||
half roughness,
|
||||
half LdotH,
|
||||
half NdotL,
|
||||
half NdotV)
|
||||
{
|
||||
// Impelementation of Brent Burley's diffuse scattering BRDF.
|
||||
// Subject to Apache License, version 2.0
|
||||
// cf https://github.com/wdas/brdf/blob/master/src/brdfs/disney.brdf
|
||||
half FL = aFresnel(NdotL);
|
||||
half FV = aFresnel(NdotV);
|
||||
half Fss90 = LdotH * LdotH * roughness;
|
||||
half Fd90 = 0.5h + (2.0h * Fss90);
|
||||
half Fd = aLerpOneTo(Fd90, FL) * aLerpOneTo(Fd90, FV);
|
||||
half Fss = aLerpOneTo(Fss90, FL) * aLerpOneTo(Fss90, FV);
|
||||
half ss = 1.25h * (Fss * (1.0h / max(NdotL + NdotV, A_EPSILON) - 0.5h) + 0.5h);
|
||||
|
||||
// Pi is cancelled by implicit punctual lighting equation.
|
||||
// cf http://seblagarde.wordpress.com/2012/01/08/pi-or-not-to-pi-in-game-lighting-equation/
|
||||
return albedo * lerp(Fd, ss, subsurface);
|
||||
}
|
||||
|
||||
/// A specular BRDF.
|
||||
/// @param d Direct lighting data.
|
||||
/// @param s Material surface data.
|
||||
/// @return Direct specular BRDF.
|
||||
half3 aLegacySpecularBrdf(
|
||||
ADirect d,
|
||||
ASurface s)
|
||||
{
|
||||
// Schlick's Fresnel approximation.
|
||||
half3 F = lerp(s.f0, A_WHITE, aFresnel(d.LdotH));
|
||||
|
||||
// GGX (Trowbridge-Reitz) NDF
|
||||
// cf http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html
|
||||
half a2 = s.beckmannRoughness * s.beckmannRoughness;
|
||||
half denom = aLerpOneTo(a2, d.NdotH * d.NdotH);
|
||||
|
||||
// John Hable's visibility function.
|
||||
// cf http://www.filmicworlds.com/2014/04/21/optimizing-ggx-shaders-with-dotlh/
|
||||
half V = lerp(a2 * 0.25h, 1.0h, d.LdotH * d.LdotH);
|
||||
|
||||
// Pi is cancelled by implicit punctual lighting equation.
|
||||
// cf http://seblagarde.wordpress.com/2012/01/08/pi-or-not-to-pi-in-game-lighting-equation/
|
||||
half DV = a2 / (4.0h * V * denom * denom);
|
||||
|
||||
// Cook-Torrance microfacet model.
|
||||
// cf http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html
|
||||
return F * (DV * s.specularOcclusion * d.specularIntensity);
|
||||
}
|
||||
|
||||
/// Indirect specular BRDF.
|
||||
/// @param s Material surface data.
|
||||
/// @return Environment BRDF.
|
||||
half3 aLegacyEnvironmentBrdf(
|
||||
ASurface s)
|
||||
{
|
||||
// Brian Karis' modification of Dimitar Lazarov's Environment BRDF.
|
||||
// cf https://www.unrealengine.com/blog/physically-based-shading-on-mobile
|
||||
const half4 c0 = half4(-1.0h, -0.0275h, -0.572h, 0.022h);
|
||||
const half4 c1 = half4(1.0h, 0.0425h, 1.04h, -0.04h);
|
||||
half4 r = s.roughness * c0 + c1;
|
||||
half a004 = min(r.x * r.x, exp2(-9.28h * s.NdotV)) * r.x + r.y;
|
||||
half2 AB = half2(-1.04h, 1.04h) * a004 + r.zw;
|
||||
return s.f0 * AB.x + AB.yyy;
|
||||
}
|
||||
|
||||
/// Calculates standard indirect diffuse plus specular illumination.
|
||||
/// @param d Indirect light description.
|
||||
/// @param s Material surface data.
|
||||
/// @return Indirect illumination.
|
||||
half3 aLegacyStandardIndirect(
|
||||
AIndirect i,
|
||||
ASurface s)
|
||||
{
|
||||
#ifdef A_REFLECTION_PROBES_ON
|
||||
half3 specular = i.specular * aLegacyEnvironmentBrdf(s);
|
||||
#endif
|
||||
|
||||
#ifndef A_AMBIENT_OCCLUSION_ON
|
||||
half3 diffuse = s.albedo * i.diffuse;
|
||||
|
||||
#ifndef A_REFLECTION_PROBES_ON
|
||||
return diffuse;
|
||||
#else
|
||||
return diffuse + specular;
|
||||
#endif
|
||||
#else
|
||||
// Yoshiharu Gotanda's fake interreflection for specular occlusion.
|
||||
// Modified to better account for surface f0.
|
||||
// cf http://research.tri-ace.com/Data/cedec2011_RealtimePBR_Implementation_e.pptx pg65
|
||||
half3 ambient = i.diffuse * s.ambientOcclusion;
|
||||
|
||||
#ifndef A_REFLECTION_PROBES_ON
|
||||
// Diffuse and fake interreflection only.
|
||||
return ambient * (s.albedo + s.f0 * (1.0h - s.specularOcclusion));
|
||||
#else
|
||||
// Full equation.
|
||||
return ambient * s.albedo
|
||||
+ lerp(ambient * s.f0, specular, s.specularOcclusion);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void aPreLighting(
|
||||
inout ASurface s)
|
||||
{
|
||||
aStandardPreLighting(s);
|
||||
|
||||
// Tint the iris specular to fake caustics.
|
||||
// cf http://game.watch.impress.co.jp/docs/news/20121129_575412.html
|
||||
|
||||
// Iris & Sclera
|
||||
s.irisNdotV = s.NdotV;
|
||||
s.irisSpecularOcclusion = s.specularOcclusion;
|
||||
s.irisF0 = s.f0;
|
||||
s.irisRoughness = s.roughness;
|
||||
s.irisBeckmannRoughness = s.beckmannRoughness;
|
||||
|
||||
// Cornea
|
||||
s.roughness = lerp(s.roughness, s.corneaRoughness, s.irisMask);
|
||||
s.corneaNormalWorld = normalize(lerp(s.normalWorld, s.vertexNormalWorld, s.irisMask));
|
||||
s.reflectionVectorWorld = reflect(-s.viewDirWorld, s.corneaNormalWorld);
|
||||
s.NdotV = aDotClamp(s.corneaNormalWorld, s.viewDirWorld);
|
||||
s.FV = aFresnel(s.NdotV);
|
||||
|
||||
s.specularOcclusion = lerp(s.irisSpecularOcclusion, 1.0h, s.irisMask);
|
||||
s.f0 = lerp(s.irisF0, aSpecularityToF0(s.corneaSpecularity), s.irisMask);
|
||||
}
|
||||
|
||||
half3 aDirectLighting(
|
||||
ADirect d,
|
||||
ASurface s)
|
||||
{
|
||||
half3 illum = 0.0h;
|
||||
|
||||
// Iris & Sclera
|
||||
illum = d.NdotL * (
|
||||
aDiffuseBssrdf(s.albedo, s.scattering, s.irisRoughness, d.LdotH, d.NdotL, s.irisNdotV));
|
||||
//+ (s.irisSpecularOcclusion * AlloyAreaLightNormalization(s.irisBeckmannRoughness, d.solidAngle)
|
||||
// * aLegacySpecularBrdf(s.irisF0, s.irisBeckmannRoughness, d.LdotH, d.NdotH, d.NdotL, s.irisNdotV)));
|
||||
|
||||
// Cornea
|
||||
d.NdotH = aDotClamp(s.corneaNormalWorld, d.halfAngleWorld);
|
||||
d.NdotL = aDotClamp(s.corneaNormalWorld, d.direction);
|
||||
d.specularIntensity *= s.irisMask * d.NdotL;
|
||||
|
||||
illum += aLegacySpecularBrdf(d, s);
|
||||
return illum * d.color * d.shadow;
|
||||
}
|
||||
|
||||
half3 aIndirectLighting(
|
||||
AIndirect i,
|
||||
ASurface s)
|
||||
{
|
||||
return aLegacyStandardIndirect(i, s);
|
||||
}
|
||||
|
||||
/// Schlera tint color.
|
||||
/// Expects a linear LDR color.
|
||||
half3 _EyeScleraColor;
|
||||
|
||||
/// Schlera diffuse scattering amount.
|
||||
/// Expects values in the range [0,1].
|
||||
half _EyeScleraScattering;
|
||||
|
||||
/// Cornea specularity.
|
||||
/// Expects values in the range [0,1].
|
||||
half _EyeSpecularity;
|
||||
|
||||
/// Cornea roughness.
|
||||
/// Expects values in the range [0,1].
|
||||
half _EyeRoughness;
|
||||
|
||||
/// Iris tint color.
|
||||
/// Expects a linear LDR color.
|
||||
half3 _EyeColor;
|
||||
|
||||
/// Iris diffuse scattering amount.
|
||||
/// Expects values in the range [0,1].
|
||||
half _EyeIrisScattering;
|
||||
|
||||
/// Iris specular tint by base color.
|
||||
/// Expects values in the range [0,1].
|
||||
half _EyeSpecularTint;
|
||||
|
||||
void aSurfaceShader(
|
||||
inout ASurface s)
|
||||
{
|
||||
float4 uv01 = s.uv01;
|
||||
|
||||
aEyeParallax(s);
|
||||
aDissolve(s);
|
||||
|
||||
half4 base = aBase(s);
|
||||
|
||||
s.baseColor = base.rgb;
|
||||
|
||||
half4 material = aSampleMaterial(s);
|
||||
|
||||
s.irisMask = material.A_METALLIC_CHANNEL;
|
||||
s.metallic = 0.0h;
|
||||
s.ambientOcclusion = aLerpOneTo(material.A_AO_CHANNEL, _Occlusion);
|
||||
s.specularity = _Specularity * material.A_SPECULARITY_CHANNEL;
|
||||
s.roughness = _Roughness * material.A_ROUGHNESS_CHANNEL;
|
||||
|
||||
s.normalTangent = A_NT(s, aSampleBump(s));
|
||||
|
||||
s.baseColor *= lerp(_EyeScleraColor, _EyeColor, s.irisMask);
|
||||
s.specularTint = s.irisMask * _EyeSpecularTint;
|
||||
s.scattering = lerp(_EyeScleraScattering, _EyeIrisScattering, s.irisMask);
|
||||
s.corneaSpecularity = _EyeSpecularity;
|
||||
s.corneaRoughness = _EyeRoughness;
|
||||
|
||||
// Don't allow detail normals in the iris.
|
||||
s.mask = 1.0h - s.irisMask;
|
||||
aDetail(s);
|
||||
s.mask = 1.0h;
|
||||
|
||||
aEmission(s);
|
||||
aRim(s);
|
||||
|
||||
// Remove parallax so this appears on top of the cornea!
|
||||
s.uv01 = uv01;
|
||||
aDecal(s);
|
||||
}
|
||||
|
||||
#endif // ALLOY_LEGACY_SHADERS_DEFINITION_EYEBALL_CGINC
|
||||
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0fb3f9db18784964cb344084b892a928
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,264 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
/// @file Skin.cginc
|
||||
/// @brief Skin surface shader definition.
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ALLOY_LEGACY_SHADERS_DEFINITION_SKIN_CGINC
|
||||
#define ALLOY_LEGACY_SHADERS_DEFINITION_SKIN_CGINC
|
||||
|
||||
#define A_AMBIENT_OCCLUSION_ON
|
||||
|
||||
#define A_SURFACE_CUSTOM_FIELDS \
|
||||
half scatteringMask; \
|
||||
half scattering;
|
||||
|
||||
#include "Assets/Alloy/Shaders/Framework/Lighting.cginc"
|
||||
#include "Assets/Alloy/Shaders/Type/Standard.cginc"
|
||||
|
||||
// Jon Moore recommended this value in his blog post.
|
||||
#define A_SKIN_BUMP_BLUR_BIAS (3.0)
|
||||
|
||||
sampler2D _SssBrdfTex;
|
||||
|
||||
/// Biases the thickness value used to look up in the skin LUT.
|
||||
/// Expects values in the range [0,1].
|
||||
half _SssBias;
|
||||
|
||||
/// Scales the thickness value used to look up in the skin LUT.
|
||||
/// Expects values in the range [0,1].
|
||||
half _SssScale;
|
||||
|
||||
/// Amount to colorize and darken AO to simulate local scattering.
|
||||
/// Expects values in the range [0,1].
|
||||
half _SssAoSaturation;
|
||||
|
||||
/// Increases the bluriness of the normal map for diffuse lighting.
|
||||
/// Expects values in the range [0,1].
|
||||
half _SssBumpBlur;
|
||||
|
||||
/// Transmission tint color.
|
||||
/// Expects a linear LDR color.
|
||||
half3 _TransColor;
|
||||
|
||||
/// Weight of the transmission effect.
|
||||
/// Expects linear space value in the range [0,1].
|
||||
half _TransScale;
|
||||
|
||||
/// Falloff of the transmission effect.
|
||||
/// Expects values in the range [1,n).
|
||||
half _TransPower;
|
||||
|
||||
/// Amount that the transmission is distorted by surface normals.
|
||||
/// Expects values in the range [0,1].
|
||||
half _TransDistortion;
|
||||
|
||||
/// Calculates standard indirect diffuse plus specular illumination.
|
||||
/// @param d Direct lighting data.
|
||||
/// @param s Material surface data.
|
||||
/// @param skinLut Pre-Integrated scattering LUT.
|
||||
/// @return Direct diffuse illumination with scattering effect.
|
||||
half3 aLegacySkin(
|
||||
ADirect d,
|
||||
ASurface s,
|
||||
sampler2D skinLut)
|
||||
{
|
||||
// Scattering
|
||||
// cf http://www.farfarer.com/blog/2013/02/11/pre-integrated-skin-shader-unity-3d/
|
||||
float ndlBlur = dot(s.ambientNormalWorld, d.direction) * 0.5h + 0.5h;
|
||||
float2 sssLookupUv = float2(ndlBlur, s.scattering * aLuminance(d.color));
|
||||
half3 sss = s.scatteringMask * d.shadow * tex2D(skinLut, sssLookupUv).rgb;
|
||||
|
||||
//#if !defined(SHADOWS_SCREEN) && !defined(SHADOWS_DEPTH) && !defined(SHADOWS_CUBE)
|
||||
// // If shadows are off, we need to reduce the brightness
|
||||
// // of the scattering on polys facing away from the light.
|
||||
// sss *= saturate(ndlBlur * 4.0h - 1.0h); // [-1,3], then clamp
|
||||
//#else
|
||||
// sss *= d.shadow;
|
||||
//#endif
|
||||
|
||||
return d.color * s.albedo * sss;
|
||||
}
|
||||
|
||||
/// Calculates direct light transmission effect using per-pixel thickness.
|
||||
/// @param d Indirect light description.
|
||||
/// @param s Material surface data.
|
||||
/// @param weight Weight of the transmission effect.
|
||||
/// @param distortion Distortion due to surface normals.
|
||||
/// @param falloff Tightness of the transmitted light.
|
||||
/// @param shadowWeight Amount that the transsmision is shadowed.
|
||||
/// @return Transmission effect.
|
||||
half3 aLegacyTransmission(
|
||||
ADirect d,
|
||||
ASurface s,
|
||||
half weight,
|
||||
half distortion,
|
||||
half falloff,
|
||||
half shadowWeight)
|
||||
{
|
||||
// Transmission
|
||||
// cf http://www.farfarer.com/blog/2012/09/11/translucent-shader-unity3d/
|
||||
half3 transLightDir = d.direction + s.normalWorld * distortion;
|
||||
half transLight = pow(aDotClamp(s.viewDirWorld, -transLightDir), falloff);
|
||||
|
||||
transLight *= weight * aLerpOneTo(d.shadow, shadowWeight);
|
||||
return d.color * s.subsurfaceColor * transLight;
|
||||
}
|
||||
|
||||
/// Direct diffuse and specular BRDF.
|
||||
/// @param d Direct lighting data.
|
||||
/// @param s Material surface data.
|
||||
/// @return Direct diffuse BRDF.
|
||||
half3 aLegacyDirectBrdf(
|
||||
ADirect d,
|
||||
ASurface s,
|
||||
half diffuseWeight)
|
||||
{
|
||||
// Cook-Torrance microfacet model.
|
||||
// cf http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html
|
||||
half LdotH2 = d.LdotH * d.LdotH;
|
||||
|
||||
// Brent Burley diffuse BRDF.
|
||||
// cf https://disney-animation.s3.amazonaws.com/library/s2012_pbs_disney_brdf_notes_v2.pdf pg14
|
||||
half FL = aFresnel(d.NdotL);
|
||||
half Fd90 = 0.5h + (2.0h * LdotH2 * s.roughness);
|
||||
half Fd = aLerpOneTo(Fd90, FL) * aLerpOneTo(Fd90, s.FV);
|
||||
|
||||
// Schlick's Fresnel approximation.
|
||||
half3 F = lerp(s.f0, A_WHITE, aFresnel(d.LdotH));
|
||||
|
||||
// John Hable's Visibility function.
|
||||
// cf http://www.filmicworlds.com/2014/04/21/optimizing-ggx-shaders-with-dotlh/
|
||||
half a2 = s.beckmannRoughness * s.beckmannRoughness;
|
||||
half k2 = a2 * 0.25h; // k = a/2; k*k = (a*a)/(2*2) = (a^2)/4.
|
||||
half V = lerp(k2, 1.0h, LdotH2);
|
||||
|
||||
// GGX (Trowbridge-Reitz) NDF.
|
||||
// cf http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html
|
||||
half denom = aLerpOneTo(a2, d.NdotH * d.NdotH);
|
||||
half mDV = k2 / (V * denom * denom); // k2 is GGX a^2 and microfacet 1/4.
|
||||
|
||||
// Punctual lighting equation.
|
||||
// cf http://seblagarde.wordpress.com/2012/01/08/pi-or-not-to-pi-in-game-lighting-equation/
|
||||
return (d.shadow * d.NdotL) * (
|
||||
(s.albedo * (Fd * diffuseWeight)) + (F * (mDV * s.specularOcclusion * d.specularIntensity)));
|
||||
}
|
||||
|
||||
/// Indirect specular BRDF.
|
||||
/// @param s Material surface data.
|
||||
/// @return Environment BRDF.
|
||||
half3 aLegacyEnvironmentBrdf(
|
||||
ASurface s)
|
||||
{
|
||||
// Brian Karis' modification of Dimitar Lazarov's Environment BRDF.
|
||||
// cf https://www.unrealengine.com/blog/physically-based-shading-on-mobile
|
||||
const half4 c0 = half4(-1.0h, -0.0275h, -0.572h, 0.022h);
|
||||
const half4 c1 = half4(1.0h, 0.0425h, 1.04h, -0.04h);
|
||||
half4 r = s.roughness * c0 + c1;
|
||||
half a004 = min(r.x * r.x, exp2(-9.28h * s.NdotV)) * r.x + r.y;
|
||||
half2 AB = half2(-1.04h, 1.04h) * a004 + r.zw;
|
||||
return s.f0 * AB.x + AB.yyy;
|
||||
}
|
||||
|
||||
/// Calculates standard indirect diffuse plus specular illumination.
|
||||
/// @param d Indirect light description.
|
||||
/// @param s Material surface data.
|
||||
/// @return Indirect illumination.
|
||||
half3 aLegacyStandardIndirect(
|
||||
AIndirect i,
|
||||
ASurface s)
|
||||
{
|
||||
#ifdef A_REFLECTION_PROBES_ON
|
||||
half3 specular = i.specular * aLegacyEnvironmentBrdf(s);
|
||||
#endif
|
||||
|
||||
#ifndef A_AMBIENT_OCCLUSION_ON
|
||||
half3 diffuse = s.albedo * i.diffuse;
|
||||
|
||||
#ifndef A_REFLECTION_PROBES_ON
|
||||
return diffuse;
|
||||
#else
|
||||
return diffuse + specular;
|
||||
#endif
|
||||
#else
|
||||
// Yoshiharu Gotanda's fake interreflection for specular occlusion.
|
||||
// Modified to better account for surface f0.
|
||||
// cf http://research.tri-ace.com/Data/cedec2011_RealtimePBR_Implementation_e.pptx pg65
|
||||
half3 ambient = i.diffuse * s.ambientOcclusion;
|
||||
|
||||
#ifndef A_REFLECTION_PROBES_ON
|
||||
// Diffuse and fake interreflection only.
|
||||
return ambient * (s.albedo + s.f0 * (1.0h - s.specularOcclusion));
|
||||
#else
|
||||
// Full equation.
|
||||
return ambient * s.albedo
|
||||
+ lerp(ambient * s.f0, specular, s.specularOcclusion);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void aPreLighting(
|
||||
inout ASurface s)
|
||||
{
|
||||
aStandardPreLighting(s);
|
||||
|
||||
// Blurred normals for indirect diffuse and direct scattering.
|
||||
s.blurredNormalTangent = normalize(lerp(s.normalTangent, s.blurredNormalTangent, s.scatteringMask * _SssBumpBlur));
|
||||
s.ambientNormalWorld = aTangentToWorld(s, s.blurredNormalTangent);
|
||||
s.subsurfaceColor = _TransScale * _TransColor * s.albedo * s.subsurface.rrr;
|
||||
s.scattering = saturate(s.subsurface * _SssScale + _SssBias);
|
||||
}
|
||||
|
||||
half3 aDirectLighting(
|
||||
ADirect d,
|
||||
ASurface s)
|
||||
{
|
||||
return (d.color * aLegacyDirectBrdf(d, s, 1.0h - s.scatteringMask))
|
||||
+ aLegacySkin(d, s, _SssBrdfTex)
|
||||
+ aLegacyTransmission(d, s, 1.0h, _TransDistortion, _TransPower, 0.0h);
|
||||
}
|
||||
|
||||
half3 aIndirectLighting(
|
||||
AIndirect i,
|
||||
ASurface s)
|
||||
{
|
||||
// Saturated AO.
|
||||
// cf http://www.iryoku.com/downloads/Next-Generation-Character-Rendering-v6.pptx pg110
|
||||
half saturation = s.scatteringMask * _SssAoSaturation;
|
||||
|
||||
s.albedo = pow(s.albedo, (1.0h + saturation) - saturation * s.ambientOcclusion);
|
||||
return aLegacyStandardIndirect(i, s);
|
||||
}
|
||||
|
||||
void aSurfaceShader(
|
||||
inout ASurface s)
|
||||
{
|
||||
aDissolve(s);
|
||||
|
||||
half4 base = aBase(s);
|
||||
|
||||
s.baseColor = base.rgb;
|
||||
s.subsurface = A_SS(s, base.a);
|
||||
|
||||
half4 material = aSampleMaterial(s);
|
||||
|
||||
s.scatteringMask = material.A_METALLIC_CHANNEL;
|
||||
s.metallic = 0.0h;
|
||||
s.ambientOcclusion = aLerpOneTo(material.A_AO_CHANNEL, _Occlusion);
|
||||
s.specularity = _Specularity * material.A_SPECULARITY_CHANNEL;
|
||||
s.roughness = _Roughness * material.A_ROUGHNESS_CHANNEL;
|
||||
|
||||
s.normalTangent = A_NT(s, aSampleBump(s));
|
||||
s.blurredNormalTangent = aSampleBumpBias(s, A_SKIN_BUMP_BLUR_BIAS);
|
||||
|
||||
aDetail(s);
|
||||
aTeamColor(s);
|
||||
aDecal(s);
|
||||
aRim(s);
|
||||
aEmission(s);
|
||||
}
|
||||
|
||||
#endif // ALLOY_LEGACY_SHADERS_DEFINITION_SKIN_CGINC
|
||||
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 592351fd2bda43b479a4596b48e53d66
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,27 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
/// @file TriPlanar.cginc
|
||||
/// @brief TriPlanar shader definition.
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ALLOY_LEGACY_SHADERS_DEFINITION_TRIPLANAR_CGINC
|
||||
#define ALLOY_LEGACY_SHADERS_DEFINITION_TRIPLANAR_CGINC
|
||||
|
||||
#define A_ROUGHNESS_SOURCE_BASE_COLOR_ALPHA
|
||||
#define A_TRIPLANAR_ON
|
||||
#define A_RIM_EFFECTS_MAP_OFF
|
||||
|
||||
#include "Assets/Alloy/Shaders/Lighting/Standard.cginc"
|
||||
#include "Assets/Alloy/Shaders/Type/Standard.cginc"
|
||||
|
||||
void aSurfaceShader(
|
||||
inout ASurface s)
|
||||
{
|
||||
aTriPlanar(s);
|
||||
aRim(s);
|
||||
}
|
||||
|
||||
#endif // ALLOY_LEGACY_SHADERS_DEFINITION_TRIPLANAR_CGINC
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: af89b12906000ca4d949e437a831c082
|
||||
timeCreated: 1472680907
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,78 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
/// @file VertexBlend.cginc
|
||||
/// @brief Vertex Blend shader definition.
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ALLOY_LEGACY_SHADERS_DEFINITION_VERTEX_BLEND_CGINC
|
||||
#define ALLOY_LEGACY_SHADERS_DEFINITION_VERTEX_BLEND_CGINC
|
||||
|
||||
#define A_ROUGHNESS_SOURCE_BASE_COLOR_ALPHA
|
||||
|
||||
#ifndef A_VERTEX_COLOR_IS_DATA
|
||||
#define A_VERTEX_COLOR_IS_DATA
|
||||
#endif
|
||||
|
||||
#define A_METALLIC_ON
|
||||
#define A_SPECULAR_TINT_ON
|
||||
#define A_DETAIL_MASK_OFF
|
||||
|
||||
#include "Assets/Alloy/Shaders/Lighting/Standard.cginc"
|
||||
#include "Assets/Alloy/Shaders/Type/Standard.cginc"
|
||||
|
||||
half _TriplanarBlendSharpness;
|
||||
|
||||
half4 _Splat0Tint;
|
||||
A_SAMPLER_2D(_Splat0);
|
||||
sampler2D _Normal0;
|
||||
half _Metallic0;
|
||||
half _SplatSpecularity0;
|
||||
half _SplatSpecularTint0;
|
||||
half _SplatRoughness0;
|
||||
|
||||
half4 _Splat1Tint;
|
||||
A_SAMPLER_2D(_Splat1);
|
||||
sampler2D _Normal1;
|
||||
half _Metallic1;
|
||||
half _SplatSpecularity1;
|
||||
half _SplatSpecularTint1;
|
||||
half _SplatRoughness1;
|
||||
|
||||
half4 _Splat2Tint;
|
||||
A_SAMPLER_2D(_Splat2);
|
||||
sampler2D _Normal2;
|
||||
half _Metallic2;
|
||||
half _SplatSpecularity2;
|
||||
half _SplatSpecularTint2;
|
||||
half _SplatRoughness2;
|
||||
|
||||
half4 _Splat3Tint;
|
||||
A_SAMPLER_2D(_Splat3);
|
||||
sampler2D _Normal3;
|
||||
half _Metallic3;
|
||||
half _SplatSpecularity3;
|
||||
half _SplatSpecularTint3;
|
||||
half _SplatRoughness3;
|
||||
|
||||
void aSurfaceShader(
|
||||
inout ASurface s)
|
||||
{
|
||||
half4 splatControl = s.vertexColor;
|
||||
|
||||
splatControl /= (dot(splatControl, A_ONE4) + A_EPSILON);
|
||||
|
||||
ASplatContext sc = aNewSplatContext(s, _TriplanarBlendSharpness, 1.0f);
|
||||
ASplat sp0 = aNewSplat(sc, A_SAMPLER_2D_INPUT(_Splat0), _Splat0, _Normal0, _Splat0Tint, 0.0h, _Metallic0, _SplatSpecularity0, _SplatSpecularTint0, _SplatRoughness0, 1.0h, 1.0h);
|
||||
ASplat sp1 = aNewSplat(sc, A_SAMPLER_2D_INPUT(_Splat1), _Splat1, _Normal1, _Splat1Tint, 0.0h, _Metallic1, _SplatSpecularity1, _SplatSpecularTint1, _SplatRoughness1, 1.0h, 1.0h);
|
||||
ASplat sp2 = aNewSplat(sc, A_SAMPLER_2D_INPUT(_Splat2), _Splat2, _Normal2, _Splat2Tint, 0.0h, _Metallic2, _SplatSpecularity2, _SplatSpecularTint2, _SplatRoughness2, 1.0h, 1.0h);
|
||||
ASplat sp3 = aNewSplat(sc, A_SAMPLER_2D_INPUT(_Splat3), _Splat3, _Normal3, _Splat3Tint, 0.0h, _Metallic3, _SplatSpecularity3, _SplatSpecularTint3, _SplatRoughness3, 1.0h, 1.0h);
|
||||
|
||||
aApplyTerrainSplats(s, splatControl, sp0, sp1, sp2, sp3);
|
||||
aCutout(s);
|
||||
aDetail(s);
|
||||
}
|
||||
|
||||
#endif // ALLOY_LEGACY_SHADERS_DEFINITION_VERTEX_BLEND_CGINC
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4336d3976cbfc8740a237887a1d65eb7
|
||||
timeCreated: 1430262367
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d3def653a70408e48b2e7c283f0a2c82
|
||||
folderAsset: yes
|
||||
timeCreated: 1467836703
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,207 @@
|
||||
// Alloy Physical Shader Framework
|
||||
// Copyright 2013-2017 RUST LLC.
|
||||
// http://www.alloy.rustltd.com/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
/// @file EyeParallax.cginc
|
||||
/// @brief Surface heightmap-based texcoord modification.
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ALLOY_LEGACY_SHADERS_FEATURE_EYE_PARALLAX_CGINC
|
||||
#define ALLOY_LEGACY_SHADERS_FEATURE_EYE_PARALLAX_CGINC
|
||||
|
||||
#ifdef A_EYE_PARALLAX_REFRACTION
|
||||
#if defined(UNITY_PASS_SHADOWCASTER) || defined(UNITY_PASS_META)
|
||||
#undef A_EYE_PARALLAX_REFRACTION
|
||||
#elif !defined(A_VIEW_DIR_TANGENT_ON)
|
||||
#define A_VIEW_DIR_TANGENT_ON
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "Assets/Alloy/Shaders/Framework/Feature.cginc"
|
||||
|
||||
#ifdef A_EYE_PARALLAX_REFRACTION
|
||||
/// Number of samples used for direct view of POM effect.
|
||||
/// Expects values in the range [1,n].
|
||||
float _MinSamples;
|
||||
|
||||
/// Number of samples used for grazing view of POM effect.
|
||||
/// Expects values in the range [1,n].
|
||||
float _MaxSamples;
|
||||
|
||||
#ifdef A_EYE_PARALLAX_REFRACTION
|
||||
/// Iris parallax depth scale.
|
||||
/// Expects values in the range [0,1].
|
||||
half _EyeParallax;
|
||||
|
||||
/// Iris pupil dilation.
|
||||
/// Expects values in the range [0,1].
|
||||
half _EyePupilSize;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/// Applies texture coordinate offsets to surface data.
|
||||
/// @param[in,out] s Material surface data.
|
||||
/// @param[in] offset Texture coordinate offset.
|
||||
void aEyeApplyParallaxOffset(
|
||||
inout ASurface s,
|
||||
float2 offset)
|
||||
{
|
||||
offset *= s.mask;
|
||||
|
||||
// To apply the parallax offset to secondary textures without causing swimming,
|
||||
// we must normalize it by removing the implicitly multiplied base map tiling.
|
||||
s.uv01 += (offset / s.baseTiling).xyxy;
|
||||
s.baseUv += A_BV(s, offset);
|
||||
}
|
||||
|
||||
/// Calculates Offset Bump Mapping texture offsets.
|
||||
/// @param[in,out] s Material surface data.
|
||||
/// @param[in] parallaxMap Height map.
|
||||
/// @param[in] parallax Height scale of the heightmap [0,0.08].
|
||||
void aEyeOffsetBumpMapping(
|
||||
inout ASurface s,
|
||||
sampler2D parallaxMap,
|
||||
half parallax)
|
||||
{
|
||||
// NOTE: Prevents NaN compiler errors in DX9 mode for shadow pass.
|
||||
#if !defined(UNITY_PASS_SHADOWCASTER) && !defined(UNITY_PASS_META)
|
||||
#ifdef _VIRTUALTEXTURING_ON
|
||||
half h = VTSampleBase(s.baseVirtualCoord).a;
|
||||
#else
|
||||
half h = tex2D(parallaxMap, s.baseUv).w;
|
||||
#endif
|
||||
|
||||
h = h * parallax - parallax / 2.0h;
|
||||
|
||||
half3 v = s.viewDirTangent;
|
||||
v.z += 0.42h;
|
||||
|
||||
aEyeApplyParallaxOffset(s, h * (v.xy / v.z));
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Calculates Parallax Occlusion Mapping texture offsets.
|
||||
/// @param[in,out] s Material surface data.
|
||||
/// @param[in] parallaxMap Height map.
|
||||
/// @param[in] parallax Height scale of the heightmap [0,0.08].
|
||||
/// @param[in] minSamples Minimum number of samples for POM effect [1,n].
|
||||
/// @param[in] maxSamples Maximum number of samples for POM effect [1,n].
|
||||
void aEyeParallaxOcclusionMapping(
|
||||
inout ASurface s,
|
||||
sampler2D parallaxMap,
|
||||
float parallax,
|
||||
float minSamples,
|
||||
float maxSamples)
|
||||
{
|
||||
// NOTE: Prevents NaN compiler errors in DX9 mode for shadow pass.
|
||||
#if !defined(UNITY_PASS_SHADOWCASTER) && !defined(UNITY_PASS_META)
|
||||
// Parallax Occlusion Mapping
|
||||
// cf http://www.gamedev.net/page/resources/_/technical/graphics-programming-and-theory/a-closer-look-at-parallax-occlusion-mapping-r3262
|
||||
float2 offset = float2(0.0f, 0.0f);
|
||||
|
||||
// Calculate the parallax offset vector max length.
|
||||
// This is equivalent to the tangent of the angle between the
|
||||
// viewer position and the fragment location.
|
||||
float parallaxLimit = -length(s.viewDirTangent.xy) / s.viewDirTangent.z;
|
||||
|
||||
// Scale the parallax limit according to heightmap scale.
|
||||
parallaxLimit *= parallax;
|
||||
|
||||
// Calculate the parallax offset vector direction and maximum offset.
|
||||
float2 offsetDirTangent = normalize(s.viewDirTangent.xy);
|
||||
float2 maxOffset = offsetDirTangent * parallaxLimit;
|
||||
|
||||
// Calculate how many samples should be taken along the view ray
|
||||
// to find the surface intersection. This is based on the angle
|
||||
// between the surface normal and the view vector.
|
||||
int numSamples = (int)lerp(maxSamples, minSamples, s.NdotV);
|
||||
int currentSample = 0;
|
||||
|
||||
// Specify the view ray step size. Each sample will shift the current
|
||||
// view ray by this amount.
|
||||
float stepSize = 1.0f / (float)numSamples;
|
||||
|
||||
// Initialize the starting view ray height and the texture offsets.
|
||||
float currentRayHeight = 1.0f;
|
||||
float2 lastOffset = float2(0.0f, 0.0f);
|
||||
|
||||
float lastSampledHeight = 1.0f;
|
||||
float currentSampledHeight = 1.0f;
|
||||
|
||||
#ifdef _VIRTUALTEXTURING_ON
|
||||
VirtualCoord vcoord = s.baseVirtualCoord;
|
||||
#else
|
||||
// Calculate the texture coordinate partial derivatives in screen
|
||||
// space for the tex2Dgrad texture sampling instruction.
|
||||
float2 dx = ddx(s.baseUv);
|
||||
float2 dy = ddy(s.baseUv);
|
||||
#endif
|
||||
|
||||
while (currentSample < numSamples) {
|
||||
#ifdef _VIRTUALTEXTURING_ON
|
||||
vcoord = VTUpdateVirtualCoord(vcoord, s.baseUv + offset);
|
||||
currentSampledHeight = VTSampleBase(vcoord).a;
|
||||
#else
|
||||
// Sample the heightmap at the current texcoord offset.
|
||||
currentSampledHeight = tex2Dgrad(parallaxMap, s.baseUv + offset, dx, dy).w;
|
||||
#endif
|
||||
|
||||
// Test if the view ray has intersected the surface.
|
||||
UNITY_BRANCH
|
||||
if (currentSampledHeight > currentRayHeight) {
|
||||
// Find the relative height delta before and after the intersection.
|
||||
// This provides a measure of how close the intersection is to
|
||||
// the final sample location.
|
||||
float delta1 = currentSampledHeight - currentRayHeight;
|
||||
float delta2 = (currentRayHeight + stepSize) - lastSampledHeight;
|
||||
float ratio = delta1 / (delta1 + delta2);
|
||||
|
||||
// Interpolate between the final two segments to
|
||||
// find the true intersection point offset.
|
||||
offset = lerp(offset, lastOffset, ratio);
|
||||
|
||||
// Force the exit of the while loop
|
||||
currentSample = numSamples + 1;
|
||||
}
|
||||
else {
|
||||
// The intersection was not found. Now set up the loop for the next
|
||||
// iteration by incrementing the sample count,
|
||||
currentSample++;
|
||||
|
||||
// take the next view ray height step,
|
||||
currentRayHeight -= stepSize;
|
||||
|
||||
// save the current texture coordinate offset and increment
|
||||
// to the next sample location,
|
||||
lastOffset = offset;
|
||||
offset += stepSize * maxOffset;
|
||||
|
||||
// and finally save the current heightmap height.
|
||||
lastSampledHeight = currentSampledHeight;
|
||||
}
|
||||
}
|
||||
|
||||
aEyeApplyParallaxOffset(s, offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
void aEyeParallax(
|
||||
inout ASurface s)
|
||||
{
|
||||
#ifdef A_EYE_PARALLAX_REFRACTION
|
||||
// Cornea "Refraction".
|
||||
aEyeParallaxOcclusionMapping(s, _MainTex, _EyeParallax * _Color.a, 10.0f, 25.0f);
|
||||
//aEyeOffsetBumpMapping(s, _MainTex, _EyeParallax * _Color.a);
|
||||
|
||||
// Pupil Dilation
|
||||
// HACK: Use the heightmap as the gradient, since it matches the other maps.
|
||||
// http://www.polycount.com/forum/showpost.php?p=1511423&postcount=13
|
||||
half mask = 1.0h - aSampleBase(s).a;
|
||||
float2 centeredUv = frac(s.baseUv) + float2(-0.5f, -0.5f);
|
||||
|
||||
s.baseUv -= A_BV(s, centeredUv * mask * _EyePupilSize);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // ALLOY_LEGACY_SHADERS_FEATURE_EYE_PARALLAX_CGINC
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa57460a27e82314fa79975584c542f8
|
||||
timeCreated: 1467837473
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user