mirror of
https://github.com/muskit/H3VR-TNH-Quality-of-Life-Improvements.git
synced 2026-06-03 04:34:26 -07:00
208 lines
7.6 KiB
Plaintext
208 lines
7.6 KiB
Plaintext
|
|
// Alloy Physical Shader Framework
|
||
|
|
// Copyright 2013-2017 RUST LLC.
|
||
|
|
// http://www.alloy.rustltd.com/
|
||
|
|
|
||
|
|
Shader "Alloy/Decal/Additive" {
|
||
|
|
Properties {
|
||
|
|
[Toggle(EFFECT_BUMP)]
|
||
|
|
_HasBumpMap ("'Normals Source' {Dropdown:{VertexNormals:{_BumpMap,_BumpScale,_DetailNormalMap,_DetailNormalMapScale,_WetNormalMap,_WetNormalMapScale}, NormalMaps:{}}}", Float) = 1
|
||
|
|
|
||
|
|
// Main Textures
|
||
|
|
_MainTextures ("'Main Textures' {Section:{Color:0}}", Float) = 0
|
||
|
|
[HDR][LM_Albedo] [LM_Transparency]
|
||
|
|
_Color ("'Tint' {}", Color) = (1,1,1,1)
|
||
|
|
[LM_MasterTilingOffset] [LM_Albedo]
|
||
|
|
_MainTex ("'Base Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "white" {}
|
||
|
|
_MainTexVelocity ("Scroll", Vector) = (0,0,0,0)
|
||
|
|
_MainTexUV ("UV Set", Float) = 0
|
||
|
|
[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
|
||
|
|
_BumpScale ("'Normal Strength' {}", Float) = 1
|
||
|
|
|
||
|
|
// Parallax
|
||
|
|
[Toggle(_PARALLAXMAP)]
|
||
|
|
_ParallaxT ("'Parallax' {Feature:{Color:5}}", Float) = 0
|
||
|
|
[Toggle(_BUMPMODE_POM)]
|
||
|
|
_BumpMode ("'Mode' {Dropdown:{Parallax:{_MinSamples, _MaxSamples}, POM:{}}}", Float) = 0
|
||
|
|
_ParallaxMap ("'Heightmap(G)' {Visualize:{RGB}, Parent:_MainTex}", 2D) = "black" {}
|
||
|
|
_Parallax ("'Height' {Min:0, Max:0.08}", Float) = 0.02
|
||
|
|
_MinSamples ("'Min Samples' {Min:1}", Float) = 4
|
||
|
|
_MaxSamples ("'Max Samples' {Min:1}", Float) = 20
|
||
|
|
|
||
|
|
// 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
|
||
|
|
|
||
|
|
// 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
|
||
|
|
|
||
|
|
// Advanced Options
|
||
|
|
_AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0
|
||
|
|
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
||
|
|
_EnableInstancing ("'Enable Instancing' {EnableInstancing:{}}", Float) = 0
|
||
|
|
}
|
||
|
|
SubShader {
|
||
|
|
Tags {
|
||
|
|
"Queue" = "AlphaTest"
|
||
|
|
"IgnoreProjector" = "True"
|
||
|
|
"RenderType" = "Opaque"
|
||
|
|
"ForceNoShadowCasting" = "True"
|
||
|
|
//"DisableBatching" = "LODFading"
|
||
|
|
}
|
||
|
|
LOD 300
|
||
|
|
Offset -1,-1
|
||
|
|
|
||
|
|
Pass {
|
||
|
|
Name "FORWARD"
|
||
|
|
Tags { "LightMode" = "ForwardBase" }
|
||
|
|
|
||
|
|
Blend One One
|
||
|
|
ZWrite Off
|
||
|
|
Cull Back
|
||
|
|
|
||
|
|
CGPROGRAM
|
||
|
|
#pragma target 3.0
|
||
|
|
#pragma exclude_renderers gles
|
||
|
|
|
||
|
|
#pragma shader_feature EFFECT_BUMP
|
||
|
|
#pragma shader_feature _PARALLAXMAP
|
||
|
|
#pragma shader_feature _BUMPMODE_POM
|
||
|
|
#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 multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||
|
|
#pragma multi_compile_fwdbase
|
||
|
|
#pragma multi_compile_fog
|
||
|
|
#pragma multi_compile_instancing
|
||
|
|
|
||
|
|
#pragma vertex aMainVertexShader
|
||
|
|
#pragma fragment aMainFragmentShader
|
||
|
|
|
||
|
|
#define UNITY_PASS_FORWARDBASE
|
||
|
|
|
||
|
|
#include "Assets/Alloy/Shaders/Definition/DecalAdditive.cginc"
|
||
|
|
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
||
|
|
|
||
|
|
ENDCG
|
||
|
|
}
|
||
|
|
|
||
|
|
Pass {
|
||
|
|
Name "DEFERRED"
|
||
|
|
Tags { "LightMode" = "Deferred" }
|
||
|
|
|
||
|
|
Blend One One
|
||
|
|
ZWrite Off
|
||
|
|
Cull Back
|
||
|
|
|
||
|
|
CGPROGRAM
|
||
|
|
#pragma target 3.0
|
||
|
|
#pragma exclude_renderers nomrt gles
|
||
|
|
|
||
|
|
#pragma shader_feature EFFECT_BUMP
|
||
|
|
#pragma shader_feature _PARALLAXMAP
|
||
|
|
#pragma shader_feature _BUMPMODE_POM
|
||
|
|
#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 multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE
|
||
|
|
#pragma multi_compile ___ UNITY_HDR_ON
|
||
|
|
#pragma multi_compile_instancing
|
||
|
|
|
||
|
|
#pragma vertex aMainVertexShader
|
||
|
|
#pragma fragment aMainFragmentShader
|
||
|
|
|
||
|
|
#define UNITY_PASS_DEFERRED
|
||
|
|
|
||
|
|
#include "Assets/Alloy/Shaders/Definition/DecalAdditive.cginc"
|
||
|
|
#include "Assets/Alloy/Shaders/Forward/Gbuffer.cginc"
|
||
|
|
|
||
|
|
ENDCG
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
FallBack Off
|
||
|
|
CustomEditor "AlloyFieldBasedEditor"
|
||
|
|
}
|