Files
--Demo/Models/CRS/URP/_SetDress/Shaders/Skybox Cubemap Extended.shader
2026-09-20 16:52:21 +08:00

239 lines
12 KiB
Plaintext

// Made with Amplify Shader Editor v1.9.1.5
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "CRS/SetDress/Skybox"
{
Properties
{
[HideInInspector]_Tex1_HDR("DecodeInstructions1", Vector) = (1,1,1,0)
[HideInInspector]_Tex_HDR("DecodeInstructions", Vector) = (1,1,1,0)
[Gamma][Header(Cubemap)]_1TintColor("1 Tint Color", Color) = (0.5,0.5,0.5,1)
_1Exposure("1 Exposure", Range( 0 , 8)) = 1
[NoScaleOffset]_Tex("1 Cubemap (HDR)", CUBE) = "black" {}
[Gamma][Header(Cubemap)]_2TintColor("2 Tint Color", Color) = (0.5,0.5,0.5,1)
_2Exposure("2 Exposure", Range( 0 , 8)) = 1
[NoScaleOffset]_Tex1("2 Cubemap (HDR)", CUBE) = "black" {}
[IntRange]_Rotation("Rotation", Range( 0 , 360)) = 0
_SunnyToOverCast("SunnyToOverCast", Range( 0 , 1)) = 1
}
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 100
CGINCLUDE
#pragma target 3.0
ENDCG
Blend Off
AlphaToMask Off
Cull Back
ColorMask RGBA
ZWrite On
ZTest LEqual
Offset 0 , 0
Pass
{
Name "Unlit"
CGPROGRAM
#ifndef UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX
//only defining to not throw compilation error over Unity 5.5
#define UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input)
#endif
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_instancing
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;
float4 color : COLOR;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 vertex : SV_POSITION;
#ifdef ASE_NEEDS_FRAG_WORLD_POSITION
float3 worldPos : TEXCOORD0;
#endif
float4 ase_texcoord1 : TEXCOORD1;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
uniform half4 _Tex_HDR;
uniform half4 _Tex1_HDR;
uniform samplerCUBE _Tex;
uniform half _Rotation;
uniform half4 _1TintColor;
uniform half _1Exposure;
uniform samplerCUBE _Tex1;
uniform half4 _2TintColor;
uniform half _2Exposure;
uniform float _SunnyToOverCast;
inline half3 DecodeHDR1189( float4 Data )
{
return DecodeHDR(Data, _Tex_HDR);
}
inline half3 DecodeHDR1193( float4 Data )
{
return DecodeHDR(Data, _Tex1_HDR);
}
v2f vert ( appdata v )
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
UNITY_TRANSFER_INSTANCE_ID(v, o);
float temp_output_47_0 = radians( _Rotation );
float3 appendResult56 = (float3(cos( temp_output_47_0 ) , 0.0 , ( sin( temp_output_47_0 ) * -1.0 )));
float3 appendResult266 = (float3(0.0 , 1.0 , 0.0));
float3 appendResult58 = (float3(sin( temp_output_47_0 ) , 0.0 , cos( temp_output_47_0 )));
float3 ase_worldPos = mul(unity_ObjectToWorld, float4( (v.vertex).xyz, 1 )).xyz;
float3 normalizeResult247 = normalize( ase_worldPos );
float3 vertexToFrag774 = mul( float3x3(appendResult56, appendResult266, appendResult58), normalizeResult247 );
o.ase_texcoord1.xyz = vertexToFrag774;
//setting value to unused interpolator channels and avoid initialization warnings
o.ase_texcoord1.w = 0;
float3 vertexValue = float3(0, 0, 0);
#if ASE_ABSOLUTE_VERTEX_POS
vertexValue = v.vertex.xyz;
#endif
vertexValue = vertexValue;
#if ASE_ABSOLUTE_VERTEX_POS
v.vertex.xyz = vertexValue;
#else
v.vertex.xyz += vertexValue;
#endif
o.vertex = UnityObjectToClipPos(v.vertex);
#ifdef ASE_NEEDS_FRAG_WORLD_POSITION
o.worldPos = mul(unity_ObjectToWorld, v.vertex).xyz;
#endif
return o;
}
fixed4 frag (v2f i ) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(i);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
fixed4 finalColor;
#ifdef ASE_NEEDS_FRAG_WORLD_POSITION
float3 WorldPosition = i.worldPos;
#endif
float3 vertexToFrag774 = i.ase_texcoord1.xyz;
half4 Data1189 = texCUBE( _Tex, vertexToFrag774 );
half3 localDecodeHDR1189 = DecodeHDR1189( Data1189 );
half4 Data1193 = texCUBE( _Tex1, vertexToFrag774 );
half3 localDecodeHDR1193 = DecodeHDR1193( Data1193 );
float4 lerpResult1197 = lerp( ( float4( localDecodeHDR1189 , 0.0 ) * _1TintColor * _1Exposure ) , ( float4( localDecodeHDR1193 , 0.0 ) * _2TintColor * _2Exposure ) , _SunnyToOverCast);
finalColor = ( lerpResult1197 * unity_ColorSpaceDouble );
return finalColor;
}
ENDCG
}
}
CustomEditor "ASEMaterialInspector"
Fallback Off
}
/*ASEBEGIN
Version=19105
Node;AmplifyShaderEditor.RangedFloatNode;48;72.29303,1627.819;Half;False;Property;_Rotation;Rotation;8;1;[IntRange];Create;True;0;0;0;False;0;False;0;290;0;360;0;1;FLOAT;0
Node;AmplifyShaderEditor.RadiansOpNode;47;398.6785,1636.944;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SinOpNode;59;613.7236,1484.427;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.RangedFloatNode;1080;603.7236,1570.427;Half;False;Constant;_Float26;Float 26;50;0;Create;True;0;0;0;False;0;False;-1;0;0;0;0;1;FLOAT;0
Node;AmplifyShaderEditor.SinOpNode;61;633.7236,1851.427;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.RangedFloatNode;1081;777.7236,1772.484;Half;False;Constant;_Float27;Float 27;50;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0
Node;AmplifyShaderEditor.CosOpNode;365;633.7236,1930.426;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.RangedFloatNode;1204;743.1566,1679.188;Inherit;False;Constant;_Float0;Float 0;11;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0
Node;AmplifyShaderEditor.CosOpNode;55;616.4988,1385.771;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;60;795.7236,1449.427;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.DynamicAppendNode;56;1004.724,1354.427;Inherit;True;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.DynamicAppendNode;58;993.6268,1891.918;Inherit;True;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.DynamicAppendNode;266;992.951,1656.948;Inherit;True;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;1;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.WorldPosInputsNode;238;1288.399,1782.695;Float;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
Node;AmplifyShaderEditor.NormalizeNode;247;1487.328,1782.995;Inherit;False;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.MatrixFromVectors;54;1348.722,1547.427;Inherit;False;FLOAT3x3;True;4;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT3;0,0,0;False;1;FLOAT3x3;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;49;1677.628,1549.304;Inherit;False;2;2;0;FLOAT3x3;0,0,0,1,1,1,1,0,1;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.VertexToFragmentNode;774;1884.26,1552.152;Inherit;False;False;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.RangedFloatNode;1177;2816.458,1580.344;Half;False;Property;_1Exposure;1 Exposure;3;0;Create;True;0;0;0;False;0;False;1;1.3;0;8;0;1;FLOAT;0
Node;AmplifyShaderEditor.ColorNode;1200;2876.983,1396.534;Half;False;Property;_1TintColor;1 Tint Color;2;1;[Gamma];Create;True;0;0;0;False;1;Header(Cubemap);False;0.5,0.5,0.5,1;0.5,0.5,0.5,1;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.ColorNode;1173;2870.685,1723.546;Half;False;Property;_2TintColor;2 Tint Color;5;1;[Gamma];Create;True;0;0;0;False;1;Header(Cubemap);False;0.5,0.5,0.5,1;0.5019608,0.5019608,0.5019608,0;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.RangedFloatNode;1202;2814.806,1940.19;Half;False;Property;_2Exposure;2 Exposure;6;0;Create;True;0;0;0;False;0;False;1;1.28;0;8;0;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;1199;3203.704,1341.623;Inherit;False;3;3;0;FLOAT3;0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
Node;AmplifyShaderEditor.RangedFloatNode;1198;3229.714,1871.207;Inherit;False;Property;_SunnyToOverCast;SunnyToOverCast;9;0;Create;True;0;0;0;False;0;False;1;0;0;1;0;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;1203;3311.877,1646.805;Inherit;False;3;3;0;FLOAT3;0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
Node;AmplifyShaderEditor.LerpOp;1197;3584.544,1502.63;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;1174;4033.443,1518.849;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.SamplerNode;1192;2204.341,1766.604;Inherit;True;Property;_Tex1;2 Cubemap (HDR);7;1;[NoScaleOffset];Create;False;0;0;0;False;0;False;-1;None;f5b0015ee1ac03e46827f49346284b54;True;0;False;black;LockedToCube;False;Object;-1;Auto;Cube;8;0;SAMPLERCUBE;;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;3;FLOAT3;0,0,0;False;4;FLOAT3;0,0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SamplerNode;41;2201.327,1524.838;Inherit;True;Property;_Tex;1 Cubemap (HDR);4;1;[NoScaleOffset];Create;False;0;0;0;False;0;False;-1;None;1da8f233b232f3b4b8b08e7c16c742ff;True;0;False;black;LockedToCube;False;Object;-1;Auto;Cube;8;0;SAMPLERCUBE;;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;3;FLOAT3;0,0,0;False;4;FLOAT3;0,0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.CustomExpressionNode;1193;2572.057,1645.181;Half;False;DecodeHDR(Data, _Tex1_HDR);3;Create;1;True;Data;FLOAT4;0,0,0,0;In;;Float;False;DecodeHDR;True;False;0;;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.Vector4Node;1190;2396.673,1066.943;Half;False;Property;_Tex_HDR;DecodeInstructions;1;1;[HideInInspector];Create;False;0;0;0;True;0;False;1,1,1,0;1,1,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.CustomExpressionNode;1189;2564.682,1338.843;Half;False;DecodeHDR(Data, _Tex_HDR);3;Create;1;True;Data;FLOAT4;0,0,0,0;In;;Float;False;DecodeHDR;True;False;0;;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.Vector4Node;1196;2608.687,1067.889;Half;False;Property;_Tex1_HDR;DecodeInstructions1;0;1;[HideInInspector];Create;False;0;0;0;True;0;False;1,1,1,0;1,1,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.ColorSpaceDouble;1175;3655.229,1666.937;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;1252;4242.709,1480.751;Float;False;True;-1;2;ASEMaterialInspector;100;5;CRS/SetDress/Skybox;0770190933193b94aaa3065e307002fa;True;Unlit;0;0;Unlit;2;False;True;0;1;False;;0;False;;0;1;False;;0;False;;True;0;False;;0;False;;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;RenderType=Opaque=RenderType;True;2;False;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;0;;0;0;Standard;1;Vertex Position,InvertActionOnDeselection;1;0;0;1;True;False;;False;0
WireConnection;47;0;48;0
WireConnection;59;0;47;0
WireConnection;61;0;47;0
WireConnection;365;0;47;0
WireConnection;55;0;47;0
WireConnection;60;0;59;0
WireConnection;60;1;1080;0
WireConnection;56;0;55;0
WireConnection;56;1;1081;0
WireConnection;56;2;60;0
WireConnection;58;0;61;0
WireConnection;58;1;1081;0
WireConnection;58;2;365;0
WireConnection;266;0;1081;0
WireConnection;266;1;1204;0
WireConnection;266;2;1081;0
WireConnection;247;0;238;0
WireConnection;54;0;56;0
WireConnection;54;1;266;0
WireConnection;54;2;58;0
WireConnection;49;0;54;0
WireConnection;49;1;247;0
WireConnection;774;0;49;0
WireConnection;1199;0;1189;0
WireConnection;1199;1;1200;0
WireConnection;1199;2;1177;0
WireConnection;1203;0;1193;0
WireConnection;1203;1;1173;0
WireConnection;1203;2;1202;0
WireConnection;1197;0;1199;0
WireConnection;1197;1;1203;0
WireConnection;1197;2;1198;0
WireConnection;1174;0;1197;0
WireConnection;1174;1;1175;0
WireConnection;1192;1;774;0
WireConnection;41;1;774;0
WireConnection;1193;0;1192;0
WireConnection;1189;0;41;0
WireConnection;1252;0;1174;0
ASEEND*/
//CHKSM=CD40C77942C294C53714F8B3EF75370623D6EE5B