(Update) Clean Projet
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: GAME_StylizedSky
|
||||
m_Shader: {fileID: 4800000, guid: 80b7948853269e541b4cabcab12ee2ec, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs: []
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _CloudCoverage: 0.5
|
||||
- _CloudScale: 1.2
|
||||
- _CloudSoftness: 0.2
|
||||
- _CloudSpeed: 0.01
|
||||
- _Exposure: 1
|
||||
- _HorizonSharpness: 2.2
|
||||
- _ShootingStarRate: 0.06
|
||||
- _StarDensity: 0.04
|
||||
- _StarTwinkleSpeed: 2
|
||||
- _SunGlowSize: 64
|
||||
- _SunGlowStrength: 1
|
||||
- _SunSize: 0.03
|
||||
m_Colors:
|
||||
- _CloudColor: {r: 1, g: 0.98, b: 0.95, a: 1}
|
||||
- _CloudShadowColor: {r: 0.55, g: 0.6, b: 0.72, a: 1}
|
||||
- _CloudWindDir: {r: 1, g: 0.3, b: 0, a: 0}
|
||||
- _DayHorizon: {r: 0.62, g: 0.78, b: 0.92, a: 1}
|
||||
- _DayZenith: {r: 0.18, g: 0.42, b: 0.78, a: 1}
|
||||
- _NightHorizon: {r: 0.04, g: 0.06, b: 0.12, a: 1}
|
||||
- _NightZenith: {r: 0.01, g: 0.02, b: 0.06, a: 1}
|
||||
- _ShootingStarColor: {r: 1, g: 1, b: 0.9, a: 1}
|
||||
- _SunColor: {r: 1, g: 0.95, b: 0.85, a: 1}
|
||||
- _SunGlowColor: {r: 1, g: 0.7, b: 0.4, a: 1}
|
||||
- _TwilightColor: {r: 0.95, g: 0.45, b: 0.25, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 71ef3332edd1b5e46a827cfbf6f52ac2
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,166 +0,0 @@
|
||||
Shader "GAME/StylizedSky"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[Header(Sky Gradient Day)][Space]
|
||||
[HDR] _DayZenith("Day Zenith", Color) = (0.18,0.42,0.78,1)
|
||||
[HDR] _DayHorizon("Day Horizon", Color) = (0.62,0.78,0.92,1)
|
||||
|
||||
[Header(Sky Gradient Night)][Space]
|
||||
[HDR] _NightZenith("Night Zenith", Color) = (0.01,0.02,0.06,1)
|
||||
[HDR] _NightHorizon("Night Horizon", Color) = (0.04,0.06,0.12,1)
|
||||
|
||||
[Header(Twilight)][Space]
|
||||
[HDR] _TwilightColor("Twilight Tint (dawn/dusk)", Color) = (0.95,0.45,0.25,1)
|
||||
_HorizonSharpness("Horizon Sharpness", Range(0.2,6)) = 2.2
|
||||
|
||||
[Header(Sun)][Space]
|
||||
[HDR] _SunColor("Sun Color", Color) = (1.0,0.95,0.85,1)
|
||||
_SunSize("Sun Size", Range(0.0005,0.2)) = 0.03
|
||||
[HDR] _SunGlowColor("Sun Glow Color", Color) = (1.0,0.7,0.4,1)
|
||||
_SunGlowSize("Sun Glow Falloff", Range(1,512)) = 64
|
||||
_SunGlowStrength("Sun Glow Strength", Range(0,4)) = 1.0
|
||||
|
||||
[Header(Clouds)][Space]
|
||||
[HDR] _CloudColor("Cloud Color (lit)", Color) = (1.0,0.98,0.95,1)
|
||||
[HDR] _CloudShadowColor("Cloud Color (shadow)", Color) = (0.55,0.6,0.72,1)
|
||||
_CloudCoverage("Cloud Coverage", Range(0,1)) = 0.5
|
||||
_CloudSoftness("Cloud Edge Softness", Range(0.01,0.6)) = 0.2
|
||||
_CloudScale("Cloud Scale", Range(0.2,4)) = 1.2
|
||||
_CloudSpeed("Cloud Speed", Range(0,0.2)) = 0.01
|
||||
_CloudWindDir("Cloud Wind Dir (xy)", Vector) = (1,0.3,0,0)
|
||||
|
||||
[Header(Stars)][Space]
|
||||
_StarDensity("Star Density", Range(0,0.2)) = 0.04
|
||||
_StarTwinkleSpeed("Star Twinkle Speed", Range(0,8)) = 2.0
|
||||
|
||||
[Header(Shooting Stars)][Space]
|
||||
[HDR] _ShootingStarColor("Shooting Star Color", Color) = (1,1,0.9,1)
|
||||
_ShootingStarRate("Shooting Star Rate", Range(0.01,0.5)) = 0.06
|
||||
|
||||
[Header(Exposure)][Space]
|
||||
_Exposure("Exposure", Range(0,4)) = 1.0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"RenderType" = "Background"
|
||||
"Queue" = "Background"
|
||||
"PreviewType" = "Skybox"
|
||||
"RenderPipeline" = "UniversalPipeline"
|
||||
}
|
||||
|
||||
// =================================================================================
|
||||
// Skybox (rendu par RenderSettings.skybox via le pass DrawSkybox d'URP)
|
||||
// =================================================================================
|
||||
Pass
|
||||
{
|
||||
Name "StylizedSky"
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
ZTest LEqual
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma vertex SkyVertex
|
||||
#pragma fragment SkyFragment
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "SkyCore.hlsl"
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
half4 _DayZenith;
|
||||
half4 _DayHorizon;
|
||||
half4 _NightZenith;
|
||||
half4 _NightHorizon;
|
||||
half4 _TwilightColor;
|
||||
float _HorizonSharpness;
|
||||
|
||||
half4 _SunColor;
|
||||
float _SunSize;
|
||||
half4 _SunGlowColor;
|
||||
float _SunGlowSize;
|
||||
float _SunGlowStrength;
|
||||
|
||||
half4 _CloudColor;
|
||||
half4 _CloudShadowColor;
|
||||
float _CloudCoverage;
|
||||
float _CloudSoftness;
|
||||
float _CloudScale;
|
||||
float _CloudSpeed;
|
||||
float4 _CloudWindDir;
|
||||
|
||||
float _StarDensity;
|
||||
float _StarTwinkleSpeed;
|
||||
|
||||
half4 _ShootingStarColor;
|
||||
float _ShootingStarRate;
|
||||
|
||||
float _Exposure;
|
||||
CBUFFER_END
|
||||
|
||||
struct Attributes
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float3 viewDirOS : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
// La skybox est dessinée autour de la caméra : la position objet du mesh est
|
||||
// directement la direction de vue. On la transmet brute et on la normalise au fragment.
|
||||
Varyings SkyVertex(Attributes IN)
|
||||
{
|
||||
Varyings OUT = (Varyings)0;
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_TRANSFER_INSTANCE_ID(IN, OUT);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
|
||||
OUT.positionCS = TransformObjectToHClip(IN.positionOS.xyz);
|
||||
OUT.viewDirOS = IN.positionOS.xyz;
|
||||
return OUT;
|
||||
}
|
||||
|
||||
// Compose le ciel dans l'ordre fond -> nuages -> soleil -> étoiles -> filantes.
|
||||
// Toute l'animation lit _SkyTime (synchronisé) et tout dépend de _SunDirection /
|
||||
// _TimeOfDay (synchronisés), donc le rendu est identique sur tous les clients.
|
||||
half4 SkyFragment(Varyings IN) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
|
||||
|
||||
float3 viewDir = normalize(IN.viewDirOS);
|
||||
|
||||
float3 col = SkyGradient(viewDir,
|
||||
_DayZenith.rgb, _DayHorizon.rgb,
|
||||
_NightZenith.rgb, _NightHorizon.rgb,
|
||||
_TwilightColor.rgb, _HorizonSharpness);
|
||||
|
||||
col += SunGlow(viewDir, _SunGlowColor.rgb, _SunGlowSize, _SunGlowStrength);
|
||||
|
||||
float4 clouds = Clouds(viewDir, _SkyTime * _CloudSpeed,
|
||||
_CloudColor.rgb, _CloudShadowColor.rgb,
|
||||
_CloudCoverage, _CloudSoftness, _CloudScale, _CloudWindDir.xy);
|
||||
col = col * (1.0 - clouds.a) + clouds.rgb;
|
||||
|
||||
col += SunDisk(viewDir, _SunColor.rgb, _SunSize) * (1.0 - clouds.a);
|
||||
|
||||
col += Stars(viewDir, _StarDensity, _StarTwinkleSpeed, _SkyTime) * (1.0 - clouds.a);
|
||||
col += ShootingStars(viewDir, _SkyTime, _ShootingStarColor.rgb, _ShootingStarRate) * (1.0 - clouds.a);
|
||||
|
||||
col *= _Exposure;
|
||||
return half4(col, 1.0);
|
||||
}
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
|
||||
Fallback Off
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 80b7948853269e541b4cabcab12ee2ec
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user