99 lines
3.1 KiB
GLSL
99 lines
3.1 KiB
GLSL
Shader "Colorify/Standard" {
|
|
Properties {
|
|
_Color ("Color", Vector) = (1,1,1,1)
|
|
_MainTex ("Albedo", 2D) = "white" {}
|
|
_Cutoff ("Alpha Cutoff", Range(0, 1)) = 0.5
|
|
_Glossiness ("Smoothness", Range(0, 1)) = 0.5
|
|
[Gamma] _Metallic ("Metallic", Range(0, 1)) = 0
|
|
_MetallicGlossMap ("Metallic", 2D) = "white" {}
|
|
_BumpScale ("Scale", Float) = 1
|
|
_BumpMap ("Normal Map", 2D) = "bump" {}
|
|
_Parallax ("Height Scale", Range(0.005, 0.08)) = 0.02
|
|
_ParallaxMap ("Height Map", 2D) = "black" {}
|
|
_OcclusionStrength ("Strength", Range(0, 1)) = 1
|
|
_OcclusionMap ("Occlusion", 2D) = "white" {}
|
|
_EmissionColor ("Color", Vector) = (0,0,0,1)
|
|
_EmissionMap ("Emission", 2D) = "white" {}
|
|
_DetailMask ("Detail Mask", 2D) = "white" {}
|
|
_DetailAlbedoMap ("Detail Albedo x2", 2D) = "grey" {}
|
|
_DetailNormalMapScale ("Scale", Float) = 1
|
|
_DetailNormalMap ("Normal Map", 2D) = "bump" {}
|
|
[Enum(UV0,0,UV1,1)] _UVSec ("UV Set for secondary textures", Float) = 0
|
|
[HideInInspector] _EmissionScaleUI ("Scale", Float) = 0
|
|
[HideInInspector] _EmissionColorUI ("Color", Vector) = (1,1,1,1)
|
|
[HideInInspector] _Mode ("__mode", Float) = 0
|
|
[HideInInspector] _SrcBlend ("__src", Float) = 1
|
|
[HideInInspector] _DstBlend ("__dst", Float) = 0
|
|
[HideInInspector] _ZWrite ("__zw", Float) = 1
|
|
_ColorifyMode ("Masked", Float) = 0
|
|
_ColorifyColorsMode ("2 Colors", Float) = 0
|
|
_ColorifyMaskTex ("Recolor mask", 2D) = "black" {}
|
|
_PatCol ("Pattern Color", Vector) = (1,1,1,1)
|
|
_NewColor ("New Color", Vector) = (1,1,1,1)
|
|
_NewSpecularColor ("New Specular color", Vector) = (1,1,1,1)
|
|
_ColorifyMultiplier ("Multiplier", Range(0, 10)) = 1
|
|
_PatCol2 ("Pattern Color 2", Vector) = (1,1,1,1)
|
|
_NewColor2 ("New Color 2", Vector) = (1,1,1,1)
|
|
_NewSpecularColor2 ("New Specular color 2", Vector) = (1,1,1,1)
|
|
_ColorifyMultiplier2 ("Multiplier 2", Range(0, 10)) = 1
|
|
_Range ("RGB Range", Range(0, 2)) = 0.01
|
|
_HueRange ("Hue Range", Range(0, 4)) = 0.1
|
|
_Range2 ("RGB Range 2", Range(0, 2)) = 0.01
|
|
_HueRange2 ("Hue Range 2", Range(0, 4)) = 0.1
|
|
_ColorifySpecStrength ("Specular recolor strength", Range(0, 1)) = 0.3
|
|
}
|
|
//DummyShaderTextExporter
|
|
SubShader{
|
|
Tags { "RenderType"="Opaque" }
|
|
LOD 200
|
|
|
|
Pass
|
|
{
|
|
HLSLPROGRAM
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
|
|
float4x4 unity_ObjectToWorld;
|
|
float4x4 unity_MatrixVP;
|
|
float4 _MainTex_ST;
|
|
|
|
struct Vertex_Stage_Input
|
|
{
|
|
float4 pos : POSITION;
|
|
float2 uv : TEXCOORD0;
|
|
};
|
|
|
|
struct Vertex_Stage_Output
|
|
{
|
|
float2 uv : TEXCOORD0;
|
|
float4 pos : SV_POSITION;
|
|
};
|
|
|
|
Vertex_Stage_Output vert(Vertex_Stage_Input input)
|
|
{
|
|
Vertex_Stage_Output output;
|
|
output.uv = (input.uv.xy * _MainTex_ST.xy) + _MainTex_ST.zw;
|
|
output.pos = mul(unity_MatrixVP, mul(unity_ObjectToWorld, input.pos));
|
|
return output;
|
|
}
|
|
|
|
Texture2D<float4> _MainTex;
|
|
SamplerState sampler_MainTex;
|
|
float4 _Color;
|
|
|
|
struct Fragment_Stage_Input
|
|
{
|
|
float2 uv : TEXCOORD0;
|
|
};
|
|
|
|
float4 frag(Fragment_Stage_Input input) : SV_TARGET
|
|
{
|
|
return _MainTex.Sample(sampler_MainTex, input.uv.xy) * _Color;
|
|
}
|
|
|
|
ENDHLSL
|
|
}
|
|
}
|
|
Fallback "VertexLit"
|
|
//CustomEditor "ColorifyStandardShaderGUI"
|
|
} |