Migrate shaders to URP and add loading screen
Reworks multiple shaders and materials for URP compatibility and adds a Loading screen/scene and a few model imports. Key changes:
- Converted ProBuilder standard vertex-color shader and several particle/surface shaders to URP HLSL passes (UniversalForward, ShadowCaster, Depth, DepthNormals) preserving base texture * tint * vertex color, normal map and PBR parameters.
- Updated particle SurfaceShader_VC to a URP forward pass and simplified lighting to use URP shader library helpers.
- Updated materials (landMark, tile) to point to project textures, adjust keywords/flags (e.g. XRMotionVectorsPass, disable ShadowCaster for one), tweak tiling and base color values.
- Added a Loading screen UI (UXML, USS) and LoadingScreenController.cs plus a new Loading scene and scene metadata.
- Imported new FBX assets (T-Pose, Untitled) and updated Editor build settings / project settings to include the new Loading scene.
These changes migrate rendering code to the Universal Render Pipeline and add a basic loading UI/scene, while updating materials and project settings accordingly.
2026-02-23 21:47:59 -08:00
|
|
|
Shader "Custom/URP_GlowShader"
|
|
|
|
|
{
|
|
|
|
|
Properties {
|
|
|
|
|
_Color ("Color", Color) = (1,1,1,1)
|
|
|
|
|
_Size ("Atmosphere Size Multiplier", Range(0,16)) = 4
|
|
|
|
|
_Rim ("Fade Power", Range(0,8)) = 4
|
|
|
|
|
_Light ("Lighting Power", Range(0,10)) = 1.4
|
|
|
|
|
_Ambient ("Ambient Power", Range (0,6)) = 0.8
|
|
|
|
|
}
|
|
|
|
|
SubShader {
|
|
|
|
|
Tags { "RenderType"="Transparent" }
|
|
|
|
|
LOD 200
|
|
|
|
|
Cull Front
|
|
|
|
|
|
|
|
|
|
Pass {
|
|
|
|
|
Name "FORWARD"
|
|
|
|
|
Tags { "LightMode" = "UniversalForward" }
|
|
|
|
|
|
|
|
|
|
HLSLPROGRAM
|
|
|
|
|
#pragma vertex vert
|
|
|
|
|
#pragma fragment frag
|
|
|
|
|
#pragma multi_compile_fog
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
|
|
|
|
|
|
|
|
|
struct Attributes {
|
|
|
|
|
float4 positionOS : POSITION;
|
|
|
|
|
float3 normalOS : NORMAL;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Varyings {
|
|
|
|
|
float4 positionHCS : SV_POSITION;
|
|
|
|
|
float3 normalWS : TEXCOORD0;
|
|
|
|
|
float3 viewDirWS : TEXCOORD1;
|
|
|
|
|
float fogFactor : TEXCOORD2;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
CBUFFER_START(UnityPerMaterial)
|
|
|
|
|
float4 _Color;
|
|
|
|
|
float _Size;
|
|
|
|
|
float _Rim;
|
|
|
|
|
float _Light;
|
|
|
|
|
float _Ambient;
|
|
|
|
|
CBUFFER_END
|
|
|
|
|
|
|
|
|
|
Varyings vert(Attributes IN)
|
|
|
|
|
{
|
|
|
|
|
Varyings OUT;
|
|
|
|
|
float3 scaled = IN.positionOS.xyz + IN.positionOS.xyz * (_Size / 10.0);
|
|
|
|
|
OUT.positionHCS = TransformObjectToHClip(scaled);
|
|
|
|
|
float3 normalWS = TransformObjectToWorldNormal(-IN.normalOS); // Invert normal
|
|
|
|
|
OUT.normalWS = normalWS;
|
|
|
|
|
OUT.viewDirWS = normalize(_WorldSpaceCameraPos - TransformObjectToWorld(scaled));
|
|
|
|
|
OUT.fogFactor = ComputeFogFactor(OUT.positionHCS.z / OUT.positionHCS.w);
|
|
|
|
|
return OUT;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
float4 frag(Varyings IN) : SV_Target
|
|
|
|
|
{
|
|
|
|
|
float rim = saturate(dot(normalize(IN.viewDirWS), IN.normalWS));
|
|
|
|
|
float alpha = lerp(0, 1, pow(rim, _Rim));
|
|
|
|
|
|
|
|
|
|
// Lighting: simple negative lambert
|
|
|
|
|
float3 lightDir = normalize(_MainLightPosition.xyz);
|
|
|
|
|
float diff = max(0, dot(-IN.normalWS, lightDir)) * _Light + _Ambient;
|
|
|
|
|
float3 color = _Color.rgb * _MainLightColor.rgb * diff;
|
|
|
|
|
color = MixFog(color, IN.fogFactor);
|
|
|
|
|
return float4(color, alpha * _Color.a);
|
|
|
|
|
}
|
|
|
|
|
ENDHLSL
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
FallBack "Universal Forward"
|
2026-02-05 05:07:55 -08:00
|
|
|
}
|