mirror of
https://github.com/muskit/H3VR-TNH-Quality-of-Life-Improvements.git
synced 2026-06-02 20:24:26 -07:00
215 lines
6.9 KiB
Plaintext
215 lines
6.9 KiB
Plaintext
// Alloy Physical Shader Framework
|
|
// Copyright 2013-2017 RUST LLC.
|
|
// http://www.alloy.rustltd.com/
|
|
|
|
Shader "Alloy Mods/IntersectionGlow" {
|
|
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
|
|
[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_Metallic]
|
|
_SpecTex ("'Metal(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
|
|
[LM_Metallic]
|
|
_Metal ("'Metallic' {Min:0, Max:1}", Float) = 1
|
|
_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
|
|
|
|
// Scan Line Properties
|
|
_ScanLineProperties ("'Scan Line' {Section:{Color:0}}", Float) = 0
|
|
[HDR]
|
|
_ScanLineColor ("'Tint' {}", Color) = (1,1,1)
|
|
[Gamma]
|
|
_ScanLineWeight ("'Weight' {Min:0, Max:1}", Float) = 1
|
|
_ScanLineWidth ("'Width' {Min:0, Max:1}", Float) = 0.1
|
|
|
|
// 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
|
|
|
|
// 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
|
|
_RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0
|
|
_EnableInstancing ("'Enable Instancing' {EnableInstancing:{}}", Float) = 0
|
|
}
|
|
|
|
SubShader {
|
|
Tags{
|
|
"Queue" = "Transparent"
|
|
"IgnoreProjector" = "True"
|
|
"RenderType" = "Transparent"
|
|
//"DisableBatching" = "LODFading"
|
|
}
|
|
LOD 300
|
|
|
|
Pass {
|
|
Name "FORWARD_BACK"
|
|
Tags { "LightMode" = "ForwardBase" }
|
|
|
|
Blend One OneMinusSrcAlpha
|
|
Cull Front
|
|
ZWrite Off
|
|
|
|
CGPROGRAM
|
|
#pragma target 3.0
|
|
#pragma exclude_renderers gles
|
|
|
|
#pragma shader_feature EFFECT_BUMP
|
|
#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
|
|
#define _INTERSECTION_GLOW_BACKFACE
|
|
|
|
#include "Assets/Alloy/Mods/Shaders/Definition/IntersectionGlow.cginc"
|
|
#include "Assets/Alloy/Shaders/Forward/Base.cginc"
|
|
|
|
ENDCG
|
|
}
|
|
|
|
Pass {
|
|
Name "FORWARD"
|
|
Tags { "LightMode" = "ForwardBase" }
|
|
|
|
Blend One OneMinusSrcAlpha
|
|
ZWrite Off
|
|
|
|
CGPROGRAM
|
|
#pragma target 3.0
|
|
#pragma exclude_renderers gles
|
|
|
|
#pragma shader_feature EFFECT_BUMP
|
|
#pragma shader_feature _EMISSION
|
|
#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/Mods/Shaders/Definition/IntersectionGlow.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 _ _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/Mods/Shaders/Definition/IntersectionGlow.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 multi_compile_instancing
|
|
|
|
#pragma vertex aMainVertexShader
|
|
#pragma fragment aMainFragmentShader
|
|
|
|
#define UNITY_PASS_SHADOWCASTER
|
|
|
|
#include "Assets/Alloy/Mods/Shaders/Definition/IntersectionGlow.cginc"
|
|
#include "Assets/Alloy/Shaders/Forward/Shadow.cginc"
|
|
|
|
ENDCG
|
|
}
|
|
}
|
|
|
|
FallBack "VertexLit"
|
|
CustomEditor "AlloyFieldBasedEditor"
|
|
}
|