升级6.4.升级水,升级天气
This commit is contained in:
@@ -22755,8 +22755,8 @@ MonoBehaviour:
|
||||
Filter: '*'
|
||||
Bundles:
|
||||
- Name: main/ui.bundle
|
||||
Hash: 40fee51e07cdc187f12eeddb4b2467b1
|
||||
Size: 3295167
|
||||
Hash: 415c43559aecb3c81be8b98032cb9b72
|
||||
Size: 3305142
|
||||
Assets:
|
||||
- Path: Assets/ResRaw/Fgui/Common/Background - Gray (Light).png
|
||||
Address: UI/Background - Gray (Light)
|
||||
@@ -23031,8 +23031,8 @@ MonoBehaviour:
|
||||
Dependencies: []
|
||||
Tags:
|
||||
- Name: main/item.bundle
|
||||
Hash: 30830b32d82d58c86991dcce49a9ea8e
|
||||
Size: 542453520
|
||||
Hash: 18564d5b764d28e2cbe1efef324a3ab6
|
||||
Size: 542440956
|
||||
Assets:
|
||||
- Path: Assets/ResRaw/gfx/baits/black_leech/black_leech.prefab
|
||||
Address: Item/black_leech
|
||||
@@ -41082,8 +41082,8 @@ MonoBehaviour:
|
||||
Dependencies: []
|
||||
Tags:
|
||||
- Name: main/config.bundle
|
||||
Hash: 5012ed3cba6bc0f33a76fab8d6e1bd88
|
||||
Size: 6688
|
||||
Hash: 28bda5093936baaf565118337f9fe732
|
||||
Size: 6687
|
||||
Assets:
|
||||
- Path: Assets/ResRaw/config/tb/tbbait.json
|
||||
Address: Config/tbbait
|
||||
@@ -41298,8 +41298,8 @@ MonoBehaviour:
|
||||
Dependencies: []
|
||||
Tags:
|
||||
- Name: main/plyaer.bundle
|
||||
Hash: 1f70b60ba723e3f184071aaf0a696ab9
|
||||
Size: 379451803
|
||||
Hash: bc978aefb34e5feb6c9ade9f7bfded0a
|
||||
Size: 379452665
|
||||
Assets:
|
||||
- Path: Assets/ResRaw/Prefabs/Line/fishing line float set.prefab
|
||||
Address: Plyaer/fishing line float set
|
||||
|
||||
@@ -79,7 +79,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 43b4e18e1baccc642a82a5e642fd6997, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
configuration: {fileID: 11400000, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
|
||||
configuration: {fileID: 11400000, guid: 7a73ce8546b211f40bdf7de5a0f06be5, type: 2}
|
||||
lastConfiguration: {fileID: 0}
|
||||
Time: {fileID: 0}
|
||||
Lighting: {fileID: 0}
|
||||
|
||||
@@ -3980,7 +3980,7 @@ ParticleSystem:
|
||||
enabled: 1
|
||||
subEmitters:
|
||||
- serializedVersion: 3
|
||||
emitter: {fileID: 0}
|
||||
emitter: {fileID: 7133312199455739040}
|
||||
type: 1
|
||||
properties: 0
|
||||
emitProbability: 1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -98,6 +98,9 @@ VFXRenderer:
|
||||
m_ReflectionProbeUsage: 0
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_StaticBatchInfo:
|
||||
|
||||
@@ -3288,7 +3288,7 @@ MonoBehaviour:
|
||||
m_UISuperCollapsed: 0
|
||||
m_InputSlots:
|
||||
- {fileID: 8926484042661614890}
|
||||
- {fileID: 8926484042661614895}
|
||||
- {fileID: 8926484042661614899}
|
||||
m_OutputSlots: []
|
||||
m_Label:
|
||||
m_Data: {fileID: 8926484042661614568}
|
||||
@@ -3803,7 +3803,7 @@ MonoBehaviour:
|
||||
PublicKeyToken=b77a5c561934e089
|
||||
m_Direction: 0
|
||||
m_LinkedSlots: []
|
||||
--- !u!114 &8926484042661614895
|
||||
--- !u!114 &8926484042661614899
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -3821,7 +3821,7 @@ MonoBehaviour:
|
||||
m_UIPosition: {x: 0, y: 0}
|
||||
m_UICollapsed: 1
|
||||
m_UISuperCollapsed: 0
|
||||
m_MasterSlot: {fileID: 8926484042661614895}
|
||||
m_MasterSlot: {fileID: 8926484042661614899}
|
||||
m_MasterData:
|
||||
m_Owner: {fileID: 8926484042661614860}
|
||||
m_Value:
|
||||
@@ -3831,7 +3831,7 @@ MonoBehaviour:
|
||||
m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"e3b1ddad603b54246904e7544f9e3f13","type":3}}'
|
||||
m_Space: -1
|
||||
m_Property:
|
||||
name: _Main
|
||||
name: _MainTex
|
||||
m_serializedType:
|
||||
m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 258a078a981a33b4cb3d28d7518292dd
|
||||
guid: 7a73ce8546b211f40bdf7de5a0f06be5
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
@@ -2,24 +2,20 @@
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: enviro_lightningFlash_mat
|
||||
m_Shader: {fileID: 4800000, guid: c4e70ee8d55671543812ab0b45569cac, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 2
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
@@ -59,7 +55,6 @@ Material:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Brightness: 0
|
||||
- _BrightnessMod: 0.05
|
||||
@@ -85,4 +80,3 @@ Material:
|
||||
- _EmissionColor: {r: 2.4491117, g: 3.1938896, b: 4.594794, a: 1}
|
||||
- _TintColor: {r: 0.9433962, g: 0.9433962, b: 0.9433962, a: 0.34117648}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
|
||||
@@ -16,7 +16,7 @@ MonoBehaviour:
|
||||
showSky: 0
|
||||
showVolumeClouds: 1
|
||||
showFog: 0
|
||||
showFlatClouds: 1
|
||||
showFlatClouds: 0
|
||||
showEffects: 0
|
||||
showAurora: 0
|
||||
skyOverride:
|
||||
@@ -39,7 +39,7 @@ MonoBehaviour:
|
||||
steps: 32
|
||||
flatCloudsOverride:
|
||||
cirrusClouds: 1
|
||||
flatClouds: 1
|
||||
flatClouds: 0
|
||||
flatCloudsShadowSteps: 8
|
||||
auroraOverride:
|
||||
aurora: 1
|
||||
|
||||
@@ -13,7 +13,7 @@ MonoBehaviour:
|
||||
m_Name: Low
|
||||
m_EditorClassIdentifier:
|
||||
showEditor: 0
|
||||
showSky: 0
|
||||
showSky: 1
|
||||
showVolumeClouds: 0
|
||||
showFog: 0
|
||||
showFlatClouds: 0
|
||||
|
||||
@@ -14,8 +14,8 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
showEditor: 0
|
||||
showSky: 1
|
||||
showVolumeClouds: 0
|
||||
showFog: 0
|
||||
showVolumeClouds: 1
|
||||
showFog: 1
|
||||
showFlatClouds: 0
|
||||
showEffects: 0
|
||||
showAurora: 0
|
||||
|
||||
@@ -12,15 +12,15 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 5cbac6e678443724c9bd2baf5d564c1d, type: 3}
|
||||
m_Name: Clear Sky
|
||||
m_EditorClassIdentifier:
|
||||
showEditor: 1
|
||||
showEditor: 0
|
||||
showEffectControls: 0
|
||||
showCloudControls: 0
|
||||
showFlatCloudControls: 1
|
||||
showFogControls: 0
|
||||
showSkyControls: 0
|
||||
showSkyControls: 1
|
||||
showLightingControls: 0
|
||||
showAuroraControls: 0
|
||||
showEnvironmentControls: 1
|
||||
showEnvironmentControls: 0
|
||||
showAudioControls: 0
|
||||
showAmbientAudioControls: 0
|
||||
showWeatherAudioControls: 0
|
||||
@@ -118,7 +118,7 @@ MonoBehaviour:
|
||||
temperatureWeatherMod: 0
|
||||
wetnessTarget: 0
|
||||
snowTarget: 0
|
||||
windDirectionX: -1
|
||||
windDirectionY: -1
|
||||
windSpeed: 1
|
||||
windTurbulence: 0
|
||||
windDirectionX: 1
|
||||
windDirectionY: 0
|
||||
windSpeed: 0.25
|
||||
windTurbulence: 0.25
|
||||
|
||||
@@ -14,20 +14,20 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
showEditor: 0
|
||||
showEffectControls: 0
|
||||
showCloudControls: 1
|
||||
showCloudControls: 0
|
||||
showFlatCloudControls: 0
|
||||
showFogControls: 0
|
||||
showFogControls: 1
|
||||
showSkyControls: 0
|
||||
showLightingControls: 0
|
||||
showAuroraControls: 0
|
||||
showEnvironmentControls: 0
|
||||
showAudioControls: 0
|
||||
showAudioControls: 1
|
||||
showAmbientAudioControls: 1
|
||||
showWeatherAudioControls: 0
|
||||
showLightningControls: 0
|
||||
cloudsOverride:
|
||||
ambientLightIntensity: 1
|
||||
coverage: 0.27
|
||||
coverage: 0.4
|
||||
dilateCoverage: 0.75
|
||||
dilateType: 0
|
||||
typeModifier: 0.901
|
||||
@@ -61,10 +61,10 @@ MonoBehaviour:
|
||||
cirrusCloudsCoverage: 0.293
|
||||
cirrusCloudsColorPower: 1.13
|
||||
flatCloudsCoverage: 1.287
|
||||
flatCloudsDensity: 1
|
||||
flatCloudsLightIntensity: 1.014
|
||||
flatCloudsAmbientIntensity: 1.05
|
||||
flatCloudsShadowIntensity: 0.6
|
||||
flatCloudsDensity: 1.252
|
||||
flatCloudsLightIntensity: 0.807
|
||||
flatCloudsAmbientIntensity: 1.037
|
||||
flatCloudsShadowIntensity: 1.138
|
||||
flatCloudsShadowSteps: 8
|
||||
lightingOverride:
|
||||
directLightIntensityModifier: 1
|
||||
@@ -76,13 +76,13 @@ MonoBehaviour:
|
||||
skyColorExponent: 1.2
|
||||
skyColorTint: {r: 1, g: 1, b: 1, a: 1}
|
||||
fogOverride:
|
||||
fogDensity: 0.015
|
||||
fogDensity: 0.034
|
||||
fogHeightFalloff: 0.0121
|
||||
fogHeight: 0
|
||||
fogDensity2: 0.412
|
||||
fogHeightFalloff2: 0.0388
|
||||
fogHeight2: 0
|
||||
fogColorBlend: 0.5
|
||||
fogColorBlend: 1
|
||||
fogColorMod: {r: 1, g: 1, b: 1, a: 1}
|
||||
scattering: 0.28
|
||||
extinction: 0.02
|
||||
@@ -118,7 +118,7 @@ MonoBehaviour:
|
||||
temperatureWeatherMod: 0
|
||||
wetnessTarget: 0
|
||||
snowTarget: 0
|
||||
windDirectionX: 1
|
||||
windDirectionY: -1
|
||||
windDirectionX: -0.024
|
||||
windDirectionY: 0.154
|
||||
windSpeed: 0.5
|
||||
windTurbulence: 0.2
|
||||
|
||||
@@ -32,30 +32,30 @@ MonoBehaviour:
|
||||
dilateType: 1
|
||||
typeModifier: 0.558
|
||||
cloudTypeShaping: 0.196
|
||||
scatteringIntensity: 9.07
|
||||
multiScatterStrength: 0.421
|
||||
multiScatterFalloff: 0.394
|
||||
ambientFloor: 0
|
||||
scatteringIntensity: 10
|
||||
multiScatterStrength: 0.329
|
||||
multiScatterFalloff: 0.302
|
||||
ambientFloor: 0.196
|
||||
lightningIntensity: 0
|
||||
exposure: 2
|
||||
silverLiningSpread: 0.1
|
||||
silverLiningIntensity: 0.1
|
||||
edgeHighlightStrength: 0.5
|
||||
ligthAbsorbtion: 0.55
|
||||
density: 0.9
|
||||
densitySmoothness: 1.15
|
||||
baseErosionIntensity: 0.046
|
||||
silverLiningSpread: 0.128
|
||||
silverLiningIntensity: 0.128
|
||||
edgeHighlightStrength: 0.288
|
||||
ligthAbsorbtion: 1.167
|
||||
density: 1.3
|
||||
densitySmoothness: 1.3
|
||||
baseErosionIntensity: 0.018
|
||||
baseNoiseMultiplier: 1.25
|
||||
detailErosionIntensity: 0.188
|
||||
detailErosionIntensity: 0.2
|
||||
detailNoiseMultiplier: 1
|
||||
curlIntensity: 0.909
|
||||
bottomShape: -0.18
|
||||
midShape: -0.44
|
||||
topShape: -0.56
|
||||
curlIntensity: 0.55
|
||||
bottomShape: -0.14
|
||||
midShape: -0.4
|
||||
topShape: -0.16
|
||||
topLayer: 0
|
||||
rampShape: 0.45
|
||||
baseNoiseUVMultiplier: 0.41
|
||||
detailNoiseUVMultiplier: 1.25
|
||||
rampShape: 0.513
|
||||
baseNoiseUVMultiplier: 0.35
|
||||
detailNoiseUVMultiplier: 0.75
|
||||
flatCloudsOverride:
|
||||
cirrusCloudsAlpha: 0.5
|
||||
cirrusCloudsCoverage: 0.5
|
||||
|
||||
@@ -16,7 +16,7 @@ MonoBehaviour:
|
||||
showEffectControls: 0
|
||||
showCloudControls: 1
|
||||
showFlatCloudControls: 0
|
||||
showFogControls: 1
|
||||
showFogControls: 0
|
||||
showSkyControls: 0
|
||||
showLightingControls: 0
|
||||
showAuroraControls: 0
|
||||
@@ -35,36 +35,36 @@ MonoBehaviour:
|
||||
scatteringIntensity: 7.11
|
||||
multiScatterStrength: 0.367
|
||||
multiScatterFalloff: 0.209
|
||||
ambientFloor: 0.117
|
||||
ambientFloor: 0.101
|
||||
lightningIntensity: 0
|
||||
exposure: 0.63
|
||||
silverLiningSpread: 0.1
|
||||
exposure: 0.91
|
||||
silverLiningSpread: 0.092
|
||||
silverLiningIntensity: 2
|
||||
edgeHighlightStrength: 0
|
||||
ligthAbsorbtion: 0.463
|
||||
density: 1
|
||||
densitySmoothness: 1.76
|
||||
ligthAbsorbtion: 0.207
|
||||
density: 0.56
|
||||
densitySmoothness: 1.712
|
||||
baseErosionIntensity: 0.207
|
||||
baseNoiseMultiplier: 1.28
|
||||
detailErosionIntensity: 0.272
|
||||
detailNoiseMultiplier: 1
|
||||
curlIntensity: 0.66
|
||||
bottomShape: 0.15
|
||||
midShape: -1.78
|
||||
topShape: 0.24
|
||||
bottomShape: 0.41
|
||||
midShape: -1.72
|
||||
topShape: -0.22
|
||||
topLayer: 0
|
||||
rampShape: 0.13
|
||||
rampShape: 0.141
|
||||
baseNoiseUVMultiplier: 0.64
|
||||
detailNoiseUVMultiplier: 1.09
|
||||
flatCloudsOverride:
|
||||
cirrusCloudsAlpha: 0.5
|
||||
cirrusCloudsCoverage: 0.5
|
||||
cirrusCloudsColorPower: 1
|
||||
flatCloudsCoverage: 1.3
|
||||
flatCloudsDensity: 1.24
|
||||
flatCloudsLightIntensity: 0.73
|
||||
flatCloudsAmbientIntensity: 1.33
|
||||
flatCloudsShadowIntensity: 0.6
|
||||
flatCloudsCoverage: 1.328
|
||||
flatCloudsDensity: 1.104
|
||||
flatCloudsLightIntensity: 0.932
|
||||
flatCloudsAmbientIntensity: 1.319
|
||||
flatCloudsShadowIntensity: 0.947
|
||||
flatCloudsShadowSteps: 8
|
||||
lightingOverride:
|
||||
directLightIntensityModifier: 1
|
||||
|
||||
@@ -14,7 +14,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
showEditor: 0
|
||||
showEffectControls: 0
|
||||
showCloudControls: 0
|
||||
showCloudControls: 1
|
||||
showFlatCloudControls: 0
|
||||
showFogControls: 0
|
||||
showSkyControls: 0
|
||||
|
||||
@@ -14,8 +14,8 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
showEditor: 0
|
||||
showEffectControls: 0
|
||||
showCloudControls: 0
|
||||
showFlatCloudControls: 1
|
||||
showCloudControls: 1
|
||||
showFlatCloudControls: 0
|
||||
showFogControls: 0
|
||||
showSkyControls: 0
|
||||
showLightingControls: 0
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// No culling or depth
|
||||
Cull Off ZWrite Off ZTest Always
|
||||
|
||||
Pass
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
|
||||
@@ -47,7 +47,7 @@ Shader "Hidden/EnviroVolumetricCloudsBlend"
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
@@ -188,6 +188,7 @@ Shader "Hidden/EnviroVolumetricCloudsBlendURP"
|
||||
|
||||
float4 finalColor = GetCloudColor(cloudsColor,worldPos);
|
||||
|
||||
|
||||
#if defined(UNITY_COLORSPACE_GAMMA)
|
||||
finalColor.rgb = LinearToGammaSpace(finalColor.rgb);
|
||||
#endif
|
||||
|
||||
@@ -53,10 +53,10 @@
|
||||
float4 _LocationOffset;
|
||||
float3 _WindDirectionLayer1;
|
||||
|
||||
float4 frag(VertexInput input) : SV_Target
|
||||
float4 frag(VertexOutput input) : SV_Target
|
||||
{
|
||||
float2 uv = input.uv;
|
||||
|
||||
|
||||
float2 windOffsetLayer1 = _WindDirectionLayer1.xy;
|
||||
|
||||
//float2 fillerUV = uv.xy + windOffsetLayer1 + _LocationOffset.xy;
|
||||
|
||||
@@ -16,7 +16,7 @@ Shader "Hidden/VolumetricsURP"
|
||||
#pragma fragment frag
|
||||
|
||||
#pragma multi_compile __ ENVIROURP
|
||||
#pragma shader_feature_local __ ENVIROURP17
|
||||
#pragma multi_compile_local __ ENVIROURP17
|
||||
|
||||
#if defined (ENVIROURP)
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
|
||||
@@ -29,6 +29,7 @@ uniform float4 _EnviroFogColor; //Fog color
|
||||
uniform float4 _EnviroDirLightColor;
|
||||
uniform float3 _EnviroCameraPos;
|
||||
uniform float3 _EnviroWorldOffset;
|
||||
|
||||
|
||||
#if defined(SHADER_API_D3D11) || defined(SHADER_API_METAL) || defined(SHADER_API_VULKAN)
|
||||
struct EnviroRemovalZones
|
||||
@@ -205,7 +206,14 @@ float3 ApplyVolumetricLights(float4 fogColor, float3 sceneColor, float2 uv)
|
||||
|
||||
float3 ApplyFogAndVolumetricLights(float3 sceneColor, float2 uv, float3 wPos, float linearDepth)
|
||||
{
|
||||
float4 fog = GetExponentialHeightFog(wPos,linearDepth);
|
||||
return ApplyVolumetricLights(fog,sceneColor,uv);
|
||||
if(_EnviroActive > 0)
|
||||
{
|
||||
float4 fog = GetExponentialHeightFog(wPos,linearDepth);
|
||||
return ApplyVolumetricLights(fog,sceneColor,uv);
|
||||
}
|
||||
else
|
||||
{
|
||||
return sceneColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ uniform float4 _EnviroDirLightColor;
|
||||
uniform float3 _EnviroCameraPos;
|
||||
uniform float3 _EnviroWorldOffset;
|
||||
|
||||
|
||||
#if defined(SHADER_API_D3D11) || defined(SHADER_API_METAL) || defined(SHADER_API_VULKAN)
|
||||
struct EnviroRemovalZones
|
||||
{
|
||||
@@ -199,7 +200,14 @@ float3 ApplyVolumetricLights(float4 fogColor, float3 sceneColor, float2 uv)
|
||||
|
||||
float3 ApplyFogAndVolumetricLights(float3 sceneColor, float2 uv, float3 wPos, float linearDepth)
|
||||
{
|
||||
float4 fog = GetExponentialHeightFog(wPos,linearDepth);
|
||||
return ApplyVolumetricLights(fog,sceneColor,uv);
|
||||
if(_EnviroActive > 0)
|
||||
{
|
||||
float4 fog = GetExponentialHeightFog(wPos,linearDepth);
|
||||
return ApplyVolumetricLights(fog,sceneColor,uv);
|
||||
}
|
||||
else
|
||||
{
|
||||
return sceneColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
///////////PERLIN NOISE////////////////
|
||||
//#if defined(UNITY_PS5)
|
||||
// #define WORLEY_SAFE 1
|
||||
//#else
|
||||
#define WORLEY_SAFE 0
|
||||
//#endif
|
||||
|
||||
|
||||
|
||||
///////////PERLIN NOISE////////////////
|
||||
//////// NOT USED ANYMORE ////////////
|
||||
|
||||
// Hash to get pseudo-random gradient direction
|
||||
@@ -85,12 +93,30 @@ float perlinFBM(float2 uv, float baseScale, int octaves, float gain, float lacun
|
||||
///////////WORLEY NOISE///////////////////
|
||||
//////////////////////////////////////////
|
||||
|
||||
// Hash to generate a repeatable 0..1 value for integer coords
|
||||
#if WORLEY_SAFE
|
||||
|
||||
// ================= PS5 SAFE FLOAT HASH =================
|
||||
float hash21(float2 p)
|
||||
{
|
||||
p = frac(p * 0.1031);
|
||||
p += dot(p, p.yx + 33.33);
|
||||
return frac((p.x + p.y) * p.x);
|
||||
}
|
||||
|
||||
float2 hash22(float2 p)
|
||||
{
|
||||
float n = hash21(p);
|
||||
return float2(n, hash21(p + 17.0));
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
// ================= ORIGINAL INTEGER HASH =================
|
||||
float hash21_stable(int2 p, int period)
|
||||
{
|
||||
uint2 pu = (uint2)(p + period * 4096); // shift into positive domain
|
||||
uint2 pu = (uint2)(p + period * 4096);
|
||||
pu = pu % (uint)period;
|
||||
|
||||
|
||||
uint n = pu.x * 73856093u ^ pu.y * 19349663u;
|
||||
return frac((float)n * 0.000000119f);
|
||||
}
|
||||
@@ -102,16 +128,45 @@ float2 hash22_stable(int2 p, int period)
|
||||
return float2(h1, h2);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if WORLEY_SAFE
|
||||
|
||||
float Worley2D(float2 uv, float tiles)
|
||||
{
|
||||
float2 p = uv * tiles;
|
||||
float2 i = floor(p);
|
||||
float2 f = frac(p);
|
||||
|
||||
float minDist = 1.0;
|
||||
|
||||
[unroll]
|
||||
for (int y = -1; y <= 1; y++)
|
||||
{
|
||||
[unroll]
|
||||
for (int x = -1; x <= 1; x++)
|
||||
{
|
||||
float2 cell = i + float2(x, y);
|
||||
float2 rand = hash22(cell);
|
||||
float2 diff = float2(x, y) + rand - f;
|
||||
|
||||
minDist = min(minDist, dot(diff, diff));
|
||||
}
|
||||
}
|
||||
|
||||
return sqrt(minDist);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
float Worley2D_Stable(float2 uv, int tileCount)
|
||||
{
|
||||
// Tile domain
|
||||
float2 p = uv * tileCount;
|
||||
int2 baseCell = int2(floor(p));
|
||||
float2 f = frac(p);
|
||||
|
||||
float minDist = 1.0;
|
||||
|
||||
// Search 3x3 neighborhood
|
||||
[unroll]
|
||||
for (int y = -1; y <= 1; y++)
|
||||
{
|
||||
@@ -129,23 +184,37 @@ float Worley2D_Stable(float2 uv, int tileCount)
|
||||
return saturate(minDist);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
float WorleyFBM2D(float2 uv, int baseTiles, float bias)
|
||||
{
|
||||
uv = frac(uv); // ensure [0,1] input
|
||||
uv = uv - floor(uv); // safer than frac()
|
||||
|
||||
float n = 0.0;
|
||||
float amp = 0.5;
|
||||
int tiles = baseTiles;
|
||||
|
||||
#if WORLEY_SAFE
|
||||
float tiles = (float)baseTiles;
|
||||
|
||||
[unroll]
|
||||
for (int octave = 0; octave < 3; octave++)
|
||||
{
|
||||
n += amp * Worley2D(uv, tiles);
|
||||
tiles *= 2.0;
|
||||
amp *= 0.5;
|
||||
}
|
||||
#else
|
||||
int tiles = baseTiles;
|
||||
|
||||
[unroll]
|
||||
for (int octave = 0; octave < 3; octave++)
|
||||
{
|
||||
n += amp * Worley2D_Stable(uv, tiles);
|
||||
tiles *= 2; // double tiles per octave
|
||||
amp *= 0.5; // halve amplitude
|
||||
tiles *= 2;
|
||||
amp *= 0.5;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Invert + bias for cloud-like coverage
|
||||
n = pow(1.0 - n, bias);
|
||||
return saturate(n);
|
||||
}
|
||||
@@ -1,31 +1,12 @@
|
||||
#include_with_pragmas "FogIncludeHLSL.hlsl"
|
||||
|
||||
struct EnviroRemovalZones
|
||||
|
||||
void ApplyFog_float(float3 sceneColor, float2 uv, float3 wPos, float linearDepth,out float3 finalColor)
|
||||
{
|
||||
float type;
|
||||
float3 pos;
|
||||
float radius;
|
||||
float3 size;
|
||||
float3 axis;
|
||||
float stretch;
|
||||
float density;
|
||||
float feather;
|
||||
float4x4 transform;
|
||||
float pad0;
|
||||
float pad1;
|
||||
};
|
||||
|
||||
|
||||
StructuredBuffer<EnviroRemovalZones> _EnviroRemovalZones : register(t1);
|
||||
float _EnviroRemovalZonesCount;
|
||||
|
||||
float3 InverseLerp(float lowThreshold, float hiThreshold, float3 value)
|
||||
{
|
||||
return (value - lowThreshold) / (hiThreshold - lowThreshold);
|
||||
finalColor = sceneColor;
|
||||
finalColor = ApplyFogAndVolumetricLights(sceneColor,uv,wPos,linearDepth);
|
||||
}
|
||||
float ClampedInverseLerp(float lowThreshold, float hiThreshold, float value)
|
||||
{
|
||||
return saturate(InverseLerp(lowThreshold, hiThreshold, value));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ParticleZones_float(float3 pos, float density, out float alpha)
|
||||
|
||||
@@ -210,9 +210,9 @@ float4 GetSkyColorSimple (float3 viewDir, float mieSize, float depth = 1.0)
|
||||
// float cosTheta = smoothstep(-0.25,1.15,saturate(dot(-_SunDir.xyz, viewDir)));
|
||||
half y = -viewDir.y / 0.02;
|
||||
|
||||
float3 frontBack1 = lerp(_FrontColor1.rgb,_BackColor1.rgb,cosTheta);
|
||||
float3 frontBack2 = lerp(_FrontColor2.rgb,_BackColor2.rgb,cosTheta);
|
||||
float3 frontBack5 = lerp(_FrontColor5.rgb,_BackColor5.rgb,cosTheta);
|
||||
float3 frontBack1 = lerp(max(_FrontColor1.rgb,0),max(_BackColor1.rgb,0),cosTheta);
|
||||
float3 frontBack2 = lerp(max(_FrontColor2.rgb,0),max(_BackColor2.rgb,0),cosTheta);
|
||||
float3 frontBack5 = lerp(max(_FrontColor5.rgb,0),max(_BackColor5.rgb,0),cosTheta);
|
||||
|
||||
float heightS1 = RemapEnviro(viewDir.y,-0.75,_frontBackDistribution0,0,1);
|
||||
float heightS2 = RemapEnviro(viewDir.y,_frontBackDistribution0,_frontBackDistribution1,0,1);
|
||||
@@ -239,12 +239,12 @@ float4 GetSkyColor (float3 viewDir, float mieSize,float depth = 1.0)
|
||||
float cosTheta = smoothstep(0.0,2.0,saturate(dot(-_SunDir.xyz, viewDir)));
|
||||
half y = -viewDir.y / 0.02;
|
||||
|
||||
float3 frontBack0 = lerp(_FrontColor0.rgb,_BackColor0.rgb,cosTheta);
|
||||
float3 frontBack1 = lerp(_FrontColor1.rgb,_BackColor1.rgb,cosTheta);
|
||||
float3 frontBack2 = lerp(_FrontColor2.rgb,_BackColor2.rgb,cosTheta);
|
||||
float3 frontBack3 = lerp(_FrontColor3.rgb,_BackColor3.rgb,cosTheta);
|
||||
float3 frontBack4 = lerp(_FrontColor4.rgb,_BackColor4.rgb,cosTheta);
|
||||
float3 frontBack5 = lerp(_FrontColor5.rgb,_BackColor5.rgb,cosTheta);
|
||||
float3 frontBack0 = lerp(max(_FrontColor0.rgb,0),max(_BackColor0.rgb,0),cosTheta);
|
||||
float3 frontBack1 = lerp(max(_FrontColor1.rgb,0),max(_BackColor1.rgb,0),cosTheta);
|
||||
float3 frontBack2 = lerp(max(_FrontColor2.rgb,0),max(_BackColor2.rgb,0),cosTheta);
|
||||
float3 frontBack3 = lerp(max(_FrontColor3.rgb,0),max(_BackColor3.rgb,0),cosTheta);
|
||||
float3 frontBack4 = lerp(max(_FrontColor4.rgb,0),max(_BackColor4.rgb,0),cosTheta);
|
||||
float3 frontBack5 = lerp(max(_FrontColor5.rgb,0),max(_BackColor5.rgb,0),cosTheta);
|
||||
|
||||
float heightS1 = RemapEnviro(viewDir.y,-0.75,_frontBackDistribution0,0,1);
|
||||
float heightS2 = RemapEnviro(viewDir.y,_frontBackDistribution0,_frontBackDistribution1,0,1);
|
||||
|
||||
@@ -194,9 +194,9 @@ float4 GetSkyColorSimple (float3 viewDir, float mieSize, float depth = 1.0)
|
||||
float cosTheta = smoothstep(-0.25,1.15,saturate(dot(-_SunDir.xyz, viewDir)));
|
||||
half y = -viewDir.y / 0.02;
|
||||
|
||||
float3 frontBack1 = lerp(_FrontColor1.rgb,_BackColor1.rgb,cosTheta);
|
||||
float3 frontBack2 = lerp(_FrontColor2.rgb,_BackColor2.rgb,cosTheta);
|
||||
float3 frontBack5 = lerp(_FrontColor5.rgb,_BackColor5.rgb,cosTheta);
|
||||
float3 frontBack1 = lerp(max(_FrontColor1.rgb,0),max(_BackColor1.rgb,0),cosTheta);
|
||||
float3 frontBack2 = lerp(max(_FrontColor2.rgb,0),max(_BackColor2.rgb,0),cosTheta);
|
||||
float3 frontBack5 = lerp(max(_FrontColor5.rgb,0),max(_BackColor5.rgb,0),cosTheta);
|
||||
|
||||
float heightS1 = RemapEnviro(viewDir.y,-0.75,_frontBackDistribution0,0,1);
|
||||
float heightS2 = RemapEnviro(viewDir.y,_frontBackDistribution0,_frontBackDistribution1,0,1);
|
||||
@@ -223,12 +223,13 @@ float4 GetSkyColor (float3 viewDir, float mieSize, float depth = 1.0)
|
||||
float cosTheta = smoothstep(-0.25,1.15,saturate(dot(-_SunDir.xyz, viewDir)));
|
||||
half y = -viewDir.y / 0.02;
|
||||
|
||||
float3 frontBack0 = lerp(_FrontColor0.rgb,_BackColor0.rgb,cosTheta);
|
||||
float3 frontBack1 = lerp(_FrontColor1.rgb,_BackColor1.rgb,cosTheta);
|
||||
float3 frontBack2 = lerp(_FrontColor2.rgb,_BackColor2.rgb,cosTheta);
|
||||
float3 frontBack3 = lerp(_FrontColor3.rgb,_BackColor3.rgb,cosTheta);
|
||||
float3 frontBack4 = lerp(_FrontColor4.rgb,_BackColor4.rgb,cosTheta);
|
||||
float3 frontBack5 = lerp(_FrontColor5.rgb,_BackColor5.rgb,cosTheta);
|
||||
float3 frontBack0 = lerp(max(_FrontColor0.rgb,0),max(_BackColor0.rgb,0),cosTheta);
|
||||
float3 frontBack1 = lerp(max(_FrontColor1.rgb,0),max(_BackColor1.rgb,0),cosTheta);
|
||||
float3 frontBack2 = lerp(max(_FrontColor2.rgb,0),max(_BackColor2.rgb,0),cosTheta);
|
||||
float3 frontBack3 = lerp(max(_FrontColor3.rgb,0),max(_BackColor3.rgb,0),cosTheta);
|
||||
float3 frontBack4 = lerp(max(_FrontColor4.rgb,0),max(_BackColor4.rgb,0),cosTheta);
|
||||
float3 frontBack5 = lerp(max(_FrontColor5.rgb,0),max(_BackColor5.rgb,0),cosTheta);
|
||||
|
||||
|
||||
float heightS1 = RemapEnviro(viewDir.y,-0.75,_frontBackDistribution0,0,1);
|
||||
float heightS2 = RemapEnviro(viewDir.y,_frontBackDistribution0,_frontBackDistribution1,0,1);
|
||||
|
||||
@@ -11,6 +11,7 @@ float3 _DirectLightColor;
|
||||
float _AtmosphereColorSaturateDistance;
|
||||
float4 _CloudsParameter;
|
||||
float _SolarTime;
|
||||
uniform float _EnviroActive;
|
||||
//float _AmbientDistanceScale;
|
||||
|
||||
float ComputeAmbient(float4 cloudsColor, float normalizedHeight)
|
||||
@@ -68,6 +69,10 @@ float4 GetCloudColor(float4 cloudsColor, float3 worldPos)
|
||||
float atmosphericBlendFactor = saturate(exp(-cloudsColor.g / blendDist));
|
||||
finalColor.rgb = lerp(skyColor, finalColor.rgb, atmosphericBlendFactor);
|
||||
|
||||
float cloudLuminance = dot(finalColor.rgb,float3(0.299,0.587,0.114));
|
||||
float ghostMask = step(0.1,finalColor.a) * step(cloudLuminance,0.001);
|
||||
finalColor.a *= (1- ghostMask);
|
||||
|
||||
return finalColor;
|
||||
}
|
||||
|
||||
@@ -75,6 +80,8 @@ float4 GetCloudColor(float4 cloudsColor, float3 worldPos)
|
||||
|
||||
float3 ApplyClouds(float3 sceneColor, float2 uv, float3 worldPos)
|
||||
{
|
||||
if(_EnviroActive > 0)
|
||||
{
|
||||
float4 cloudsColor = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_EnviroClouds, uv);
|
||||
float4 finalColor = GetCloudColor(cloudsColor,worldPos);
|
||||
//return sceneColor.rgb * saturate(1 - finalColor.a) + finalColor.rgb * finalColor.a;
|
||||
@@ -82,4 +89,9 @@ float3 ApplyClouds(float3 sceneColor, float2 uv, float3 worldPos)
|
||||
float a = saturate(finalColor.a);
|
||||
float3 c = lerp(sceneColor.rgb, finalColor.rgb, a);
|
||||
return sceneColor.rgb * (1 - a) + c * a;
|
||||
}
|
||||
else
|
||||
{
|
||||
return sceneColor.rgb;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ float3 _DirectLightColor;
|
||||
float _AtmosphereColorSaturateDistance;
|
||||
float4 _CloudsParameter;
|
||||
float _SolarTime;
|
||||
uniform float _EnviroActive;
|
||||
|
||||
float ComputeAmbient(float4 cloudsColor, float normalizedHeight)
|
||||
{
|
||||
@@ -66,6 +67,11 @@ float4 GetCloudColor(float4 cloudsColor, float3 worldPos)
|
||||
// Final factor
|
||||
float atmosphericBlendFactor = saturate(exp(-cloudsColor.g / blendDist));
|
||||
finalColor.rgb = lerp(skyColor, finalColor.rgb, atmosphericBlendFactor);
|
||||
|
||||
|
||||
float cloudLuminance = dot(finalColor.rgb,float3(0.299,0.587,0.114));
|
||||
float ghostMask = step(0.1,finalColor.a) * step(cloudLuminance,0.001);
|
||||
finalColor.a *= (1- ghostMask);
|
||||
|
||||
return finalColor;
|
||||
}
|
||||
@@ -74,7 +80,14 @@ float4 GetCloudColor(float4 cloudsColor, float3 worldPos)
|
||||
|
||||
float3 ApplyClouds(float3 sceneColor, float2 uv, float3 worldPos)
|
||||
{
|
||||
float4 cloudsColor = SAMPLE_TEXTURE2D_X(_EnviroClouds,sampler_EnviroClouds, uv);
|
||||
float4 finalColor = GetCloudColor(cloudsColor,worldPos);
|
||||
return sceneColor.rgb * saturate(1 - finalColor.a) + finalColor.rgb * finalColor.a;
|
||||
if(_EnviroActive > 0)
|
||||
{
|
||||
float4 cloudsColor = SAMPLE_TEXTURE2D_X(_EnviroClouds,sampler_EnviroClouds, uv);
|
||||
float4 finalColor = GetCloudColor(cloudsColor,worldPos);
|
||||
return sceneColor.rgb * saturate(1 - finalColor.a) + finalColor.rgb * finalColor.a;
|
||||
}
|
||||
else
|
||||
{
|
||||
return sceneColor.rgb;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,17 +344,14 @@ float CalculateCloudDensity(float3 pos, float3 PlanetCenter, RaymarchParameters
|
||||
|
||||
// wind settings
|
||||
float cloud_top_offset = 1000.0;
|
||||
float3 wind_direction = float3(_CloudsWindDirection.x, 0.0, _CloudsWindDirection.y);
|
||||
float3 advectedPos = pos + float3(_CloudsWindDirection.z, 0.0f, _CloudsWindDirection.w);
|
||||
|
||||
// skew in wind direction
|
||||
pos += height * wind_direction * cloud_top_offset;
|
||||
float3 windDir = normalize(float3(_CloudsWindDirection.x, 0, _CloudsWindDirection.y));
|
||||
advectedPos += height * windDir * cloud_top_offset;
|
||||
|
||||
float mip1 = mip + lod;
|
||||
float4 coord = float4(pos * baseFreq * parameters.baseNoiseUV, mip1);
|
||||
float4 coord = float4(advectedPos * baseFreq * parameters.baseNoiseUV, mip1);
|
||||
|
||||
// Animate Wind
|
||||
coord.xyz += float3(_CloudsWindDirection.z, 0.0f, _CloudsWindDirection.w) * 14;
|
||||
|
||||
float4 baseNoise = _Noise.SampleLevel(sampler_Noise, coord.xyz,coord.w) * parameters.baseNoiseMultiplier;
|
||||
float low_freq_fBm = (baseNoise.g * 0.625) + (baseNoise.b * 0.25) + (baseNoise.a * 0.125);
|
||||
float base_cloud = RemapEnviro(baseNoise.r, -(1.0 - low_freq_fBm) * (parameters.baseErosionIntensity), 1.0, 0.0, 1.0) ;
|
||||
@@ -379,10 +376,11 @@ float CalculateCloudDensity(float3 pos, float3 PlanetCenter, RaymarchParameters
|
||||
if (details)
|
||||
{
|
||||
float mip2 = mip + lod;
|
||||
coord = float4(pos * baseFreq * parameters.detailNoiseUV, mip2);
|
||||
|
||||
coord = float4(advectedPos * baseFreq * parameters.detailNoiseUV, mip2);
|
||||
|
||||
//Curl
|
||||
float distToCam = distance(pos, _WorldSpaceCameraPos);
|
||||
float distToCam = distance(pos, _CameraPosition);
|
||||
float curlFade = saturate(1.0 - distToCam / 30000.0f);
|
||||
|
||||
float2 curlA = _CurlNoise.SampleLevel(sampler_CurlNoise, coord.xz * 3, 0).rb;
|
||||
@@ -395,8 +393,8 @@ float CalculateCloudDensity(float3 pos, float3 PlanetCenter, RaymarchParameters
|
||||
coord.xz += curl;
|
||||
coord.y += curl.y * 0.5;
|
||||
|
||||
coord.xyz += float3(_CloudsWindDirection.z * 14, _CloudsAnimation.z, _CloudsWindDirection.w * 14);
|
||||
|
||||
coord.xyz += float3(0.0 , _CloudsAnimation.z, 0.0);
|
||||
|
||||
float3 detailNoise = _DetailNoise.SampleLevel(sampler_DetailNoise, coord.xyz, coord.w).rgb * parameters.detailNoiseMultiplier;
|
||||
float high_freq_fBm = (detailNoise.r * 0.625) + (detailNoise.g * 0.25) + (detailNoise.b * 0.125);
|
||||
float high_freq_noise_modifier = lerp(high_freq_fBm, 1.0f - high_freq_fBm, saturate(height * 10));
|
||||
|
||||
@@ -39,9 +39,6 @@
|
||||
{
|
||||
"m_Id": "8ad5dc33552946e3b3a7a8284281740e"
|
||||
},
|
||||
{
|
||||
"m_Id": "2da5ddf4e7934ef78ee04af143962c5b"
|
||||
},
|
||||
{
|
||||
"m_Id": "e9e5fbb45e8c41b0b5236c7930bbb166"
|
||||
},
|
||||
@@ -76,16 +73,7 @@
|
||||
"m_Id": "fceff24f877a4b1a986278fc41fd436b"
|
||||
},
|
||||
{
|
||||
"m_Id": "941f9b799fc642ca805c31559f7c4a98"
|
||||
},
|
||||
{
|
||||
"m_Id": "557df5b8fa684e179732967a7f266374"
|
||||
},
|
||||
{
|
||||
"m_Id": "9c616951fada40ae9d73d4abd4a1045c"
|
||||
},
|
||||
{
|
||||
"m_Id": "6b32fe3e1c88432bb390005de090f516"
|
||||
"m_Id": "2fc7e76c4f4149a3aecb36c148e0484a"
|
||||
}
|
||||
],
|
||||
"m_GroupDatas": [],
|
||||
@@ -335,8 +323,8 @@
|
||||
},
|
||||
"m_FragmentContext": {
|
||||
"m_Position": {
|
||||
"x": 669.0,
|
||||
"y": 75.99998474121094
|
||||
"x": 668.9999389648438,
|
||||
"y": 75.99999237060547
|
||||
},
|
||||
"m_Blocks": [
|
||||
{
|
||||
@@ -344,21 +332,6 @@
|
||||
},
|
||||
{
|
||||
"m_Id": "6f6a1af7b2a64b0b82619c9af9613f16"
|
||||
},
|
||||
{
|
||||
"m_Id": "2da5ddf4e7934ef78ee04af143962c5b"
|
||||
},
|
||||
{
|
||||
"m_Id": "941f9b799fc642ca805c31559f7c4a98"
|
||||
},
|
||||
{
|
||||
"m_Id": "557df5b8fa684e179732967a7f266374"
|
||||
},
|
||||
{
|
||||
"m_Id": "9c616951fada40ae9d73d4abd4a1045c"
|
||||
},
|
||||
{
|
||||
"m_Id": "6b32fe3e1c88432bb390005de090f516"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -476,21 +449,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "102b2efbea974ead99f78d280867c769",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "Smoothness",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Smoothness",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": 0.5,
|
||||
"m_DefaultValue": 0.5,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
|
||||
@@ -514,36 +472,6 @@
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "14694e6256ae4c86b976c300e909dd2d",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "Ambient Occlusion",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Occlusion",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": 1.0,
|
||||
"m_DefaultValue": 1.0,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "17e555ab34854429888853f20264f0eb",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "Metallic",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Metallic",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": 0.0,
|
||||
"m_DefaultValue": 0.0,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
|
||||
@@ -762,40 +690,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
"m_ObjectId": "2da5ddf4e7934ef78ee04af143962c5b",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "SurfaceDescription.Emission",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"width": 0.0,
|
||||
"height": 0.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "56a0922889b547c799f7aa88c98c1768"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_SerializedDescriptor": "SurfaceDescription.Emission"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot",
|
||||
@@ -820,13 +714,56 @@
|
||||
"m_Space": 0
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1Node",
|
||||
"m_ObjectId": "2fc7e76c4f4149a3aecb36c148e0484a",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "Float",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 469.0,
|
||||
"y": 139.0,
|
||||
"width": 126.0,
|
||||
"height": 77.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "e77713d8acb6420c8802db9de1743d1a"
|
||||
},
|
||||
{
|
||||
"m_Id": "44ac5c7058d443ecb871384bb5ddcc84"
|
||||
}
|
||||
],
|
||||
"synonyms": [
|
||||
"Vector 1",
|
||||
"1",
|
||||
"v1",
|
||||
"vec1",
|
||||
"scalar"
|
||||
],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_Value": 0.0
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 2,
|
||||
"m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInTarget",
|
||||
"m_ObjectId": "30acfc14edef4ec4a059ce16e65bea4c",
|
||||
"m_Datas": [],
|
||||
"m_ActiveSubTarget": {
|
||||
"m_Id": "ff662f5cf4144c699022ad7171bb534f"
|
||||
"m_Id": "f4da117062a64bbfa4ce3f704b35d5f0"
|
||||
},
|
||||
"m_AllowMaterialOverride": false,
|
||||
"m_SurfaceType": 1,
|
||||
@@ -903,8 +840,8 @@
|
||||
"m_CustomSlotLabel": "",
|
||||
"m_DismissedVersion": 0,
|
||||
"m_Precision": 0,
|
||||
"overrideHLSLDeclaration": false,
|
||||
"hlslDeclarationOverride": 0,
|
||||
"overrideHLSLDeclaration": true,
|
||||
"hlslDeclarationOverride": 1,
|
||||
"m_Hidden": false,
|
||||
"m_Value": 0.0,
|
||||
"m_FloatType": 0,
|
||||
@@ -1050,7 +987,7 @@
|
||||
"m_ObjectId": "3c3d238a9dcd4aaface18f3ba60c283a",
|
||||
"m_Datas": [],
|
||||
"m_ActiveSubTarget": {
|
||||
"m_Id": "527f4520dc014ac08695cb5de879aa46"
|
||||
"m_Id": "a78960b4d96f4b56a3b56642eb5e022c"
|
||||
},
|
||||
"m_AllowMaterialOverride": false,
|
||||
"m_SurfaceType": 1,
|
||||
@@ -1060,7 +997,7 @@
|
||||
"m_RenderFace": 2,
|
||||
"m_AlphaClip": false,
|
||||
"m_CastShadows": false,
|
||||
"m_ReceiveShadows": false,
|
||||
"m_ReceiveShadows": true,
|
||||
"m_DisableTint": false,
|
||||
"m_AdditionalMotionVectorMode": 0,
|
||||
"m_AlembicMotionVectors": false,
|
||||
@@ -1080,14 +1017,14 @@
|
||||
"m_DefaultRefNameVersion": 0,
|
||||
"m_RefNameGeneratedByDisplayName": "",
|
||||
"m_DefaultReferenceName": "_Main",
|
||||
"m_OverrideReferenceName": "",
|
||||
"m_OverrideReferenceName": "_MainTex",
|
||||
"m_GeneratePropertyBlock": true,
|
||||
"m_UseCustomSlotLabel": false,
|
||||
"m_CustomSlotLabel": "",
|
||||
"m_DismissedVersion": 0,
|
||||
"m_Precision": 0,
|
||||
"overrideHLSLDeclaration": false,
|
||||
"hlslDeclarationOverride": 0,
|
||||
"overrideHLSLDeclaration": true,
|
||||
"hlslDeclarationOverride": 2,
|
||||
"m_Hidden": false,
|
||||
"m_Value": {
|
||||
"m_SerializedTexture": "",
|
||||
@@ -1099,6 +1036,21 @@
|
||||
"m_DefaultType": 0
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "44ac5c7058d443ecb871384bb5ddcc84",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "Out",
|
||||
"m_SlotType": 1,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Out",
|
||||
"m_StageCapability": 3,
|
||||
"m_Value": 0.0,
|
||||
"m_DefaultValue": 0.0,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
|
||||
@@ -1190,16 +1142,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 2,
|
||||
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalLitSubTarget",
|
||||
"m_ObjectId": "527f4520dc014ac08695cb5de879aa46",
|
||||
"m_WorkflowMode": 1,
|
||||
"m_NormalDropOffSpace": 0,
|
||||
"m_ClearCoat": false,
|
||||
"m_BlendModePreserveSpecular": true
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot",
|
||||
@@ -1218,94 +1160,6 @@
|
||||
"m_DefaultType": 0
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
"m_ObjectId": "557df5b8fa684e179732967a7f266374",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "SurfaceDescription.NormalTS",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"width": 0.0,
|
||||
"height": 0.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "5782c93accf64682a3cbf0021a654d93"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_SerializedDescriptor": "SurfaceDescription.NormalTS"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot",
|
||||
"m_ObjectId": "56a0922889b547c799f7aa88c98c1768",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "Emission",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Emission",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"m_DefaultValue": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"m_Labels": [],
|
||||
"m_ColorMode": 1,
|
||||
"m_DefaultColor": {
|
||||
"r": 0.0,
|
||||
"g": 0.0,
|
||||
"b": 0.0,
|
||||
"a": 1.0
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot",
|
||||
"m_ObjectId": "5782c93accf64682a3cbf0021a654d93",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "Normal (Tangent Space)",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "NormalTS",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"m_DefaultValue": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"m_Labels": [],
|
||||
"m_Space": 3
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
@@ -1346,40 +1200,6 @@
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
"m_ObjectId": "6b32fe3e1c88432bb390005de090f516",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "SurfaceDescription.Metallic",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"width": 0.0,
|
||||
"height": 0.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "17e555ab34854429888853f20264f0eb"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_SerializedDescriptor": "SurfaceDescription.Metallic"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
@@ -1535,10 +1355,10 @@
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": -564.0,
|
||||
"y": -313.0,
|
||||
"width": 206.00003051757813,
|
||||
"height": 131.0
|
||||
"x": -563.9999389648438,
|
||||
"y": -416.0001525878906,
|
||||
"width": 205.99984741210938,
|
||||
"height": 130.00003051757813
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
@@ -1556,7 +1376,7 @@
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_Space": 2,
|
||||
"m_Space": 4,
|
||||
"m_PositionSource": 0
|
||||
}
|
||||
|
||||
@@ -1605,40 +1425,6 @@
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
"m_ObjectId": "941f9b799fc642ca805c31559f7c4a98",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "SurfaceDescription.Smoothness",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"width": 0.0,
|
||||
"height": 0.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "102b2efbea974ead99f78d280867c769"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_SerializedDescriptor": "SurfaceDescription.Smoothness"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.CombineNode",
|
||||
@@ -1707,40 +1493,6 @@
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
"m_ObjectId": "9c616951fada40ae9d73d4abd4a1045c",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "SurfaceDescription.Occlusion",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"width": 0.0,
|
||||
"height": 0.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "14694e6256ae4c86b976c300e909dd2d"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_SerializedDescriptor": "SurfaceDescription.Occlusion"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
|
||||
@@ -1789,6 +1541,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 2,
|
||||
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUnlitSubTarget",
|
||||
"m_ObjectId": "a78960b4d96f4b56a3b56642eb5e022c"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot",
|
||||
@@ -1824,9 +1582,9 @@
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": -358.00006103515627,
|
||||
"y": 42.00003433227539,
|
||||
"width": 119.99996948242188,
|
||||
"height": 148.99993896484376
|
||||
"y": 42.000003814697269,
|
||||
"width": 120.00003051757813,
|
||||
"height": 149.00001525878907
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
@@ -2035,10 +1793,10 @@
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": -294.9999694824219,
|
||||
"y": -313.0,
|
||||
"width": 233.0,
|
||||
"height": 117.99998474121094
|
||||
"x": -194.0,
|
||||
"y": -350.9999694824219,
|
||||
"width": 232.0,
|
||||
"height": 118.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
@@ -2191,6 +1949,21 @@
|
||||
"m_SerializedDescriptor": "VertexDescription.Position"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "e77713d8acb6420c8802db9de1743d1a",
|
||||
"m_Id": 1,
|
||||
"m_DisplayName": "X",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "X",
|
||||
"m_StageCapability": 3,
|
||||
"m_Value": 0.0,
|
||||
"m_DefaultValue": 0.0,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.CategoryData",
|
||||
@@ -2449,6 +2222,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInUnlitSubTarget",
|
||||
"m_ObjectId": "f4da117062a64bbfa4ce3f704b35d5f0"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
|
||||
@@ -2532,9 +2311,9 @@
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 10.999953269958496,
|
||||
"y": -300.0000305175781,
|
||||
"width": 207.99998474121095,
|
||||
"x": 96.99995422363281,
|
||||
"y": -302.0,
|
||||
"width": 208.0000457763672,
|
||||
"height": 302.0
|
||||
}
|
||||
},
|
||||
@@ -2699,11 +2478,3 @@
|
||||
"m_SerializedDescriptor": "VertexDescription.Tangent"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInLitSubTarget",
|
||||
"m_ObjectId": "ff662f5cf4144c699022ad7171bb534f",
|
||||
"m_WorkflowMode": 1,
|
||||
"m_NormalDropOffSpace": 0
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ Category {
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#if !SHADER_API_GLES3
|
||||
#include "../Includes/ParticlesInclude.cginc"
|
||||
#include "Assets/Enviro 3 - Sky and Weather/Resources/Shader/Includes/ParticlesInclude.cginc"
|
||||
#endif
|
||||
sampler2D _MainTex;
|
||||
fixed4 _TintColor;
|
||||
|
||||
@@ -117,8 +117,7 @@ Shader "Enviro/HDRP/Sky"
|
||||
|
||||
float3 viewDirWS = GetSkyViewDirWS(i.position.xy);
|
||||
float3 dir = -viewDirWS;
|
||||
float3 wpos = normalize(mul((float4x4)UNITY_MATRIX_M, dir)).xyz;
|
||||
|
||||
float3 wpos = normalize(mul(UNITY_MATRIX_M, float4(dir, 0.0f))).xyz;
|
||||
float4 skyColor = float4(0, 0, 0, 1);
|
||||
|
||||
|
||||
@@ -231,7 +230,7 @@ Shader "Enviro/HDRP/Sky"
|
||||
|
||||
float3 viewDirWS = GetSkyViewDirWS(i.position.xy);
|
||||
float3 dir = -viewDirWS;
|
||||
float3 wpos = normalize(mul((float4x4)UNITY_MATRIX_M, dir)).xyz;
|
||||
float3 wpos = normalize(mul(UNITY_MATRIX_M, float4(dir, 0.0f))).xyz;
|
||||
|
||||
float4 skyColor = float4(0, 0, 0, 1);
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -15,7 +15,7 @@ RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.31837568, g: 0.37657586, b: 0.49708903, a: 0.5801726}
|
||||
m_FogColor: {r: 0.29758313, g: 0.34521332, b: 0.4538811, a: 0.55316395}
|
||||
m_FogMode: 2
|
||||
m_FogDensity: 0.002
|
||||
m_LinearFogStart: 0
|
||||
@@ -26,7 +26,7 @@ RenderSettings:
|
||||
m_AmbientIntensity: 0.8050667
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 1788319125}
|
||||
m_SkyboxMaterial: {fileID: 1863662127}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
@@ -36,9 +36,9 @@ RenderSettings:
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 227222921}
|
||||
m_CustomReflection: {fileID: 244141624}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.21719475, g: 0.28433368, b: 0.42986345, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.20354809, g: 0.26231444, b: 0.3951304, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
@@ -123,7 +123,7 @@ NavMeshSettings:
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!89 &227222921
|
||||
--- !u!89 &244141624
|
||||
Cubemap:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -177,6 +177,42 @@ Cubemap:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
--- !u!84 &297994953
|
||||
RenderTexture:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Enviro Reflection Final Cubemap
|
||||
m_ImageContentsHash:
|
||||
serializedVersion: 2
|
||||
Hash: 00000000000000000000000000000000
|
||||
m_ForcedFallbackFormat: 4
|
||||
m_DownscaleFallback: 0
|
||||
m_IsAlphaChannelOptional: 0
|
||||
serializedVersion: 3
|
||||
m_Width: 128
|
||||
m_Height: 128
|
||||
m_AntiAliasing: 1
|
||||
m_MipCount: -1
|
||||
m_DepthFormat: 1
|
||||
m_ColorFormat: 48
|
||||
m_MipMap: 1
|
||||
m_GenerateMips: 0
|
||||
m_SRGB: 0
|
||||
m_UseDynamicScale: 0
|
||||
m_BindMS: 0
|
||||
m_EnableCompatibleFormat: 1
|
||||
m_TextureSettings:
|
||||
serializedVersion: 2
|
||||
m_FilterMode: 2
|
||||
m_Aniso: 1
|
||||
m_MipBias: 0
|
||||
m_WrapU: 1
|
||||
m_WrapV: 1
|
||||
m_WrapW: 1
|
||||
m_Dimension: 4
|
||||
m_VolumeDepth: 1
|
||||
--- !u!1 &371771703
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -319,8 +355,8 @@ Light:
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 0.91764706, g: 0.7879085, b: 0.6506863, a: 1}
|
||||
m_Intensity: 1.9310833
|
||||
m_Color: {r: 0.9280579, g: 0.75071263, b: 0.56183356, a: 1}
|
||||
m_Intensity: 1.7682052
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
@@ -519,7 +555,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1164889237}
|
||||
m_LocalRotation: {x: -0.12663592, y: 0.5698909, z: -0.089432396, w: -0.8069632}
|
||||
m_LocalRotation: {x: -0.081040815, y: 0.7041282, z: -0.081435345, w: -0.70071685}
|
||||
m_LocalPosition: {x: 465.80624, y: -93.7, z: 941.10803}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
@@ -540,48 +576,6 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
intensity: 1
|
||||
range: 1
|
||||
--- !u!21 &1788319125
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Enviro/Skybox
|
||||
m_Shader: {fileID: 4800000, guid: 34fee0a1b19b20b45aea7483b5f757da, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _GalaxyTex:
|
||||
m_Texture: {fileID: 8900000, guid: 5734983fc81450b4187c3cfa5985edef, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MoonGlowTex:
|
||||
m_Texture: {fileID: 2800000, guid: 6838e0810da4e49488b5d9a6ee76eb07, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MoonTex:
|
||||
m_Texture: {fileID: 2800000, guid: c6fd9f694390e0245b6dca5812065950, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _StarsTex:
|
||||
m_Texture: {fileID: 8900000, guid: b5a7175da0f133b4d951c19c9c2cebfc, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SunTex:
|
||||
m_Texture: {fileID: 2800000, guid: c95bed5306e94f24ba5802d841607ac7, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats: []
|
||||
m_Colors: []
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!1 &1823688464
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -593,7 +587,6 @@ GameObject:
|
||||
- component: {fileID: 1823688467}
|
||||
- component: {fileID: 1823688466}
|
||||
- component: {fileID: 1823688465}
|
||||
- component: {fileID: 1823688468}
|
||||
- component: {fileID: 1823688469}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
@@ -667,145 +660,6 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: -6, y: -427.55, z: -2.178}
|
||||
--- !u!114 &1823688468
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1823688464}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
clearColorMode: 0
|
||||
backgroundColorHDR: {r: 0.025, g: 0.07, b: 0.19, a: 0}
|
||||
clearDepth: 1
|
||||
volumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
volumeAnchorOverride: {fileID: 0}
|
||||
antialiasing: 0
|
||||
SMAAQuality: 2
|
||||
dithering: 0
|
||||
stopNaNs: 0
|
||||
taaSharpenStrength: 0.5
|
||||
TAAQuality: 1
|
||||
taaSharpenMode: 0
|
||||
taaRingingReduction: 0
|
||||
taaHistorySharpening: 0.35
|
||||
taaAntiFlicker: 0.5
|
||||
taaMotionVectorRejection: 0
|
||||
taaAntiHistoryRinging: 0
|
||||
taaBaseBlendFactor: 0.875
|
||||
taaJitterScale: 1
|
||||
physicalParameters:
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
flipYMode: 0
|
||||
xrRendering: 1
|
||||
fullscreenPassthrough: 0
|
||||
allowDynamicResolution: 0
|
||||
customRenderingSettings: 0
|
||||
invertFaceCulling: 0
|
||||
probeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
hasPersistentHistory: 0
|
||||
screenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
screenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
|
||||
allowDeepLearningSuperSampling: 1
|
||||
deepLearningSuperSamplingUseCustomQualitySettings: 0
|
||||
deepLearningSuperSamplingQuality: 0
|
||||
deepLearningSuperSamplingUseCustomAttributes: 0
|
||||
deepLearningSuperSamplingUseOptimalSettings: 1
|
||||
deepLearningSuperSamplingSharpening: 0
|
||||
allowFidelityFX2SuperResolution: 1
|
||||
fidelityFX2SuperResolutionUseCustomQualitySettings: 0
|
||||
fidelityFX2SuperResolutionQuality: 0
|
||||
fidelityFX2SuperResolutionUseCustomAttributes: 0
|
||||
fidelityFX2SuperResolutionUseOptimalSettings: 1
|
||||
fidelityFX2SuperResolutionEnableSharpening: 0
|
||||
fidelityFX2SuperResolutionSharpening: 0
|
||||
fsrOverrideSharpness: 0
|
||||
fsrSharpness: 0.92
|
||||
exposureTarget: {fileID: 0}
|
||||
materialMipBias: 0
|
||||
m_RenderingPathCustomFrameSettings:
|
||||
bitDatas:
|
||||
data1: 72198262773251917
|
||||
data2: 13763000468760363032
|
||||
lodBias: 1
|
||||
lodBiasMode: 0
|
||||
lodBiasQualityLevel: 0
|
||||
maximumLODLevel: 0
|
||||
maximumLODLevelMode: 0
|
||||
maximumLODLevelQualityLevel: 0
|
||||
sssQualityMode: 0
|
||||
sssQualityLevel: 0
|
||||
sssCustomSampleBudget: 20
|
||||
sssCustomDownsampleSteps: 0
|
||||
msaaMode: 1
|
||||
materialQuality: 0
|
||||
renderingPathCustomFrameSettingsOverrideMask:
|
||||
mask:
|
||||
data1: 0
|
||||
data2: 0
|
||||
defaultFrameSettings: 0
|
||||
m_Version: 9
|
||||
m_ObsoleteRenderingPath: 0
|
||||
m_ObsoleteFrameSettings:
|
||||
overrides: 0
|
||||
enableShadow: 0
|
||||
enableContactShadows: 0
|
||||
enableShadowMask: 0
|
||||
enableSSR: 0
|
||||
enableSSAO: 0
|
||||
enableSubsurfaceScattering: 0
|
||||
enableTransmission: 0
|
||||
enableAtmosphericScattering: 0
|
||||
enableVolumetrics: 0
|
||||
enableReprojectionForVolumetrics: 0
|
||||
enableLightLayers: 0
|
||||
enableExposureControl: 1
|
||||
diffuseGlobalDimmer: 0
|
||||
specularGlobalDimmer: 0
|
||||
shaderLitMode: 0
|
||||
enableDepthPrepassWithDeferredRendering: 0
|
||||
enableTransparentPrepass: 0
|
||||
enableMotionVectors: 0
|
||||
enableObjectMotionVectors: 0
|
||||
enableDecals: 0
|
||||
enableRoughRefraction: 0
|
||||
enableTransparentPostpass: 0
|
||||
enableDistortion: 0
|
||||
enablePostprocess: 0
|
||||
enableOpaqueObjects: 0
|
||||
enableTransparentObjects: 0
|
||||
enableRealtimePlanarReflection: 0
|
||||
enableMSAA: 0
|
||||
enableAsyncCompute: 0
|
||||
runLightListAsync: 0
|
||||
runSSRAsync: 0
|
||||
runSSAOAsync: 0
|
||||
runContactShadowsAsync: 0
|
||||
runVolumeVoxelizationAsync: 0
|
||||
lightLoopSettings:
|
||||
overrides: 0
|
||||
enableDeferredTileAndCluster: 0
|
||||
enableComputeLightEvaluation: 0
|
||||
enableComputeLightVariants: 0
|
||||
enableComputeMaterialVariants: 0
|
||||
enableFptlForForwardOpaque: 0
|
||||
enableBigTilePrepass: 0
|
||||
isFptlEnabled: 0
|
||||
--- !u!114 &1823688469
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -818,6 +672,48 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: bfd6cec7710802146be56bb22888bf57, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!21 &1863662127
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Enviro/Skybox
|
||||
m_Shader: {fileID: 4800000, guid: 34fee0a1b19b20b45aea7483b5f757da, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _GalaxyTex:
|
||||
m_Texture: {fileID: 8900000, guid: 5734983fc81450b4187c3cfa5985edef, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MoonGlowTex:
|
||||
m_Texture: {fileID: 2800000, guid: 6838e0810da4e49488b5d9a6ee76eb07, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MoonTex:
|
||||
m_Texture: {fileID: 2800000, guid: c6fd9f694390e0245b6dca5812065950, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _StarsTex:
|
||||
m_Texture: {fileID: 8900000, guid: b5a7175da0f133b4d951c19c9c2cebfc, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SunTex:
|
||||
m_Texture: {fileID: 2800000, guid: c95bed5306e94f24ba5802d841607ac7, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats: []
|
||||
m_Colors: []
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!1 &1882443561
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -891,7 +787,7 @@ ReflectionProbe:
|
||||
m_RenderDynamicObjects: 1
|
||||
m_UseOcclusionCulling: 1
|
||||
m_Importance: 1
|
||||
m_CustomBakedTexture: {fileID: 1886807364}
|
||||
m_CustomBakedTexture: {fileID: 297994953}
|
||||
--- !u!114 &1882443564
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1315,42 +1211,6 @@ Transform:
|
||||
m_Father: {fileID: 4611296302621195961}
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!84 &1886807364
|
||||
RenderTexture:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Enviro Reflection Final Cubemap
|
||||
m_ImageContentsHash:
|
||||
serializedVersion: 2
|
||||
Hash: 00000000000000000000000000000000
|
||||
m_ForcedFallbackFormat: 4
|
||||
m_DownscaleFallback: 0
|
||||
m_IsAlphaChannelOptional: 0
|
||||
serializedVersion: 3
|
||||
m_Width: 128
|
||||
m_Height: 128
|
||||
m_AntiAliasing: 1
|
||||
m_MipCount: -1
|
||||
m_DepthFormat: 1
|
||||
m_ColorFormat: 48
|
||||
m_MipMap: 1
|
||||
m_GenerateMips: 0
|
||||
m_SRGB: 0
|
||||
m_UseDynamicScale: 0
|
||||
m_BindMS: 0
|
||||
m_EnableCompatibleFormat: 1
|
||||
m_TextureSettings:
|
||||
serializedVersion: 2
|
||||
m_FilterMode: 2
|
||||
m_Aniso: 1
|
||||
m_MipBias: 0
|
||||
m_WrapU: 1
|
||||
m_WrapV: 1
|
||||
m_WrapW: 1
|
||||
m_Dimension: 4
|
||||
m_VolumeDepth: 1
|
||||
--- !u!1 &2013410473
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -1586,7 +1446,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2144395460}
|
||||
m_LocalRotation: {x: -0, y: 0.6259235, z: -0, w: 0.7798845}
|
||||
m_LocalRotation: {x: -0, y: 0.54725623, z: -0, w: -0.8369652}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
@@ -1655,7 +1515,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4611296302155190825}
|
||||
m_LocalRotation: {x: -0.69596165, y: 0.12504967, z: 0.12504967, w: -0.69596165}
|
||||
m_LocalRotation: {x: -0.43621713, y: -0.55652016, z: -0.55652016, w: -0.43621713}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
@@ -1674,22 +1534,22 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 43b4e18e1baccc642a82a5e642fd6997, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
configuration: {fileID: 11400000, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
|
||||
lastConfiguration: {fileID: 11400000, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
|
||||
Time: {fileID: 1290233478698596523, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
|
||||
Lighting: {fileID: 1121697361819163703, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
|
||||
Reflections: {fileID: 3003072118128753163, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
|
||||
Sky: {fileID: -1033463005042072443, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
|
||||
Fog: {fileID: 6137975383063632260, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
|
||||
VolumetricClouds: {fileID: 3171557369469055653, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
|
||||
FlatClouds: {fileID: -6856645797116724545, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
|
||||
Weather: {fileID: -2780709178333184838, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
|
||||
Aurora: {fileID: 4011421771873438716, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
|
||||
Audio: {fileID: 2333546472042683326, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
|
||||
Effects: {fileID: -6613759932185320841, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
|
||||
Lightning: {fileID: 8141577898218642580, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
|
||||
Quality: {fileID: 2305770137650243923, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
|
||||
Environment: {fileID: 1310742743334959994, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
|
||||
configuration: {fileID: 11400000, guid: 7a73ce8546b211f40bdf7de5a0f06be5, type: 2}
|
||||
lastConfiguration: {fileID: 11400000, guid: 7a73ce8546b211f40bdf7de5a0f06be5, type: 2}
|
||||
Time: {fileID: 3679749505529115402, guid: 7a73ce8546b211f40bdf7de5a0f06be5, type: 2}
|
||||
Lighting: {fileID: 495546225280835574, guid: 7a73ce8546b211f40bdf7de5a0f06be5, type: 2}
|
||||
Reflections: {fileID: -3831032795633986024, guid: 7a73ce8546b211f40bdf7de5a0f06be5, type: 2}
|
||||
Sky: {fileID: -1480058932494092946, guid: 7a73ce8546b211f40bdf7de5a0f06be5, type: 2}
|
||||
Fog: {fileID: -4569962550386686345, guid: 7a73ce8546b211f40bdf7de5a0f06be5, type: 2}
|
||||
VolumetricClouds: {fileID: 9035494006185753007, guid: 7a73ce8546b211f40bdf7de5a0f06be5, type: 2}
|
||||
FlatClouds: {fileID: 5604889007555484423, guid: 7a73ce8546b211f40bdf7de5a0f06be5, type: 2}
|
||||
Weather: {fileID: 8956970292728354092, guid: 7a73ce8546b211f40bdf7de5a0f06be5, type: 2}
|
||||
Aurora: {fileID: 4011421771873438716, guid: 7a73ce8546b211f40bdf7de5a0f06be5, type: 2}
|
||||
Audio: {fileID: 4425945063387538756, guid: 7a73ce8546b211f40bdf7de5a0f06be5, type: 2}
|
||||
Effects: {fileID: 1501335556145410821, guid: 7a73ce8546b211f40bdf7de5a0f06be5, type: 2}
|
||||
Lightning: {fileID: -1420550187111102359, guid: 7a73ce8546b211f40bdf7de5a0f06be5, type: 2}
|
||||
Quality: {fileID: 6421799545293165390, guid: 7a73ce8546b211f40bdf7de5a0f06be5, type: 2}
|
||||
Environment: {fileID: -545848037823017146, guid: 7a73ce8546b211f40bdf7de5a0f06be5, type: 2}
|
||||
Objects:
|
||||
sun: {fileID: 4611296303231858644}
|
||||
moon: {fileID: 4611296303027681292}
|
||||
@@ -1712,8 +1572,8 @@ MonoBehaviour:
|
||||
showThirdParty: 0
|
||||
dayNightSwitch: 0.45
|
||||
isNight: 0
|
||||
solarTime: 0.5801726
|
||||
lunarTime: 0.3726298
|
||||
solarTime: 0.55316395
|
||||
lunarTime: 0.39963844
|
||||
notFirstFrame: 1
|
||||
removalZones: []
|
||||
sunRotationX: 0
|
||||
@@ -1844,8 +1704,8 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4611296303027681292}
|
||||
m_LocalRotation: {x: -0.08943237, y: 0.8069632, z: 0.1266359, w: 0.56989086}
|
||||
m_LocalPosition: {x: -0.8971251, y: -0.30631, z: 0.31834066}
|
||||
m_LocalRotation: {x: -0.081435345, y: 0.70071685, z: 0.081040815, w: 0.7041282}
|
||||
m_LocalPosition: {x: -0.9735891, y: -0.22825824, z: -0.004724252}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4611296302621195961}
|
||||
@@ -1874,8 +1734,8 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4611296303231858644}
|
||||
m_LocalRotation: {x: -0.12663591, y: 0.56989086, z: -0.08943239, w: -0.8069632}
|
||||
m_LocalPosition: {x: 0.8971251, y: 0.3063099, z: -0.31834066}
|
||||
m_LocalRotation: {x: -0.081040815, y: 0.7041282, z: -0.081435345, w: -0.70071685}
|
||||
m_LocalPosition: {x: 0.9735891, y: 0.22825815, z: 0.004724252}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4611296302621195961}
|
||||
|
||||
@@ -359,6 +359,9 @@ MonoBehaviour:
|
||||
directionalLightsOnly:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
volumetricLightingDensityCutoff:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
--- !u!114 &7410085670797730347
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
@@ -372,6 +375,7 @@ MonoBehaviour:
|
||||
m_Name: VisualEnvironment
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_Version: 1
|
||||
skyType:
|
||||
m_OverrideState: 1
|
||||
m_Value: 20382390
|
||||
@@ -402,4 +406,3 @@ MonoBehaviour:
|
||||
fogType:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
m_Version: 1
|
||||
|
||||
@@ -91,6 +91,9 @@ MonoBehaviour:
|
||||
directionalLightsOnly:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
volumetricLightingDensityCutoff:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -150,6 +153,16 @@ MonoBehaviour:
|
||||
includeSunInBaking:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
m_SkyVersion: 2
|
||||
m_ObsoleteEarthPreset:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
planetaryRadius:
|
||||
m_OverrideState: 0
|
||||
m_Value: 6378100
|
||||
planetCenterPosition:
|
||||
m_OverrideState: 0
|
||||
m_Value: {x: 0, y: -6378100, z: 0}
|
||||
type:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
@@ -240,16 +253,6 @@ MonoBehaviour:
|
||||
horizonZenithShift:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
m_SkyVersion: 2
|
||||
m_ObsoleteEarthPreset:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
planetaryRadius:
|
||||
m_OverrideState: 0
|
||||
m_Value: 6378100
|
||||
planetCenterPosition:
|
||||
m_OverrideState: 0
|
||||
m_Value: {x: 0, y: -6378100, z: 0}
|
||||
--- !u!114 &1180714087162382705
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
@@ -263,6 +266,7 @@ MonoBehaviour:
|
||||
m_Name: VisualEnvironment
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_Version: 1
|
||||
skyType:
|
||||
m_OverrideState: 1
|
||||
m_Value: 990
|
||||
@@ -293,7 +297,6 @@ MonoBehaviour:
|
||||
fogType:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
m_Version: 1
|
||||
--- !u!114 &8598773281738389836
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
|
||||
@@ -13,6 +13,7 @@ MonoBehaviour:
|
||||
m_Name: VisualEnvironment
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_Version: 1
|
||||
skyType:
|
||||
m_OverrideState: 1
|
||||
m_Value: 20382390
|
||||
@@ -43,7 +44,6 @@ MonoBehaviour:
|
||||
fogType:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
m_Version: 1
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -251,3 +251,6 @@ MonoBehaviour:
|
||||
directionalLightsOnly:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
volumetricLightingDensityCutoff:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -133,7 +133,7 @@ namespace Enviro
|
||||
if(GUILayout.Button("Change Now", EditorStyles.miniButtonRight,GUILayout.Width(80), GUILayout.Height(18)))
|
||||
{
|
||||
myTarget.ChangeZoneWeatherInstant(curZoneWeather.weatherType);
|
||||
//EditorUtility.SetDirty(curWT);
|
||||
EditorUtility.SetDirty(myTarget);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,11 @@ namespace Enviro
|
||||
{
|
||||
path = "Assets/Enviro 3 - Sky and Weather";
|
||||
}
|
||||
|
||||
path = System.IO.Path.GetDirectoryName(path);
|
||||
if(!System.IO.Directory.Exists(path))
|
||||
System.IO.Directory.CreateDirectory(path);
|
||||
|
||||
string assetPathAndName = UnityEditor.AssetDatabase.GenerateUniqueAssetPath (path + "/New " + "Enviro Configuration" + ".asset");
|
||||
UnityEditor.AssetDatabase.CreateAsset (config, assetPathAndName);
|
||||
UnityEditor.AssetDatabase.SaveAssets ();
|
||||
|
||||
@@ -125,8 +125,10 @@ namespace Enviro
|
||||
else
|
||||
{
|
||||
//Find other Directional Lights in scene
|
||||
#if UNITY_6000_0_OR_NEWER
|
||||
#if UNITY_6000_0_OR_NEWER && !UNITY_6000_4_OR_NEWER
|
||||
Light[] results = GameObject.FindObjectsByType<Light>(FindObjectsSortMode.None);
|
||||
#elif UNITY_6000_4_OR_NEWER
|
||||
Light[] results = GameObject.FindObjectsByType<Light>();
|
||||
#else
|
||||
Light[] results = GameObject.FindObjectsOfType<Light>();
|
||||
#endif
|
||||
|
||||
@@ -239,6 +239,9 @@ namespace Enviro
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
//Disable shader integration code.
|
||||
Shader.SetGlobalFloat("_EnviroActive", 0f);
|
||||
|
||||
if(Fog != null)
|
||||
Fog.Disable();
|
||||
|
||||
@@ -324,6 +327,8 @@ namespace Enviro
|
||||
//Update non time case
|
||||
if(Time == null)
|
||||
UpdateNonTime();
|
||||
|
||||
Shader.SetGlobalFloat("_EnviroActive", 1f);
|
||||
}
|
||||
|
||||
void LateUpdate()
|
||||
@@ -467,7 +472,7 @@ namespace Enviro
|
||||
private void CreateZoneBuffers()
|
||||
{
|
||||
EnviroHelper.CreateBuffer(ref removeZoneParamsCB, removalZones.Count, Marshal.SizeOf(typeof(ZoneParams)));
|
||||
EnviroHelper.CreateBuffer(ref clearZoneCB, 1, 4);
|
||||
EnviroHelper.CreateBuffer(ref clearZoneCB, 1, 128);
|
||||
}
|
||||
|
||||
private void ReleaseZoneBuffers()
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace Enviro
|
||||
|
||||
public class EnviroManagerBase : MonoBehaviour
|
||||
{
|
||||
public string version => "3.3.1";
|
||||
private string defaultConfig => "Default Enviro Configuration 3_3_1";
|
||||
public string version => "3.3.2";
|
||||
private string defaultConfig => "Default Enviro Configuration 3_3_2";
|
||||
|
||||
//Modules
|
||||
public EnviroConfiguration configuration;
|
||||
@@ -1232,6 +1232,10 @@ namespace Enviro
|
||||
configuration.volumetricCloudModule.settingsVolume.detailNoiseUV = defaults.volumetricCloudModule.settingsVolume.detailNoiseUV;
|
||||
configuration.volumetricCloudModule.settingsVolume.windSpeedModifier = defaults.volumetricCloudModule.settingsVolume.windSpeedModifier;
|
||||
configuration.volumetricCloudModule.settingsVolume.windUpwards = defaults.volumetricCloudModule.settingsVolume.windUpwards;
|
||||
configuration.volumetricCloudModule.settingsGlobal.atmosphereColorSaturateDistance = defaults.volumetricCloudModule.settingsGlobal.atmosphereColorSaturateDistance;
|
||||
configuration.volumetricCloudModule.settingsGlobal.curlTex = defaults.volumetricCloudModule.settingsGlobal.curlTex;
|
||||
configuration.volumetricCloudModule.settingsVolume.baseNoiseUV = defaults.volumetricCloudModule.settingsVolume.baseNoiseUV;
|
||||
configuration.volumetricCloudModule.settingsVolume.detailNoiseUV = defaults.volumetricCloudModule.settingsVolume.detailNoiseUV;
|
||||
|
||||
configuration.lightingModule.Settings.sceneExposure = defaults.lightingModule.Settings.sceneExposure;
|
||||
configuration.Sky.Settings.skyExposureHDRP = defaults.Sky.Settings.skyExposureHDRP;
|
||||
@@ -1239,10 +1243,13 @@ namespace Enviro
|
||||
}
|
||||
else if (fromVersion == "3.3.0")
|
||||
{
|
||||
if (configuration.volumetricCloudModule != null)
|
||||
{
|
||||
configuration.volumetricCloudModule.settingsGlobal.atmosphereColorSaturateDistance = defaults.volumetricCloudModule.settingsGlobal.atmosphereColorSaturateDistance;
|
||||
configuration.volumetricCloudModule.settingsGlobal.curlTex = defaults.volumetricCloudModule.settingsGlobal.curlTex;
|
||||
configuration.volumetricCloudModule.settingsVolume.baseNoiseUV = defaults.volumetricCloudModule.settingsVolume.baseNoiseUV;
|
||||
configuration.volumetricCloudModule.settingsVolume.detailNoiseUV = defaults.volumetricCloudModule.settingsVolume.detailNoiseUV;
|
||||
}
|
||||
}
|
||||
|
||||
configuration.version = version;
|
||||
|
||||
@@ -3,7 +3,6 @@ using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.Rendering.HighDefinition;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.Experimental.Rendering;
|
||||
|
||||
namespace Enviro
|
||||
{
|
||||
@@ -90,8 +89,18 @@ namespace Enviro
|
||||
|
||||
// Get quality and flags
|
||||
EnviroQuality myQuality = EnviroHelper.GetQualityForCamera(camera.camera);
|
||||
bool renderVolumetricClouds = EnviroManager.instance.VolumetricClouds != null && myQuality.volumetricCloudsOverride.volumetricClouds;
|
||||
bool renderFog = EnviroManager.instance.Fog != null && myQuality.fogOverride.fog;
|
||||
bool renderVolumetricClouds = false;
|
||||
bool renderFog = false;
|
||||
if(myQuality == null)
|
||||
{
|
||||
renderVolumetricClouds = EnviroManager.instance.VolumetricClouds != null && EnviroManager.instance.VolumetricClouds.settingsQuality.volumetricClouds;
|
||||
renderFog = EnviroManager.instance.Fog != null && EnviroManager.instance.Fog.Settings.fog;
|
||||
}
|
||||
else
|
||||
{
|
||||
renderVolumetricClouds = EnviroManager.instance.VolumetricClouds != null && myQuality.volumetricCloudsOverride.volumetricClouds;
|
||||
renderFog = EnviroManager.instance.Fog != null && myQuality.fogOverride.fog;
|
||||
}
|
||||
|
||||
floatingPointOriginMod = EnviroManager.instance.Objects?.worldAnchor != null
|
||||
? EnviroManager.instance.Objects.worldAnchor.transform.position
|
||||
@@ -105,6 +114,9 @@ namespace Enviro
|
||||
|
||||
EnviroVolumetricCloudRenderer renderer = GetCloudsRenderer(camera.camera);
|
||||
|
||||
if(!renderVolumetricClouds)
|
||||
Shader.SetGlobalTexture("_EnviroClouds", Texture2D.blackTexture);
|
||||
|
||||
// ----- Depth-aware render logic -----
|
||||
if (renderVolumetricClouds && renderFog)
|
||||
{
|
||||
|
||||
@@ -9,3 +9,10 @@ MonoImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 236601
|
||||
packageName: Enviro 3 - Sky and Weather
|
||||
packageVersion: 3.3.1
|
||||
assetPath: Assets/Enviro 3 - Sky and Weather/Scripts/Runtime/Base/Renderer/EnviroHDRPCustomPass.cs
|
||||
uploadId: 820004
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace Enviro
|
||||
[ImageEffectOpaque]
|
||||
private void OnRenderImage(RenderTexture src, RenderTexture dest)
|
||||
{
|
||||
if(EnviroManager.instance == null)
|
||||
if(EnviroManager.instance == null || !EnviroManager.instance.gameObject.activeSelf)
|
||||
{
|
||||
Graphics.Blit(src,dest);
|
||||
return;
|
||||
@@ -164,6 +164,9 @@ namespace Enviro
|
||||
//Render volumetrics mask first
|
||||
if(EnviroManager.instance.Fog != null && renderFog)
|
||||
EnviroManager.instance.Fog.RenderVolumetrics(myCam, src);
|
||||
|
||||
if(!renderVolumetricClouds)
|
||||
Shader.SetGlobalTexture("_EnviroClouds", Texture2D.blackTexture);
|
||||
|
||||
if(EnviroManager.instance.Fog != null && EnviroManager.instance.VolumetricClouds != null && renderVolumetricClouds && renderFog)
|
||||
{
|
||||
|
||||
@@ -11,22 +11,27 @@ namespace Enviro
|
||||
public class EnviroURPRenderFeature : ScriptableRendererFeature
|
||||
{
|
||||
|
||||
#if UNITY_6000_0_OR_NEWER
|
||||
|
||||
#if UNITY_6000_0_OR_NEWER
|
||||
private EnviroURPRenderGraph graph;
|
||||
private EnviroURPRenderPass pass;
|
||||
|
||||
public override void Create()
|
||||
{
|
||||
// if(UnityEngine.Rendering.GraphicsSettings.GetRenderPipelineSettings< UnityEngine.Rendering.Universal.RenderGraphSettings>().enableRenderCompatibilityMode)
|
||||
#if !UNITY_6000_4_OR_NEWER
|
||||
pass = new EnviroURPRenderPass("Enviro Render Pass");
|
||||
|
||||
#endif
|
||||
graph = new EnviroURPRenderGraph();
|
||||
graph.renderPassEvent = RenderPassEvent.BeforeRenderingTransparents;
|
||||
graph.renderPassEvent = RenderPassEvent.BeforeRenderingTransparents -1;
|
||||
}
|
||||
|
||||
public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
|
||||
{
|
||||
#if UNITY_6000_4_OR_NEWER
|
||||
if(graph != null && EnviroHelper.CanRenderOnCamera(renderingData.cameraData.camera))
|
||||
{
|
||||
renderer.EnqueuePass(graph);
|
||||
}
|
||||
#else
|
||||
if(UnityEngine.Rendering.GraphicsSettings.GetRenderPipelineSettings< UnityEngine.Rendering.Universal.RenderGraphSettings>().enableRenderCompatibilityMode)
|
||||
{
|
||||
if(pass != null && EnviroHelper.CanRenderOnCamera(renderingData.cameraData.camera))
|
||||
@@ -42,6 +47,7 @@ namespace Enviro
|
||||
renderer.EnqueuePass(graph);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
@@ -207,7 +207,7 @@ namespace Enviro {
|
||||
public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData)
|
||||
{
|
||||
|
||||
if(EnviroManager.instance == null)
|
||||
if(EnviroManager.instance == null || !EnviroManager.instance.gameObject.activeSelf)
|
||||
return;
|
||||
|
||||
UniversalResourceData resourceData = frameData.Get<UniversalResourceData>();
|
||||
@@ -286,6 +286,9 @@ namespace Enviro {
|
||||
//Render volumetrics mask first
|
||||
if(EnviroManager.instance.Fog != null && renderFog)
|
||||
EnviroManager.instance.Fog.RenderVolumetricsURP(this,renderGraph,resourceData,cameraData,source);
|
||||
|
||||
if(!renderVolumetricClouds)
|
||||
Shader.SetGlobalTexture("_EnviroClouds", Texture2D.blackTexture);
|
||||
|
||||
if(EnviroManager.instance.Fog != null && EnviroManager.instance.VolumetricClouds != null && renderVolumetricClouds && renderFog)
|
||||
{
|
||||
@@ -295,53 +298,20 @@ namespace Enviro {
|
||||
{
|
||||
|
||||
EnviroVolumetricCloudRenderer renderer = GetCloudsRenderer(cameraData.camera);
|
||||
|
||||
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsURP(this,renderGraph, resourceData, cameraData,source,temp1, renderer, myQuality);
|
||||
|
||||
if(EnviroManager.instance.VolumetricClouds.settingsGlobal.cloudShadows && cameraData.camera.cameraType != CameraType.Reflection)
|
||||
{
|
||||
TextureHandle temp2 = UniversalRenderer.CreateRenderGraphTexture(renderGraph, desc, "Temp2", false);
|
||||
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsURP(this,renderGraph, resourceData, cameraData,temp1,temp2, renderer);
|
||||
EnviroManager.instance.Fog.RenderHeightFogURP(this, renderGraph,resourceData,cameraData,temp2,resourceData.activeColorTexture);
|
||||
}
|
||||
else
|
||||
{
|
||||
EnviroManager.instance.Fog.RenderHeightFogURP(this, renderGraph,resourceData,cameraData,temp1,resourceData.activeColorTexture);
|
||||
}
|
||||
EnviroManager.instance.Fog.RenderHeightFogURP(this, renderGraph,resourceData,cameraData,temp1,resourceData.activeColorTexture);
|
||||
}
|
||||
else
|
||||
{
|
||||
EnviroManager.instance.Fog.RenderHeightFogURP(this, renderGraph,resourceData,cameraData,source,temp1);
|
||||
EnviroVolumetricCloudRenderer renderer = GetCloudsRenderer(cameraData.camera);
|
||||
|
||||
if(EnviroManager.instance.VolumetricClouds.settingsGlobal.cloudShadows && cameraData.camera.cameraType != CameraType.Reflection)
|
||||
{
|
||||
TextureHandle temp2 = UniversalRenderer.CreateRenderGraphTexture(renderGraph, desc, "Temp2", false);
|
||||
|
||||
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsURP(this,renderGraph, resourceData, cameraData,temp1,temp2, renderer);
|
||||
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsURP(this,renderGraph, resourceData, cameraData,temp2,resourceData.activeColorTexture, renderer, myQuality);
|
||||
}
|
||||
else
|
||||
{
|
||||
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsURP(this,renderGraph, resourceData, cameraData,temp1,resourceData.activeColorTexture, renderer, myQuality);
|
||||
}
|
||||
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsURP(this,renderGraph, resourceData, cameraData,temp1,resourceData.activeColorTexture, renderer, myQuality);
|
||||
}
|
||||
}
|
||||
else if(EnviroManager.instance.VolumetricClouds != null && renderVolumetricClouds && !renderFog)
|
||||
{
|
||||
EnviroVolumetricCloudRenderer renderer = GetCloudsRenderer(cameraData.camera);
|
||||
|
||||
if(EnviroManager.instance.VolumetricClouds.settingsGlobal.cloudShadows && cameraData.camera.cameraType != CameraType.Reflection)
|
||||
{
|
||||
TextureHandle temp1 = UniversalRenderer.CreateRenderGraphTexture(renderGraph, desc, "Temp1", false);
|
||||
|
||||
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsURP(this,renderGraph, resourceData, cameraData,source,temp1, renderer);
|
||||
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsURP(this,renderGraph, resourceData, cameraData,temp1,resourceData.activeColorTexture, renderer, myQuality);
|
||||
}
|
||||
else
|
||||
{
|
||||
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsURP(this,renderGraph, resourceData, cameraData,source,resourceData.activeColorTexture, renderer, myQuality);
|
||||
}
|
||||
EnviroVolumetricCloudRenderer renderer = GetCloudsRenderer(cameraData.camera);
|
||||
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsURP(this,renderGraph, resourceData, cameraData,source,resourceData.activeColorTexture, renderer, myQuality);
|
||||
}
|
||||
else if (EnviroManager.instance.Fog != null && renderFog)
|
||||
{
|
||||
|
||||
@@ -8,6 +8,8 @@ namespace Enviro
|
||||
{
|
||||
public class EnviroURPRenderPass : ScriptableRenderPass
|
||||
{
|
||||
|
||||
#if !UNITY_6000_4_OR_NEWER
|
||||
public ScriptableRenderer scriptableRenderer { get; set; }
|
||||
|
||||
private Material blitThroughMat;
|
||||
@@ -169,7 +171,7 @@ namespace Enviro
|
||||
#endif
|
||||
public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData)
|
||||
{
|
||||
if(EnviroManager.instance == null)
|
||||
if(EnviroManager.instance == null || !EnviroManager.instance.gameObject.activeSelf)
|
||||
return;
|
||||
|
||||
CommandBuffer cmd = CommandBufferPool.Get(pName);
|
||||
@@ -223,6 +225,9 @@ namespace Enviro
|
||||
if(EnviroManager.instance.Fog != null && renderFog)
|
||||
EnviroManager.instance.Fog.RenderVolumetricsURP(renderingData.cameraData.camera,this,cmd,sourceTemp);
|
||||
|
||||
if(!renderVolumetricClouds)
|
||||
Shader.SetGlobalTexture("_EnviroClouds", Texture2D.blackTexture);
|
||||
|
||||
if(EnviroManager.instance.Fog != null && EnviroManager.instance.VolumetricClouds != null && renderVolumetricClouds && renderFog)
|
||||
{
|
||||
RenderTexture temp1 = RenderTexture.GetTemporary(renderingData.cameraData.cameraTargetDescriptor);
|
||||
@@ -301,6 +306,8 @@ namespace Enviro
|
||||
CommandBufferPool.Release(cmd);
|
||||
RenderTexture.ReleaseTemporary(sourceTemp);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -16,7 +16,7 @@ MonoBehaviour:
|
||||
showSaveLoad: 0
|
||||
active: 1
|
||||
Settings:
|
||||
season: 3
|
||||
season: 0
|
||||
changeSeason: 1
|
||||
springStart: 60
|
||||
springEnd: 92
|
||||
@@ -158,11 +158,11 @@ MonoBehaviour:
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
temperature: 3.2208283
|
||||
temperature: 8.778311
|
||||
temperatureWeatherMod: 0
|
||||
temperatureCustomMod: 0
|
||||
temperatureChangingSpeed: 0.1
|
||||
wetness: 0
|
||||
wetness: 0.007532068
|
||||
wetnessTarget: 0
|
||||
snow: 0
|
||||
snowTarget: 0
|
||||
@@ -171,8 +171,8 @@ MonoBehaviour:
|
||||
snowAccumulationSpeed: 1
|
||||
snowMeltSpeed: 1
|
||||
snowMeltingTresholdTemperature: 1
|
||||
windDirectionX: 1
|
||||
windDirectionY: -1
|
||||
windDirectionX: -0.024
|
||||
windDirectionY: 0.154
|
||||
windSpeed: 0.5
|
||||
windTurbulence: 0.2
|
||||
preset: {fileID: 0}
|
||||
|
||||
@@ -112,13 +112,13 @@ MonoBehaviour:
|
||||
m_Mode: 0
|
||||
m_NumColorKeys: 4
|
||||
m_NumAlphaKeys: 2
|
||||
flatCloudsLightIntensity: 1.014
|
||||
flatCloudsAmbientIntensity: 1.05
|
||||
flatCloudsShadowIntensity: 0.6
|
||||
flatCloudsLightIntensity: 0.807
|
||||
flatCloudsAmbientIntensity: 1.037
|
||||
flatCloudsShadowIntensity: 1.138
|
||||
flatCloudsShadowSteps: 8
|
||||
flatCloudsHGPhase: 0.8
|
||||
flatCloudsCoverage: 1.287
|
||||
flatCloudsDensity: 1
|
||||
flatCloudsDensity: 1.252
|
||||
flatCloudsAltitude: 1
|
||||
flatCloudsTonemapping: 0
|
||||
flatCloudsBaseTiling: 1
|
||||
|
||||
@@ -418,6 +418,7 @@ namespace Enviro
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if !UNITY_6000_4_OR_NEWER
|
||||
public void RenderHeightFogURP(Camera cam,EnviroURPRenderPass pass,UnityEngine.Rendering.CommandBuffer cmd, RenderTexture source, UnityEngine.Rendering.RenderTargetIdentifier destination)
|
||||
{
|
||||
if(fogMat == null)
|
||||
@@ -430,6 +431,7 @@ namespace Enviro
|
||||
pass.CustomBlit(cmd,cam.cameraToWorldMatrix,source,destination,fogMat);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENVIRO_HDRP
|
||||
public void RenderHeightFogHDRP(Camera cam,UnityEngine.Rendering.CommandBuffer cmd, UnityEngine.Rendering.RTHandle source, UnityEngine.Rendering.RTHandle destination)
|
||||
@@ -613,7 +615,7 @@ namespace Enviro
|
||||
}
|
||||
|
||||
#if ENVIRO_URP
|
||||
|
||||
#if !UNITY_6000_4_OR_NEWER
|
||||
public void RenderVolumetricsURP(Camera camera, EnviroURPRenderPass pass, UnityEngine.Rendering.CommandBuffer cmd, RenderTexture source)
|
||||
{
|
||||
if(Settings.volumetrics == false || camera.cameraType == CameraType.Reflection)
|
||||
@@ -742,7 +744,7 @@ namespace Enviro
|
||||
|
||||
Shader.SetGlobalTexture("_EnviroVolumetricFogTex", volumetricsRenderTexture);
|
||||
}
|
||||
|
||||
#endif
|
||||
#if UNITY_6000_0_OR_NEWER
|
||||
//URP New Render Graph
|
||||
public void RenderVolumetricsURP(EnviroURPRenderGraph renderer, UnityEngine.Rendering.RenderGraphModule.RenderGraph renderGraph, UnityEngine.Rendering.Universal.UniversalResourceData resourceData, UnityEngine.Rendering.Universal.UniversalCameraData cameraData, UnityEngine.Rendering.RenderGraphModule.TextureHandle src)
|
||||
|
||||
@@ -75,7 +75,7 @@ MonoBehaviour:
|
||||
fogQualityMode: 0
|
||||
floatingPointOriginMod: {x: 0, y: 0, z: 0}
|
||||
globalFogHeight: 0
|
||||
fogDensity: 0.015
|
||||
fogDensity: 0.034
|
||||
fogHeightFalloff: 0.0121
|
||||
fogHeight: 0
|
||||
fogDensity2: 0.412
|
||||
@@ -83,9 +83,9 @@ MonoBehaviour:
|
||||
fogHeight2: 0
|
||||
fogMaxOpacity: 1
|
||||
startDistance: 0.01
|
||||
fogColorBlend: 0.5
|
||||
fogColorBlend: 1
|
||||
fogColorMod: {r: 1, g: 1, b: 1, a: 1}
|
||||
blockScattering: 1
|
||||
blockScattering: 0
|
||||
ambientColorGradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 0.23549305, g: 0.2427107, b: 0.7924528, a: 1}
|
||||
|
||||
@@ -357,7 +357,7 @@ namespace Enviro
|
||||
{
|
||||
indirectLightingHDRP.active = true;
|
||||
indirectLightingHDRP.indirectDiffuseLightingMultiplier.overrideState = true;
|
||||
indirectLightingHDRP.indirectDiffuseLightingMultiplier.value = Settings.diffuseIndirectIntensity.Evaluate(EnviroManager.instance.solarTime);
|
||||
indirectLightingHDRP.indirectDiffuseLightingMultiplier.value = Settings.diffuseIndirectIntensity.Evaluate(EnviroManager.instance.solarTime) * Settings.ambientIntensityModifier;
|
||||
indirectLightingHDRP.reflectionLightingMultiplier.overrideState = true;
|
||||
indirectLightingHDRP.reflectionLightingMultiplier.value = Settings.reflectionIndirectIntensity.Evaluate(EnviroManager.instance.solarTime);
|
||||
}
|
||||
|
||||
@@ -68,6 +68,11 @@ namespace Enviro
|
||||
{
|
||||
myProbe = GetComponent<ReflectionProbe>();
|
||||
|
||||
if (EnviroManager.instance != null && EnviroManager.instance.Reflections != null && !EnviroManager.instance.Reflections.Settings.globalReflections && !standalone)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if ENVIRO_HDRP
|
||||
if (EnviroManager.instance != null)
|
||||
{
|
||||
@@ -112,7 +117,7 @@ namespace Enviro
|
||||
CreateTexturesAndMaterial();
|
||||
CreateRenderCamera();
|
||||
currentRes = myProbe.resolution;
|
||||
StartCoroutine(RefreshFirstTime());
|
||||
StartCoroutine(RefreshFirstTime());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace Enviro
|
||||
Setup();
|
||||
|
||||
// Update global reflections once on enable.
|
||||
if(EnviroManager.instance.Objects.globalReflectionProbe != null)
|
||||
if(EnviroManager.instance.Objects.globalReflectionProbe != null && Settings.globalReflections)
|
||||
EnviroManager.instance.StartCoroutine(WaitToRefreshReflection());
|
||||
}
|
||||
|
||||
@@ -346,7 +346,9 @@ namespace Enviro
|
||||
private IEnumerator RenderGlobalReflectionProbeTimed (EnviroReflectionProbe probe, bool timeslice)
|
||||
{
|
||||
#if ENVIRO_HDRP
|
||||
if(EnviroManager.instance.Lighting.Settings.setDirectLighting)
|
||||
EnviroManager.instance.Lighting.UpdateDirectLightingHDRP ();
|
||||
if(EnviroManager.instance.Lighting.Settings.setAmbientLighting)
|
||||
EnviroManager.instance.Lighting.UpdateAmbientLightingHDRP();
|
||||
yield return null;
|
||||
probe.RefreshReflection(timeslice);
|
||||
@@ -356,13 +358,17 @@ namespace Enviro
|
||||
if(EnviroManager.instance.Lighting != null)
|
||||
{
|
||||
//Force a lighting update before rendering the probe as it might has not updated yet.
|
||||
EnviroManager.instance.Lighting.UpdateDirectLighting ();
|
||||
EnviroManager.instance.Lighting.UpdateAmbientLighting(true);
|
||||
if(EnviroManager.instance.Lighting.Settings.setDirectLighting)
|
||||
EnviroManager.instance.Lighting.UpdateDirectLighting ();
|
||||
if(EnviroManager.instance.Lighting.Settings.setAmbientLighting)
|
||||
EnviroManager.instance.Lighting.UpdateAmbientLighting(true);
|
||||
yield return null;
|
||||
if(EnviroManager.instance.Reflections.Settings.globalReflections)
|
||||
probe.RefreshReflection(timeslice);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(EnviroManager.instance.Reflections.Settings.globalReflections)
|
||||
probe.RefreshReflection(timeslice);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -376,7 +376,7 @@ namespace Enviro
|
||||
{
|
||||
double dateInHours = 0.0f;
|
||||
if(Settings.calenderType == EnviroTime.CalenderType.Custom)
|
||||
dateInHours = Settings.timeOfDay + (days * 24f) + ((years * (Settings.monthsInYear * Settings.daysInMonth)) * 24f);
|
||||
dateInHours = Settings.timeOfDay + (days * 24f) + ((months * Settings.daysInMonth) * 24f) + ((years * (Settings.monthsInYear * Settings.daysInMonth)) * 24f);
|
||||
else
|
||||
dateInHours = Settings.timeOfDay + (days * 24f) + ((years * 365) * 24f);
|
||||
return dateInHours;
|
||||
|
||||
@@ -19,11 +19,11 @@ MonoBehaviour:
|
||||
simulate: 0
|
||||
secSerial: 0
|
||||
minSerial: 0
|
||||
hourSerial: 7
|
||||
daySerial: 15
|
||||
monthSerial: 11
|
||||
yearSerial: 2025
|
||||
timeOfDay: 7
|
||||
hourSerial: 8
|
||||
daySerial: 21
|
||||
monthSerial: 3
|
||||
yearSerial: 2026
|
||||
timeOfDay: 8
|
||||
latitude: 0
|
||||
longitude: 0
|
||||
utcOffset: 0
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace Enviro
|
||||
public class EnviroCloudGlobalSettings
|
||||
{
|
||||
public Vector3 floatingPointOriginMod;
|
||||
public Vector3 cloudScrollOffset;
|
||||
public Gradient sunLightColorGradient;
|
||||
public Gradient moonLightColorGradient;
|
||||
public Gradient ambientColorGradient;
|
||||
@@ -266,6 +267,22 @@ namespace Enviro
|
||||
blackArray.SetPixels(colors,1);
|
||||
blackArray.Apply();
|
||||
}
|
||||
|
||||
|
||||
private bool IsURPCompabilityMode ()
|
||||
{
|
||||
#if ENVIRO_URP && UNITY_6000_0_OR_NEWER
|
||||
|
||||
#if UNITY_6000_4_OR_NEWER
|
||||
return false;
|
||||
#else
|
||||
return GraphicsSettings.GetRenderPipelineSettings< UnityEngine.Rendering.Universal.RenderGraphSettings>().enableRenderCompatibilityMode;
|
||||
#endif
|
||||
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
public override void Enable()
|
||||
{
|
||||
|
||||
@@ -298,6 +315,7 @@ namespace Enviro
|
||||
}
|
||||
|
||||
#if ENVIRO_URP
|
||||
#if !UNITY_6000_4_OR_NEWER
|
||||
public void RenderCloudsShadowsURP(EnviroURPRenderPass pass,Camera cam, UnityEngine.Rendering.CommandBuffer cmd, RenderTexture source, UnityEngine.Rendering.RenderTargetIdentifier destination, EnviroVolumetricCloudRenderer renderer)
|
||||
{
|
||||
if(renderer.shadowMat == null)
|
||||
@@ -312,22 +330,6 @@ namespace Enviro
|
||||
renderer.shadowMat.EnableKeyword("ENVIROURP");
|
||||
pass.CustomBlit(cmd,cam.cameraToWorldMatrix,source,destination,renderer.shadowMat);
|
||||
}
|
||||
|
||||
#if UNITY_6000_0_OR_NEWER
|
||||
public void RenderCloudsShadowsURP(EnviroURPRenderGraph pass,UnityEngine.Rendering.RenderGraphModule.RenderGraph renderGraph, UnityEngine.Rendering.Universal.UniversalResourceData resourceData, UnityEngine.Rendering.Universal.UniversalCameraData cameraData, UnityEngine.Rendering.RenderGraphModule.TextureHandle src, UnityEngine.Rendering.RenderGraphModule.TextureHandle target, EnviroVolumetricCloudRenderer renderer)
|
||||
{
|
||||
if(renderer.shadowMat == null)
|
||||
renderer.shadowMat = new Material(Shader.Find("Hidden/EnviroApplyShadowsURP"));
|
||||
|
||||
if (!renderer.undersampleBufferHandle.IsValid())
|
||||
return;
|
||||
|
||||
renderer.shadowMat.SetFloat("_Intensity",EnviroManager.instance.VolumetricClouds.settingsGlobal.cloudShadowsIntensity);
|
||||
|
||||
renderer.shadowMat.EnableKeyword("ENVIROURP");
|
||||
//pass.CustomBlit(cmd,cam.cameraToWorldMatrix,source,destination,renderer.shadowMat);
|
||||
pass.Blit("Apply Cloud Shadows", renderGraph,renderer.shadowMat,src,target,0, renderer.undersampleBufferHandle, "_CloudsTex");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -480,15 +482,7 @@ namespace Enviro
|
||||
}
|
||||
|
||||
renderer.fullBufferIndex = (renderer.fullBufferIndex + 1) % 2;
|
||||
|
||||
//renderer.firstFrame |= CreateRenderTexture(ref renderer.fullBufferHandles[0],renderGraph, width, height, GraphicsFormat.R16G16B16A16_SFloat, FilterMode.Bilinear,t);
|
||||
//renderer.firstFrame |= CreateRenderTexture(ref renderer.fullBufferHandles[1],renderGraph, width, height, GraphicsFormat.R16G16B16A16_SFloat, FilterMode.Bilinear,t);
|
||||
|
||||
//renderer.firstFrame |= CreateRenderTexture(ref renderer.fullBuffer[0], width, height, RenderTextureFormat.ARGBHalf, FilterMode.Bilinear,dsc);
|
||||
//renderer.firstFrame |= CreateRenderTexture(ref renderer.fullBuffer[1], width, height, RenderTextureFormat.ARGBHalf, FilterMode.Bilinear,dsc);
|
||||
|
||||
//renderer.fullBufferHandles[0] = renderGraph.ImportTexture(RTHandles.Alloc(renderer.fullBuffer[0]));
|
||||
//renderer.fullBufferHandles[1] = renderGraph.ImportTexture(RTHandles.Alloc(renderer.fullBuffer[1]));
|
||||
|
||||
|
||||
renderer.firstFrame |= UnityEngine.Rendering.Universal.RenderingUtils.ReAllocateHandleIfNeeded(ref renderer.fullBufferRTHandles[0], dsc, FilterMode.Bilinear, TextureWrapMode.Clamp, name: "Enviro Clouds History Buffer 0" );
|
||||
renderer.firstFrame |= UnityEngine.Rendering.Universal.RenderingUtils.ReAllocateHandleIfNeeded(ref renderer.fullBufferRTHandles[1], dsc, FilterMode.Bilinear, TextureWrapMode.Clamp, name: "Enviro Clouds History Buffer 1" );
|
||||
@@ -498,10 +492,6 @@ namespace Enviro
|
||||
|
||||
}
|
||||
|
||||
//renderer.firstFrame |= CreateRenderTexture(ref renderer.undersampleBufferHandle,renderGraph, width , height, GraphicsFormat.R16G16B16A16_SFloat, FilterMode.Bilinear,t);
|
||||
//renderer.firstFrame |= CreateRenderTexture(ref renderer.undersampleBuffer, width, height, RenderTextureFormat.ARGBHalf, FilterMode.Bilinear,dsc);
|
||||
//renderer.undersampleBufferHandle = renderGraph.ImportTexture(RTHandles.Alloc(renderer.undersampleBuffer));
|
||||
|
||||
renderer.firstFrame |= UnityEngine.Rendering.Universal.RenderingUtils.ReAllocateHandleIfNeeded(ref renderer.undersampleRTBufferHandle, dsc, FilterMode.Bilinear, TextureWrapMode.Clamp, name: "Enviro Clouds Undersample Buffer" );
|
||||
renderer.undersampleBufferHandle = renderGraph.ImportTexture(renderer.undersampleRTBufferHandle);
|
||||
|
||||
@@ -533,6 +523,8 @@ namespace Enviro
|
||||
|
||||
pass.Blit("Raymarch", renderGraph,renderer.raymarchMat,src,renderer.undersampleBufferHandle,0, renderer.downsampledDepthHandle, "_DownsampledDepth");
|
||||
|
||||
|
||||
|
||||
|
||||
//Pass 2: Reprojection
|
||||
if(cameraData.camera.cameraType != CameraType.Reflection)
|
||||
@@ -555,12 +547,48 @@ namespace Enviro
|
||||
|
||||
SetBlendShader(cameraData.camera,renderer);
|
||||
SetToURP(renderer.blendAndLightingMat);
|
||||
|
||||
|
||||
if(cameraData.camera.cameraType != CameraType.Reflection)
|
||||
pass.Blit("Blend", renderGraph,renderer.blendAndLightingMat,src,target,0, renderer.downsampledDepthHandle,"_DownsampledDepth", renderer.fullBufferHandles[renderer.fullBufferIndex ^ 1], "_CloudTex");
|
||||
else
|
||||
if(cameraData.camera.cameraType == CameraType.Reflection)
|
||||
{
|
||||
pass.Blit("Blend", renderGraph,renderer.blendAndLightingMat,src,target,0, renderer.downsampledDepthHandle,"_DownsampledDepth", renderer.undersampleBufferHandle, "_CloudTex");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
///Apply Clouds Shadows
|
||||
if(EnviroManager.instance.VolumetricClouds.settingsGlobal.cloudShadows)
|
||||
{
|
||||
RenderTextureDescriptor dscFull = new RenderTextureDescriptor(t.width,t.height,RenderTextureFormat.ARGBHalf,0);
|
||||
dscFull.vrUsage = t.vrUsage;
|
||||
dscFull.dimension = t.dimension;
|
||||
dscFull.volumeDepth = t.slices;
|
||||
|
||||
UnityEngine.Rendering.RenderGraphModule.TextureHandle temp2 = UnityEngine.Rendering.Universal.UniversalRenderer.CreateRenderGraphTexture(renderGraph, dscFull, "Temp2", false);
|
||||
|
||||
if(renderer.shadowMat == null)
|
||||
renderer.shadowMat = new Material(Shader.Find("Hidden/EnviroApplyShadowsURP"));
|
||||
|
||||
renderer.shadowMat.SetFloat("_Intensity",EnviroManager.instance.VolumetricClouds.settingsGlobal.cloudShadowsIntensity);
|
||||
renderer.shadowMat.EnableKeyword("ENVIROURP");
|
||||
|
||||
|
||||
if(cameraData.camera.transform.position.y - settingsGlobal.floatingPointOriginMod.y < EnviroManager.instance.VolumetricClouds.settingsVolume.bottomCloudsHeight)
|
||||
{
|
||||
pass.Blit("Blend", renderGraph,renderer.blendAndLightingMat,src,temp2,0, renderer.downsampledDepthHandle,"_DownsampledDepth", renderer.fullBufferHandles[renderer.fullBufferIndex ^ 1], "_CloudTex");
|
||||
pass.Blit("Apply Cloud Shadows", renderGraph,renderer.shadowMat,temp2,target,0, renderer.undersampleBufferHandle, "_CloudsTex");
|
||||
}
|
||||
else
|
||||
{
|
||||
pass.Blit("Apply Cloud Shadows", renderGraph,renderer.shadowMat,src,temp2,0, renderer.undersampleBufferHandle, "_CloudsTex");
|
||||
pass.Blit("Blend", renderGraph,renderer.blendAndLightingMat,temp2,target,0, renderer.downsampledDepthHandle,"_DownsampledDepth", renderer.fullBufferHandles[renderer.fullBufferIndex ^ 1], "_CloudTex");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pass.Blit("Blend", renderGraph,renderer.blendAndLightingMat,src,target,0, renderer.downsampledDepthHandle,"_DownsampledDepth", renderer.fullBufferHandles[renderer.fullBufferIndex ^ 1], "_CloudTex");
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if ENABLE_VR || ENABLE_XR_MODULE
|
||||
if(UnityEngine.XR.XRSettings.enabled && UnityEngine.XR.XRSettings.stereoRenderingMode == UnityEngine.XR.XRSettings.StereoRenderingMode.SinglePassInstanced && cameraData.camera.stereoEnabled)
|
||||
@@ -577,12 +605,10 @@ namespace Enviro
|
||||
#endif
|
||||
|
||||
renderer.firstFrame = false;
|
||||
|
||||
//UnityEngine.Profiling.Profiler.EndSample();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if !UNITY_6000_4_OR_NEWER
|
||||
public void RenderVolumetricCloudsURP(UnityEngine.Rendering.Universal.RenderingData renderingData, EnviroURPRenderPass pass, UnityEngine.Rendering.CommandBuffer cmd, RenderTexture source, UnityEngine.Rendering.RenderTargetIdentifier destination, EnviroVolumetricCloudRenderer renderer, EnviroQuality quality)
|
||||
{
|
||||
UnityEngine.Profiling.Profiler.BeginSample("Enviro Clouds Rendering");
|
||||
@@ -681,6 +707,7 @@ namespace Enviro
|
||||
UnityEngine.Profiling.Profiler.EndSample();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENVIRO_HDRP
|
||||
public void RenderVolumetricCloudsHDRP(Camera cam, UnityEngine.Rendering.CommandBuffer cmd, UnityEngine.Rendering.RTHandle source, UnityEngine.Rendering.RTHandle destination, EnviroVolumetricCloudRenderer renderer, EnviroQuality quality)
|
||||
@@ -800,7 +827,7 @@ namespace Enviro
|
||||
#if ENVIRO_HDRP
|
||||
renderer.raymarchMat = new Material(Shader.Find("Hidden/EnviroCloudsRaymarchHDRP"));
|
||||
#elif ENVIRO_URP && UNITY_6000_0_OR_NEWER
|
||||
if(GraphicsSettings.GetRenderPipelineSettings< UnityEngine.Rendering.Universal.RenderGraphSettings>().enableRenderCompatibilityMode)
|
||||
if (IsURPCompabilityMode ())
|
||||
renderer.raymarchMat = new Material(Shader.Find("Hidden/EnviroCloudsRaymarch"));
|
||||
else
|
||||
renderer.raymarchMat = new Material(Shader.Find("Hidden/EnviroCloudsRaymarchURP"));
|
||||
@@ -888,7 +915,7 @@ namespace Enviro
|
||||
else
|
||||
settingsGlobal.floatingPointOriginMod = Vector3.zero;
|
||||
|
||||
|
||||
settingsGlobal.floatingPointOriginMod += settingsGlobal.cloudScrollOffset;
|
||||
|
||||
renderer.raymarchMat.SetVector("_CameraPosition", cam.transform.position - settingsGlobal.floatingPointOriginMod);
|
||||
renderer.raymarchMat.SetVector("_WorldOffset", settingsGlobal.floatingPointOriginMod);
|
||||
@@ -933,7 +960,7 @@ namespace Enviro
|
||||
renderer.raymarchMat.SetTexture("_DownsampledDepth", renderer.downsampledDepthHandle);
|
||||
renderer.raymarchMat.SetVector("_DepthHandleScale", new Vector4(1/renderer.downsampledDepthHandle.rtHandleProperties.rtHandleScale.x,1/renderer.downsampledDepthHandle.rtHandleProperties.rtHandleScale.y,renderer.downsampledDepth.width,renderer.downsampledDepth.height));
|
||||
#elif ENVIRO_URP && UNITY_6000_0_OR_NEWER
|
||||
if(GraphicsSettings.GetRenderPipelineSettings< UnityEngine.Rendering.Universal.RenderGraphSettings>().enableRenderCompatibilityMode)
|
||||
if (IsURPCompabilityMode ())
|
||||
renderer.raymarchMat.SetTexture("_DownsampledDepth", renderer.downsampledDepth);
|
||||
//Needs to be set directly in builder!
|
||||
#else
|
||||
@@ -979,7 +1006,7 @@ namespace Enviro
|
||||
renderer.reprojectMat.SetTexture("_UndersampleCloudTex", renderer.undersampleBufferHandle);
|
||||
renderer.reprojectMat.SetVector("_UndersampleCloudTexScale", new Vector4(1/renderer.undersampleBufferHandle.rtHandleProperties.rtHandleScale.x,1/renderer.undersampleBufferHandle.rtHandleProperties.rtHandleScale.y,renderer.undersampleBuffer.width,renderer.undersampleBuffer.height));
|
||||
#elif UNITY_6000_0_OR_NEWER && ENVIRO_URP
|
||||
if(GraphicsSettings.GetRenderPipelineSettings< UnityEngine.Rendering.Universal.RenderGraphSettings>().enableRenderCompatibilityMode)
|
||||
if (IsURPCompabilityMode ())
|
||||
{
|
||||
renderer.reprojectMat.SetTexture("_DownsampledDepth", renderer.downsampledDepth);
|
||||
renderer.reprojectMat.SetTexture("_UndersampleCloudTex", renderer.undersampleBuffer);
|
||||
@@ -1047,7 +1074,7 @@ namespace Enviro
|
||||
renderer.blendAndLightingMat.SetTexture("_DownsampledDepth", renderer.downsampledDepthHandle);
|
||||
renderer.blendAndLightingMat.SetVector("_DepthHandleScale", new Vector4(1/renderer.downsampledDepthHandle.rtHandleProperties.rtHandleScale.x,1/renderer.downsampledDepthHandle.rtHandleProperties.rtHandleScale.y,renderer.downsampledDepth.width,renderer.downsampledDepth.height));
|
||||
#elif ENVIRO_URP && UNITY_6000_0_OR_NEWER
|
||||
if (GraphicsSettings.GetRenderPipelineSettings<UnityEngine.Rendering.Universal.RenderGraphSettings>().enableRenderCompatibilityMode)
|
||||
if (IsURPCompabilityMode ())
|
||||
{
|
||||
renderer.blendAndLightingMat.SetTexture("_DownsampledDepth", renderer.downsampledDepth);
|
||||
}
|
||||
@@ -1095,7 +1122,7 @@ namespace Enviro
|
||||
// Shader.SetGlobalTexture("_EnviroVolumetricClouds", renderer.fullBufferHandles[renderer.fullBufferIndex ^ 1]);
|
||||
}
|
||||
#elif ENVIRO_URP && UNITY_6000_0_OR_NEWER
|
||||
if (GraphicsSettings.GetRenderPipelineSettings<UnityEngine.Rendering.Universal.RenderGraphSettings>().enableRenderCompatibilityMode)
|
||||
if (IsURPCompabilityMode ())
|
||||
{
|
||||
if (cam.cameraType == CameraType.Reflection)
|
||||
{
|
||||
@@ -1153,7 +1180,7 @@ namespace Enviro
|
||||
Shader.SetGlobalTexture("_EnviroClouds", renderer.fullBufferHandles[renderer.fullBufferIndex ^ 1]);
|
||||
}
|
||||
#elif ENVIRO_URP && UNITY_6000_0_OR_NEWER
|
||||
if (GraphicsSettings.GetRenderPipelineSettings<UnityEngine.Rendering.Universal.RenderGraphSettings>().enableRenderCompatibilityMode)
|
||||
if (IsURPCompabilityMode ())
|
||||
{
|
||||
if(renderer != null && renderer.fullBuffer != null && renderer.fullBuffer.Length >= 2 && renderer.fullBuffer[renderer.fullBufferIndex ^ 1] != null)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ MonoBehaviour:
|
||||
cloudsWindDirectionYModifier: 1
|
||||
windSpeedModifier: 0.05
|
||||
windUpwards: 0.025
|
||||
coverage: 0.27
|
||||
coverage: 0.4
|
||||
worleyFreq2: 48
|
||||
worleyFreq1: 12
|
||||
dilateCoverage: 0.75
|
||||
@@ -59,6 +59,7 @@ MonoBehaviour:
|
||||
rampShape: 0.85
|
||||
settingsGlobal:
|
||||
floatingPointOriginMod: {x: 0, y: 0, z: 0}
|
||||
cloudScrollOffset: {x: 0, y: 0, z: 0}
|
||||
sunLightColorGradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 0, g: 0, b: 0, a: 1}
|
||||
@@ -149,7 +150,7 @@ MonoBehaviour:
|
||||
sunLightColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
moonLightColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
ambientColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
depthBlending: 1
|
||||
depthBlending: 0
|
||||
depthTest: 1
|
||||
noise: {fileID: 11700000, guid: 51b453fb41985b54888feaccbd2df6b1, type: 2}
|
||||
detailNoise: {fileID: 11700000, guid: 148dc26686a73e04991a98fc584949f1, type: 2}
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace Enviro
|
||||
switch (EnviroManager.instance.Environment.Settings.season)
|
||||
{
|
||||
case Enviro.EnviroEnvironment.Seasons.Spring:
|
||||
if(rand <= weatherTypeList[i].probabilitySpring * weatherTypeList.Count)
|
||||
if(weatherTypeList[i].probabilitySpring > 0f && rand <= weatherTypeList[i].probabilitySpring * weatherTypeList.Count)
|
||||
{
|
||||
ChangeZoneWeather(weatherTypeList[i].weatherType);
|
||||
nextWeatherFound = true;
|
||||
@@ -141,7 +141,7 @@ namespace Enviro
|
||||
break;
|
||||
|
||||
case Enviro.EnviroEnvironment.Seasons.Summer:
|
||||
if(rand <= weatherTypeList[i].probabilitySummer * weatherTypeList.Count)
|
||||
if(weatherTypeList[i].probabilitySummer > 0f && rand <= weatherTypeList[i].probabilitySummer * weatherTypeList.Count)
|
||||
{
|
||||
ChangeZoneWeather(weatherTypeList[i].weatherType);
|
||||
nextWeatherFound = true;
|
||||
@@ -150,7 +150,7 @@ namespace Enviro
|
||||
break;
|
||||
|
||||
case Enviro.EnviroEnvironment.Seasons.Autumn:
|
||||
if(rand <= weatherTypeList[i].probabilityAutumn * weatherTypeList.Count)
|
||||
if(weatherTypeList[i].probabilityAutumn > 0f && rand <= weatherTypeList[i].probabilityAutumn * weatherTypeList.Count)
|
||||
{
|
||||
ChangeZoneWeather(weatherTypeList[i].weatherType);
|
||||
nextWeatherFound = true;
|
||||
@@ -159,14 +159,14 @@ namespace Enviro
|
||||
break;
|
||||
|
||||
case Enviro.EnviroEnvironment.Seasons.Winter:
|
||||
if(rand <= weatherTypeList[i].probabilityWinter * weatherTypeList.Count)
|
||||
if(weatherTypeList[i].probabilityWinter > 0f && rand <= weatherTypeList[i].probabilityWinter * weatherTypeList.Count)
|
||||
{
|
||||
ChangeZoneWeather(weatherTypeList[i].weatherType);
|
||||
nextWeatherFound = true;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -285,3 +285,25 @@ v3.3.1
|
||||
* Fixed single pass instanced xr volumetric clouds reprojection.
|
||||
* Fixed volume light dithering that was messed up with last patch and made effect look worse.
|
||||
* Fixed possible errors in HDRP 17+ on project start related to reflection probe update when cullingmask set to "Nothing".
|
||||
|
||||
|
||||
v3.3.2
|
||||
* Added easier way to fully disable enviro effect by just deactivating the Enviro Manager object. (You still would need to change skybox)
|
||||
* Added support for Unity 6.4+ URP where render compability mode got removed.
|
||||
* Fixed shader integration when Enviro is not active.
|
||||
* Fixed volumetric clouds rendering in URP 17+ rendergraph when cloud shadows enabled and viewed from above.
|
||||
* Fixed issue with GetDateInHours function for custom calender.
|
||||
* Fixed volumetric clouds rendering in PS4/5.
|
||||
* Fixed ambient intensity setting in weather types doing nothing in HDRP.
|
||||
* Fixed small issue where ambient and direct lighting will be changed in reflection probe updates even when option is deactivated.
|
||||
* Fixed issue related to global reflection probe tries to update on enable even when option is disabled.
|
||||
* Fixed possible NaN artifacts on some hardware.
|
||||
* Changed URP rendergraph injection point to BeforeTransparent -1 for better compability with third party assets.
|
||||
|
||||
v3.3.2a
|
||||
* Fixed errors in Enviro Custom Pass HDRP when "Quality Module" is not used.
|
||||
* Fixed missing configuration asignment in the prefab.
|
||||
|
||||
v3.3.2b
|
||||
* Fixed black screen issue in Unity 6.4 URP builds.
|
||||
* Fixed VFX Graph Effects.
|
||||
@@ -154,6 +154,7 @@ MonoBehaviour:
|
||||
sssCustomDownsampleSteps: 0
|
||||
msaaMode: 1
|
||||
materialQuality: 0
|
||||
m_Version: 14
|
||||
m_Settings:
|
||||
m_SettingsList:
|
||||
m_List:
|
||||
@@ -193,6 +194,9 @@ MonoBehaviour:
|
||||
- rid: 6565977368940511232
|
||||
- rid: 6565977368940511233
|
||||
- rid: 6565977368940511234
|
||||
- rid: 7743543830083272796
|
||||
- rid: 7743543830083272797
|
||||
- rid: 7743543830083272798
|
||||
m_RuntimeSettings:
|
||||
m_List: []
|
||||
renderingLayerNames:
|
||||
@@ -220,7 +224,6 @@ MonoBehaviour:
|
||||
obsoleteHasProbeVolumes:
|
||||
m_Keys: []
|
||||
m_Values:
|
||||
m_Version: 14
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
@@ -260,6 +263,34 @@ MonoBehaviour:
|
||||
data:
|
||||
m_Version: 1
|
||||
m_UseBicubicLightmapSampling: 0
|
||||
- rid: 7743543830083272796
|
||||
type: {class: RayTracingRenderPipelineResources, ns: UnityEngine.Rendering.UnifiedRayTracing, asm: Unity.UnifiedRayTracing.Runtime}
|
||||
data:
|
||||
m_Version: 1
|
||||
m_GeometryPoolKernels: {fileID: 7200000, guid: 98e3d58cae7210c4786f67f504c9e899, type: 3}
|
||||
m_CopyBuffer: {fileID: 7200000, guid: 1b95b5dcf48d1914c9e1e7405c7660e3, type: 3}
|
||||
m_CopyPositions: {fileID: 7200000, guid: 1ad53a96b58d3c3488dde4f14db1aaeb, type: 3}
|
||||
m_BitHistogram: {fileID: 7200000, guid: 8670f7ce4b60cef43bed36148aa1b0a2, type: 3}
|
||||
m_BlockReducePart: {fileID: 7200000, guid: 4e034cc8ea2635c4e9f063e5ddc7ea7a, type: 3}
|
||||
m_BlockScan: {fileID: 7200000, guid: 4d6d5de35fa45ef4a92119397a045cc9, type: 3}
|
||||
m_BuildHlbvh: {fileID: 7200000, guid: 2d70cd6be91bd7843a39a54b51c15b13, type: 3}
|
||||
m_RestructureBvh: {fileID: 7200000, guid: 56641cb88dcb31a4398a4997ef7a7a8c, type: 3}
|
||||
m_Scatter: {fileID: 7200000, guid: a2eaeefdac4637a44b734e85b7be9186, type: 3}
|
||||
- rid: 7743543830083272797
|
||||
type: {class: ColorCheckerResources, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime}
|
||||
data:
|
||||
m_ColorCheckerMaterial: {fileID: 2100000, guid: 7a1044256d39dba4aa777255550527bf, type: 2}
|
||||
- rid: 7743543830083272798
|
||||
type: {class: WorldRenderPipelineResources, ns: UnityEngine.PathTracing.Core, asm: Unity.PathTracing.Runtime}
|
||||
data:
|
||||
_version: 3
|
||||
_blitCubemap: {fileID: 7200000, guid: 5a992812cb320d146a66cc600200cce7, type: 3}
|
||||
_blitGrayScaleCookie: {fileID: 7200000, guid: 557fa399e33bf7647bda5697c5c158df, type: 3}
|
||||
_setAlphaChannelShader: {fileID: 7200000, guid: 5efaea0e81c66334aa9d062d6573e6fd, type: 3}
|
||||
_environmentImportanceSamplingBuild: {fileID: 7200000, guid: 5bb2534d2411d344cbc54f880232640f, type: 3}
|
||||
_skyBoxMesh: {fileID: 4300000, guid: 0529e6c5f6dea8c4a8c2835ed7de57cb, type: 2}
|
||||
_sixFaceSkyBoxMesh: {fileID: 4300000, guid: a80925ceebd011741b42509226cefc74, type: 2}
|
||||
_buildLightGridShader: {fileID: 7200000, guid: 16e47c1641bd0104e92b624601457bb0, type: 3}
|
||||
- rid: 8787421320714649964
|
||||
type: {class: HDRPRayTracingResources, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime}
|
||||
data:
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace KINEMATION.MagicBlend.Editor
|
||||
[InitializeOnLoadMethod]
|
||||
private static void OnLoad()
|
||||
{
|
||||
DragAndDrop.AddDropHandler(OnInspectorDrop);
|
||||
DragAndDrop.AddDropHandlerV2(OnInspectorDrop);
|
||||
DragAndDrop.AddDropHandler(OnHierarchyDrop);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ MonoBehaviour:
|
||||
clusterMode: 0
|
||||
packingMode: 0
|
||||
pbrWorkflow: 0
|
||||
hash: 333250560
|
||||
hash: -1185939456
|
||||
splatArray: {fileID: 0}
|
||||
diffuseArray: {fileID: 18700000, guid: 93049372868a795459e58a969177b8fc, type: 2}
|
||||
normalSAOArray: {fileID: 18700000, guid: ce17fdf8b2e1fb8429188cda0fa2a225, type: 2}
|
||||
|
||||
@@ -20,7 +20,7 @@ MonoBehaviour:
|
||||
clusterMode: 0
|
||||
packingMode: 0
|
||||
pbrWorkflow: 0
|
||||
hash: 333250560
|
||||
hash: -1185939456
|
||||
splatArray: {fileID: 0}
|
||||
diffuseArray: {fileID: 18700000, guid: 7d0c28babe6e89e4bbdf3a488fdb2f53, type: 2}
|
||||
normalSAOArray: {fileID: 18700000, guid: cd356858a01c51f44a4ae017603833f7, type: 2}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6bb3cca4ed9b24b4c9c97a95f6cafba8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 842468ccf23564770b4b1cb9f7eca30e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"name": "VFavorites",
|
||||
"rootNamespace": "",
|
||||
"references": [],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d8266c7db84a045d3b706b23e60aa197
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6651039474d594cdd91489768cf293f6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,225 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEditor;
|
||||
using UnityEditor.ShortcutManagement;
|
||||
using System.Reflection;
|
||||
using System.Linq;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEditor.SceneManagement;
|
||||
using Type = System.Type;
|
||||
using static VFavorites.VFavoritesState;
|
||||
using static VFavorites.Libs.VUtils;
|
||||
using static VFavorites.Libs.VGUI;
|
||||
|
||||
|
||||
|
||||
namespace VFavorites
|
||||
{
|
||||
public class VFavoritesData : ScriptableObject
|
||||
{
|
||||
public List<Page> pages = new List<Page>();
|
||||
|
||||
public Page curPage
|
||||
{
|
||||
get
|
||||
{
|
||||
while (curPageIndex >= pages.Count - 1)
|
||||
pages.Add(new Page("Page " + (pages.Count + 1)));
|
||||
|
||||
return pages[curPageIndex];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public int curPageIndex { get => VFavoritesState.instance.curPageIndex; set => VFavoritesState.instance.curPageIndex = value; }
|
||||
|
||||
public float rowScale = 1;
|
||||
|
||||
|
||||
[System.Serializable]
|
||||
public class Page
|
||||
{
|
||||
public List<Item> items = new List<Item>();
|
||||
|
||||
public string name = "";
|
||||
|
||||
public Page(string name) => this.name = name;
|
||||
|
||||
|
||||
|
||||
|
||||
[System.NonSerialized]
|
||||
public List<float> _rowGaps = new List<float>();
|
||||
public List<float> rowGaps
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_rowGaps == null)
|
||||
_rowGaps = new List<float>();
|
||||
|
||||
while (_rowGaps.Count < items.Count + 1) _rowGaps.Add(0);
|
||||
while (_rowGaps.Count > items.Count + 1) _rowGaps.RemoveLast();
|
||||
|
||||
return _rowGaps;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public float scrollPos { get => state.scrollPos; set => state.scrollPos = value; }
|
||||
|
||||
public long lastItemSelectTime_ticks { get => state.lastItemSelectTime_ticks; set => state.lastItemSelectTime_ticks = value; }
|
||||
public long lastItemDragTime_ticks { get => state.lastItemDragTime_ticks; set => state.lastItemDragTime_ticks = value; }
|
||||
|
||||
|
||||
public PageState state
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!VFavoritesState.instance.pageStates_byPageId.ContainsKey(id))
|
||||
VFavoritesState.instance.pageStates_byPageId[id] = new PageState();
|
||||
|
||||
return VFavoritesState.instance.pageStates_byPageId[id];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public int id
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_id == 0)
|
||||
_id = Random.value.GetHashCode();
|
||||
|
||||
return _id;
|
||||
|
||||
}
|
||||
}
|
||||
public int _id = 0;
|
||||
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class Item
|
||||
{
|
||||
public GlobalID globalId;
|
||||
|
||||
|
||||
public Type type => Type.GetType(_typeString) ?? typeof(DefaultAsset);
|
||||
public string _typeString;
|
||||
|
||||
public Object obj => _obj != null ? _obj : (_obj = globalId.GetObject());
|
||||
public Object _obj;
|
||||
|
||||
|
||||
public bool isSceneGameObject;
|
||||
public bool isFolder;
|
||||
public bool isAsset;
|
||||
|
||||
|
||||
public bool isLoadable => obj != null;
|
||||
|
||||
public bool isDeleted
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!isSceneGameObject)
|
||||
return !isLoadable;
|
||||
|
||||
if (isLoadable)
|
||||
return false;
|
||||
|
||||
if (!AssetDatabase.LoadAssetAtPath<SceneAsset>(globalId.guid.ToPath()))
|
||||
return true;
|
||||
|
||||
for (int i = 0; i < EditorSceneManager.sceneCount; i++)
|
||||
if (EditorSceneManager.GetSceneAt(i).path == globalId.guid.ToPath())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public string assetPath => globalId.guid.ToPath();
|
||||
|
||||
|
||||
public Item(Object o)
|
||||
{
|
||||
globalId = o.GetGlobalID();
|
||||
|
||||
|
||||
isSceneGameObject = o is GameObject go && go.scene.rootCount != 0;
|
||||
isFolder = AssetDatabase.IsValidFolder(o.GetPath());
|
||||
isAsset = !isSceneGameObject && !isFolder;
|
||||
|
||||
_typeString = o.GetType().AssemblyQualifiedName;
|
||||
|
||||
_name = o.name;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public string name
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!isLoadable) return _name;
|
||||
|
||||
if (assetPath.GetExtension() == ".cs")
|
||||
_name = obj.name.Decamelcase();
|
||||
else
|
||||
_name = obj.name;
|
||||
|
||||
return _name;
|
||||
|
||||
}
|
||||
}
|
||||
public string _name { get => state._name; set => state._name = value; }
|
||||
|
||||
public string sceneGameObjectIconName { get => state.sceneGameObjectIconName; set => state.sceneGameObjectIconName = value; }
|
||||
|
||||
public long lastSelectTime_ticks { get => state.lastSelectTime_ticks; set => state.lastSelectTime_ticks = value; }
|
||||
public bool isSelected { get => state.isSelected; set => state.isSelected = value; }
|
||||
|
||||
|
||||
|
||||
public ItemState state
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!VFavoritesState.instance.itemStates_byItemId.ContainsKey(id))
|
||||
VFavoritesState.instance.itemStates_byItemId[id] = new ItemState();
|
||||
|
||||
return VFavoritesState.instance.itemStates_byItemId[id];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public int id
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_id == 0)
|
||||
_id = Random.value.GetHashCode();
|
||||
|
||||
return _id;
|
||||
|
||||
}
|
||||
}
|
||||
public int _id = 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,137 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using static VFavorites.Libs.VUtils;
|
||||
using static VFavorites.Libs.VGUI;
|
||||
|
||||
|
||||
|
||||
namespace VFavorites
|
||||
{
|
||||
public class VFavoritesMenu
|
||||
{
|
||||
|
||||
public static bool pageScrollEnabled { get => EditorPrefsCached.GetBool("vFavorites-pageScrollEnabled", true); set => EditorPrefsCached.SetBool("vFavorites-pageScrollEnabled", value); }
|
||||
public static bool numberKeysEnabled { get => EditorPrefsCached.GetBool("vFavorites-numberKeysEnabled", true); set => EditorPrefsCached.SetBool("vFavorites-numberKeysEnabled", value); }
|
||||
public static bool arrowKeysEnabled { get => EditorPrefsCached.GetBool("vFavorites-arrowKeysEnabled", true); set => EditorPrefsCached.SetBool("vFavorites-arrowKeysEnabled", value); }
|
||||
|
||||
public static bool fadeAnimationsEnabled { get => EditorPrefsCached.GetBool("vFavorites-fadeAnimationsEnabled", true); set => EditorPrefsCached.SetBool("vFavorites-fadeAnimationsEnabled", value); }
|
||||
public static bool pageScrollAnimationEnabled { get => EditorPrefsCached.GetBool("vFavorites-pageScrollAnimationEnabled", true); set => EditorPrefsCached.SetBool("vFavorites-pageScrollAnimationEnabled", value); }
|
||||
|
||||
public static int activeOnKeyCombination { get => EditorPrefsCached.GetInt("vFavorites-activeOnKeyCombination", 0); set => EditorPrefsCached.SetInt("vFavorites-activeOnKeyCombination", value); }
|
||||
public static bool activeOnAltEnabled { get => activeOnKeyCombination == 0; set => activeOnKeyCombination = 0; }
|
||||
public static bool activeOnAltShiftEnabled { get => activeOnKeyCombination == 1; set => activeOnKeyCombination = 1; }
|
||||
public static bool activeOnCtrlAltEnabled { get => activeOnKeyCombination == 2; set => activeOnKeyCombination = 2; }
|
||||
|
||||
public static bool pluginDisabled { get => EditorPrefsCached.GetBool("vFavorites-pluginDisabled", false); set => EditorPrefsCached.SetBool("vFavorites-pluginDisabled", value); }
|
||||
|
||||
|
||||
|
||||
|
||||
const string dir = "Tools/vFavorites/";
|
||||
|
||||
const string pageScroll = dir + "Scroll to change page";
|
||||
const string numberKeys = dir + "1-9 keys to change page";
|
||||
const string arrowKeys = dir + "Arrow keys to change page or selection ";
|
||||
|
||||
const string fadeAnimations = dir + "Fade animations";
|
||||
const string pageScrollAnimation = dir + "Page scroll animation";
|
||||
|
||||
const string activeOnAlt = dir + "Holding Alt";
|
||||
const string activeOnAltShift = dir + "Holding Alt and Shift";
|
||||
#if UNITY_EDITOR_OSX
|
||||
const string activeOnCtrlAlt = dir + "Holding Cmd and Alt";
|
||||
#else
|
||||
const string activeOnCtrlAlt = dir + "Holding Ctrl and Alt";
|
||||
|
||||
#endif
|
||||
|
||||
const string disablePlugin = dir + "Disable vFavorites";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[MenuItem(dir + "Shortcuts", false, 1)] static void dadsas() { }
|
||||
[MenuItem(dir + "Shortcuts", true, 1)] static bool dadsas123() => false;
|
||||
|
||||
[MenuItem(pageScroll, false, 2)] static void dadsadasadsdadsas() => pageScrollEnabled = !pageScrollEnabled;
|
||||
[MenuItem(pageScroll, true, 2)] static bool dadsadasdadsdasadsas() { Menu.SetChecked(pageScroll, pageScrollEnabled); return !pluginDisabled; }
|
||||
|
||||
[MenuItem(numberKeys, false, 4)] static void dadsadadsas() => numberKeysEnabled = !numberKeysEnabled;
|
||||
[MenuItem(numberKeys, true, 4)] static bool dadsaddasadsas() { Menu.SetChecked(numberKeys, numberKeysEnabled); return !pluginDisabled; }
|
||||
|
||||
[MenuItem(arrowKeys, false, 5)] static void dadsadaddassas() => arrowKeysEnabled = !arrowKeysEnabled;
|
||||
[MenuItem(arrowKeys, true, 5)] static bool dadadssaddasadsas() { Menu.SetChecked(arrowKeys, arrowKeysEnabled); return !pluginDisabled; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[MenuItem(dir + "Animations", false, 101)] static void dadsadsas() { }
|
||||
[MenuItem(dir + "Animations", true, 101)] static bool dadadssas123() => false;
|
||||
|
||||
[MenuItem(fadeAnimations, false, 102)] static void dadsdasadadsas() => fadeAnimationsEnabled = !fadeAnimationsEnabled;
|
||||
[MenuItem(fadeAnimations, true, 102)] static bool dadsadadsadsdasadsas() { Menu.SetChecked(fadeAnimations, fadeAnimationsEnabled); return !pluginDisabled; }
|
||||
|
||||
[MenuItem(pageScrollAnimation, false, 103)] static void dadsdasdasadadsas() => pageScrollAnimationEnabled = !pageScrollAnimationEnabled;
|
||||
[MenuItem(pageScrollAnimation, true, 103)] static bool dadsadaddassadsdasadsas() { Menu.SetChecked(pageScrollAnimation, pageScrollAnimationEnabled); return !pluginDisabled; }
|
||||
|
||||
|
||||
|
||||
|
||||
[MenuItem(dir + "Open when", false, 1001)] static void dadsaddssas() { }
|
||||
[MenuItem(dir + "Open when", true, 1001)] static bool dadadsssas123() => false;
|
||||
|
||||
[MenuItem(activeOnAlt, false, 1002)] static void dadsdasasdadsas() => activeOnAltEnabled = !activeOnAltEnabled;
|
||||
[MenuItem(activeOnAlt, true, 1002)] static bool dadsadadssdadsdasadsas() { Menu.SetChecked(activeOnAlt, activeOnAltEnabled); return !pluginDisabled; }
|
||||
|
||||
[MenuItem(activeOnAltShift, false, 1003)] static void dadsdasasdadsadsas() => activeOnAltShiftEnabled = !activeOnAltShiftEnabled;
|
||||
[MenuItem(activeOnAltShift, true, 1003)] static bool dadsadadssdasdadsdasadsas() { Menu.SetChecked(activeOnAltShift, activeOnAltShiftEnabled); return !pluginDisabled; }
|
||||
|
||||
[MenuItem(activeOnCtrlAlt, false, 1004)] static void dadsdasadasadssdadsas() => activeOnCtrlAltEnabled = !activeOnCtrlAltEnabled;
|
||||
[MenuItem(activeOnCtrlAlt, true, 1004)] static bool dadsadadsadssdadsdasadsas() { Menu.SetChecked(activeOnCtrlAlt, activeOnCtrlAltEnabled); return !pluginDisabled; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[MenuItem(dir + "More", false, 10001)] static void daasadsddsas() { }
|
||||
[MenuItem(dir + "More", true, 10001)] static bool dadsadsdasas123() => false;
|
||||
|
||||
[MenuItem(dir + "Open manual", false, 10002)]
|
||||
static void dadadssadsas() => AssetDatabase.OpenAsset(AssetDatabase.LoadAssetAtPath<Object>(GetScriptPath("VFavorites").GetParentPath().CombinePath("Manual.pdf")));
|
||||
|
||||
[MenuItem(dir + "Join our Discord", false, 10003)]
|
||||
static void dadasdsas() => Application.OpenURL("https://discord.gg/pUektnZeJT");
|
||||
|
||||
|
||||
// [MenuItem(dir + "Check out vInspector 2", false, 10003)]
|
||||
// static void dadadssadsas() => Application.OpenURL("https://assetstore.unity.com/packages/slug/252297?aid=1100lGLBn&pubref=checkoutvfav");
|
||||
|
||||
// [MenuItem(dir + "Get more Editor Enhancers/Get vHierarchy 2", false, 10003)]
|
||||
// static void dadadssadsas() => Application.OpenURL("https://assetstore.unity.com/packages/slug/251320?aid=1100lGLBn&pubref=menucheckout");
|
||||
|
||||
// [MenuItem(dir + "Get more Editor Enhancers/Get vFolders 2", false, 10004)]
|
||||
// static void dadadssaasddsas() => Application.OpenURL("https://assetstore.unity.com/packages/slug/263644?aid=1100lGLBn&pubref=menucheckout");
|
||||
|
||||
// [MenuItem(dir + "Get more Editor Enhancers/Get vTabs 2", false, 10005)]
|
||||
// static void dadadsadssaasddsas() => Application.OpenURL("https://assetstore.unity.com/packages/slug/263645?aid=1100lGLBn&pubref=menucheckout");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[MenuItem(disablePlugin, false, 100001)] static void dadsadsdasadasdasdsadadsas() { pluginDisabled = !pluginDisabled; UnityEditor.Compilation.CompilationPipeline.RequestScriptCompilation(); }
|
||||
[MenuItem(disablePlugin, true, 100001)] static bool dadsaddssdaasadsadadsdasadsas() { Menu.SetChecked(disablePlugin, pluginDisabled); return true; }
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,6 +0,0 @@
|
||||
|
||||
|
||||
// this file was present in a previus version and is supposed to be deleted now
|
||||
// but asset store update delivery system doesn't allow deleting files
|
||||
// so instead this file is now emptied
|
||||
// feel free to delete it if you want
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1b1b30cd63e14da9a295742be768842
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,57 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEditor;
|
||||
using UnityEditor.ShortcutManagement;
|
||||
using System.Reflection;
|
||||
using System.Linq;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEditor.SceneManagement;
|
||||
using Type = System.Type;
|
||||
using static VFavorites.Libs.VUtils;
|
||||
using static VFavorites.Libs.VGUI;
|
||||
|
||||
|
||||
namespace VFavorites
|
||||
{
|
||||
[FilePath("Library/vFavorites State.asset", FilePathAttribute.Location.ProjectFolder)]
|
||||
public class VFavoritesState : ScriptableSingleton<VFavoritesState>
|
||||
{
|
||||
public int curPageIndex;
|
||||
|
||||
public SerializableDictionary<int, PageState> pageStates_byPageId = new SerializableDictionary<int, PageState>();
|
||||
|
||||
public SerializableDictionary<int, ItemState> itemStates_byItemId = new SerializableDictionary<int, ItemState>();
|
||||
|
||||
|
||||
[System.Serializable]
|
||||
public class PageState
|
||||
{
|
||||
public long lastItemSelectTime_ticks;
|
||||
public long lastItemDragTime_ticks;
|
||||
|
||||
public float scrollPos;
|
||||
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class ItemState
|
||||
{
|
||||
public string _name;
|
||||
|
||||
public string sceneGameObjectIconName;
|
||||
|
||||
public long lastSelectTime_ticks;
|
||||
public bool isSelected;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void Save() => instance.Save(true);
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 362e220c378db4e97ae41fa35a6fb58f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,16 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 066cf82f8f80d408c856e48fc8f1127b, type: 3}
|
||||
m_Name: vFavorites Data
|
||||
m_EditorClassIdentifier:
|
||||
pages: []
|
||||
rowScale: 1
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d87c77a488f1b9a438e7202836e4f5df
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e3f2ed9170013ed43ba2f91354f93f65
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"name": "VHierarchy",
|
||||
"rootNamespace": "",
|
||||
"references": [],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2c3f48364a5004fd3a152fbdf5fea703
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 67e949be20d3641adbc9494ed5bd764e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,62 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using UnityEditor.ShortcutManagement;
|
||||
using System.Reflection;
|
||||
using System.Linq;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEditor.SceneManagement;
|
||||
using Type = System.Type;
|
||||
using static VHierarchy.VHierarchyData;
|
||||
using static VHierarchy.Libs.VUtils;
|
||||
using static VHierarchy.Libs.VGUI;
|
||||
|
||||
|
||||
|
||||
namespace VHierarchy
|
||||
{
|
||||
[FilePath("Library/vHierarchy Cache.asset", FilePathAttribute.Location.ProjectFolder)]
|
||||
public class VHierarchyCache : ScriptableSingleton<VHierarchyCache>
|
||||
{
|
||||
// used for finding SceneData and SceneIdMap for objects that were moved out of their original scene
|
||||
public SerializableDictionary<int, string> originalSceneGuids_byInstanceId = new SerializableDictionary<int, string>();
|
||||
|
||||
// used as cache for converting GlobalID to InstanceID and as a way to find GameObjectData for prefabs in playmode (when prefabs produce invalid GlobalIDs)
|
||||
public SerializableDictionary<string, SceneIdMap> sceneIdMaps_bySceneGuid = new SerializableDictionary<string, SceneIdMap>();
|
||||
|
||||
// used for fetching icons set inside prefab instances in playmode (when prefabs produce invalid GlobalIDs)
|
||||
public SerializableDictionary<int, GlobalID> prefabInstanceGlobalIds_byInstanceIds = new SerializableDictionary<int, GlobalID>();
|
||||
|
||||
|
||||
[System.Serializable]
|
||||
public class SceneIdMap
|
||||
{
|
||||
public SerializableDictionary<int, GlobalID> globalIds_byInstanceId = new SerializableDictionary<int, GlobalID>();
|
||||
|
||||
public int instanceIdsHash;
|
||||
public int globalIdsHash;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static void Clear()
|
||||
{
|
||||
instance.originalSceneGuids_byInstanceId.Clear();
|
||||
instance.sceneIdMaps_bySceneGuid.Clear();
|
||||
|
||||
instance.Save(true);
|
||||
|
||||
}
|
||||
|
||||
// public static void Save() => instance.Save(true); // cache is never saved to disk, it just needs to survive domain reloads
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3fd3b966dd497472d86df0d7c9271088
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,6 +0,0 @@
|
||||
|
||||
|
||||
// this file was present in a previus version and is supposed to be deleted now
|
||||
// but asset store update delivery system doesn't allow deleting files
|
||||
// so instead this file is now emptied
|
||||
// feel free to delete it if you want
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d51d8117d96b64eaa9a83667bf4297d6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,575 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using UnityEditor.ShortcutManagement;
|
||||
using System.Reflection;
|
||||
using System.Linq;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEditor.SceneManagement;
|
||||
using Type = System.Type;
|
||||
using static VHierarchy.VHierarchyData;
|
||||
using static VHierarchy.Libs.VUtils;
|
||||
using static VHierarchy.Libs.VGUI;
|
||||
|
||||
|
||||
|
||||
namespace VHierarchy
|
||||
{
|
||||
public class VHierarchyComponentWindow : EditorWindow
|
||||
{
|
||||
void OnGUI()
|
||||
{
|
||||
if (!component) { Close(); return; } // todo script components break on playmode
|
||||
|
||||
|
||||
void background()
|
||||
{
|
||||
position.SetPos(0, 0).Draw(GUIColors.windowBackground);
|
||||
}
|
||||
void outline()
|
||||
{
|
||||
if (Application.platform == RuntimePlatform.OSXEditor) return;
|
||||
|
||||
position.SetPos(0, 0).DrawOutline(Greyscale(.1f));
|
||||
|
||||
}
|
||||
void header()
|
||||
{
|
||||
var headerRect = ExpandWidthLabelRect(18).Resize(-1).AddWidthFromMid(6);
|
||||
var pinButtonRect = headerRect.SetWidthFromRight(17).SetHeightFromMid(17).Move(-21, .5f);
|
||||
var closeButtonRect = headerRect.SetWidthFromRight(16).SetHeightFromMid(16).Move(-3, .5f);
|
||||
|
||||
var backgroundColor = isDarkTheme ? Greyscale(.25f) : GUIColors.windowBackground;
|
||||
|
||||
void startDragging()
|
||||
{
|
||||
if (isResizingVertically) return;
|
||||
if (isResizingHorizontally) return;
|
||||
if (isDragged) return;
|
||||
if (!curEvent.isMouseDrag) return;
|
||||
if (!headerRect.IsHovered()) return;
|
||||
|
||||
|
||||
isDragged = true;
|
||||
|
||||
dragStartMousePos = EditorGUIUtility.GUIToScreenPoint(curEvent.mousePosition);
|
||||
dragStartWindowPos = position.position;
|
||||
|
||||
|
||||
isPinned = true;
|
||||
|
||||
if (floatingInstance == this)
|
||||
floatingInstance = null;
|
||||
|
||||
EditorApplication.RepaintHierarchyWindow();
|
||||
|
||||
|
||||
}
|
||||
void updateDragging()
|
||||
{
|
||||
if (!isDragged) return;
|
||||
|
||||
|
||||
var draggedPosition = dragStartWindowPos + EditorGUIUtility.GUIToScreenPoint(curEvent.mousePosition) - dragStartMousePos;
|
||||
|
||||
if (!curEvent.isRepaint)
|
||||
position = position.SetPos(draggedPosition);
|
||||
|
||||
|
||||
EditorGUIUtility.hotControl = EditorGUIUtility.GetControlID(FocusType.Passive);
|
||||
|
||||
}
|
||||
void stopDragging()
|
||||
{
|
||||
if (!isDragged) return;
|
||||
if (!curEvent.isMouseUp) return;
|
||||
|
||||
|
||||
isDragged = false;
|
||||
|
||||
EditorGUIUtility.hotControl = 0;
|
||||
|
||||
}
|
||||
|
||||
void background()
|
||||
{
|
||||
headerRect.Draw(backgroundColor);
|
||||
|
||||
headerRect.SetHeightFromBottom(1).Draw(isDarkTheme ? Greyscale(.2f) : Greyscale(.7f));
|
||||
|
||||
}
|
||||
void icon()
|
||||
{
|
||||
var iconRect = headerRect.SetWidth(20).MoveX(14).MoveY(-1);
|
||||
|
||||
GUI.Label(iconRect, VHierarchy.GetComponentIcon(component));
|
||||
|
||||
}
|
||||
void toggle()
|
||||
{
|
||||
var toggleRect = headerRect.MoveX(36).SetSize(20, 20);
|
||||
|
||||
|
||||
var pi_enabled = component.GetType().GetProperty("enabled") ??
|
||||
component.GetType().BaseType?.GetProperty("enabled") ??
|
||||
component.GetType().BaseType?.BaseType?.GetProperty("enabled") ??
|
||||
component.GetType().BaseType?.BaseType?.BaseType?.GetProperty("enabled");
|
||||
|
||||
|
||||
if (pi_enabled == null) return;
|
||||
|
||||
var enabled = (bool)pi_enabled.GetValue(component);
|
||||
|
||||
|
||||
if (GUI.Toggle(toggleRect, enabled, "") == enabled) return;
|
||||
|
||||
component.RecordUndo();
|
||||
pi_enabled.SetValue(component, !enabled);
|
||||
|
||||
}
|
||||
void name()
|
||||
{
|
||||
var nameRect = headerRect.MoveX(54).MoveY(-1);
|
||||
|
||||
var s = VHierarchy.GetComponentName(component);
|
||||
|
||||
if (isPinned)
|
||||
s += " of " + component.gameObject.name;
|
||||
|
||||
|
||||
SetLabelBold();
|
||||
|
||||
GUI.Label(nameRect, s);
|
||||
|
||||
ResetLabelStyle();
|
||||
|
||||
}
|
||||
void nameCurtain()
|
||||
{
|
||||
var flatColorRect = headerRect.SetX(pinButtonRect.x + 3).SetXMax(headerRect.xMax);
|
||||
var gradientRect = headerRect.SetXMax(flatColorRect.x).SetWidthFromRight(30);
|
||||
|
||||
flatColorRect.Draw(backgroundColor);
|
||||
gradientRect.DrawCurtainLeft(backgroundColor);
|
||||
|
||||
}
|
||||
void pinButton()
|
||||
{
|
||||
if (!isPinned && closeButtonRect.IsHovered()) return;
|
||||
|
||||
|
||||
var normalColor = isDarkTheme ? Greyscale(.65f) : Greyscale(.8f);
|
||||
var hoveredColor = isDarkTheme ? Greyscale(.9f) : normalColor;
|
||||
var activeColor = Color.white;
|
||||
|
||||
|
||||
|
||||
SetGUIColor(isPinned ? activeColor : pinButtonRect.IsHovered() ? hoveredColor : normalColor);
|
||||
|
||||
GUI.Label(pinButtonRect, EditorGUIUtility.IconContent("pinned"));
|
||||
|
||||
ResetGUIColor();
|
||||
|
||||
|
||||
SetGUIColor(Color.clear);
|
||||
|
||||
var clicked = GUI.Button(pinButtonRect, "");
|
||||
|
||||
ResetGUIColor();
|
||||
|
||||
|
||||
if (!clicked) return;
|
||||
|
||||
isPinned = !isPinned;
|
||||
|
||||
if (isPinned && floatingInstance == this)
|
||||
floatingInstance = null;
|
||||
|
||||
if (!isPinned && !floatingInstance)
|
||||
floatingInstance = this;
|
||||
|
||||
EditorApplication.RepaintHierarchyWindow();
|
||||
|
||||
|
||||
}
|
||||
void closeButton()
|
||||
{
|
||||
|
||||
SetGUIColor(Color.clear);
|
||||
|
||||
if (GUI.Button(closeButtonRect, ""))
|
||||
Close();
|
||||
|
||||
ResetGUIColor();
|
||||
|
||||
|
||||
var normalColor = isDarkTheme ? Greyscale(.65f) : Greyscale(.35f);
|
||||
var hoveredColor = isDarkTheme ? Greyscale(.9f) : normalColor;
|
||||
|
||||
|
||||
SetGUIColor(closeButtonRect.IsHovered() ? hoveredColor : normalColor);
|
||||
|
||||
GUI.Label(closeButtonRect, EditorGUIUtility.IconContent("CrossIcon"));
|
||||
|
||||
ResetGUIColor();
|
||||
|
||||
|
||||
if (isPinned) return;
|
||||
|
||||
var escRect = closeButtonRect.Move(-22, -1).SetWidth(70);
|
||||
|
||||
SetGUIEnabled(false);
|
||||
|
||||
if (closeButtonRect.IsHovered())
|
||||
GUI.Label(escRect, "Esc");
|
||||
|
||||
ResetGUIEnabled();
|
||||
|
||||
}
|
||||
|
||||
startDragging();
|
||||
updateDragging();
|
||||
stopDragging();
|
||||
|
||||
background();
|
||||
icon();
|
||||
toggle();
|
||||
name();
|
||||
nameCurtain();
|
||||
pinButton();
|
||||
closeButton();
|
||||
|
||||
}
|
||||
void body()
|
||||
{
|
||||
EditorGUIUtility.labelWidth = (this.position.width * .4f).Max(120);
|
||||
|
||||
|
||||
scrollPosition = EditorGUILayout.BeginScrollView(Vector2.up * scrollPosition).y;
|
||||
BeginIndent(17);
|
||||
|
||||
|
||||
editor?.OnInspectorGUI();
|
||||
|
||||
updateHeight();
|
||||
|
||||
|
||||
EndIndent(1);
|
||||
EditorGUILayout.EndScrollView();
|
||||
|
||||
|
||||
EditorGUIUtility.labelWidth = 0;
|
||||
|
||||
}
|
||||
|
||||
void updateHeight()
|
||||
{
|
||||
|
||||
ExpandWidthLabelRect(height: -5);
|
||||
|
||||
if (!curEvent.isRepaint) return;
|
||||
if (isResizingVertically) return;
|
||||
|
||||
|
||||
targetHeight = lastRect.y + 30;
|
||||
|
||||
position = position.SetHeight(targetHeight.Min(maxHeight));
|
||||
|
||||
|
||||
prevHeight = position.height;
|
||||
|
||||
}
|
||||
void updatePosition()
|
||||
{
|
||||
if (!curEvent.isLayout) return;
|
||||
|
||||
void calcDeltaTime()
|
||||
{
|
||||
deltaTime = (float)(EditorApplication.timeSinceStartup - lastLayoutTime);
|
||||
|
||||
if (deltaTime > .05f)
|
||||
deltaTime = .0166f;
|
||||
|
||||
lastLayoutTime = EditorApplication.timeSinceStartup;
|
||||
|
||||
}
|
||||
void resetCurPos()
|
||||
{
|
||||
if (currentPosition != default && !isPinned) return;
|
||||
|
||||
currentPosition = position.position; // position.position is always int, which can't be used for lerping
|
||||
|
||||
}
|
||||
void lerpCurPos()
|
||||
{
|
||||
if (isPinned) return;
|
||||
|
||||
var speed = 9;
|
||||
|
||||
SmoothDamp(ref currentPosition, targetPosition, speed, ref positionDeriv, deltaTime);
|
||||
// Lerp(ref currentPosition, targetPosition, speed, deltaTime);
|
||||
|
||||
}
|
||||
void setCurPos()
|
||||
{
|
||||
if (isPinned) return;
|
||||
|
||||
position = position.SetPos(currentPosition);
|
||||
|
||||
}
|
||||
|
||||
calcDeltaTime();
|
||||
resetCurPos();
|
||||
lerpCurPos();
|
||||
setCurPos();
|
||||
|
||||
}
|
||||
void closeOnEscape()
|
||||
{
|
||||
if (!curEvent.isKeyDown) return;
|
||||
if (curEvent.keyCode != KeyCode.Escape) return;
|
||||
|
||||
Close();
|
||||
}
|
||||
|
||||
void horizontalResize()
|
||||
{
|
||||
var showingScrollbar = targetHeight > maxHeight;
|
||||
|
||||
var resizeArea = this.position.SetPos(0, 0).SetWidthFromRight(showingScrollbar ? 3 : 5).AddHeightFromBottom(-20);
|
||||
|
||||
void startResize()
|
||||
{
|
||||
if (isDragged) return;
|
||||
if (isResizingHorizontally) return;
|
||||
if (!curEvent.isMouseDown && !curEvent.isMouseDrag) return;
|
||||
if (!resizeArea.IsHovered()) return;
|
||||
|
||||
isResizingHorizontally = true;
|
||||
|
||||
resizeStartMousePos = curEvent.mousePosition_screenSpace;
|
||||
resizeStartWindowSize = this.position.size;
|
||||
|
||||
}
|
||||
void updateResize()
|
||||
{
|
||||
if (!isResizingHorizontally) return;
|
||||
|
||||
|
||||
var resizedWidth = resizeStartWindowSize.x + curEvent.mousePosition_screenSpace.x - resizeStartMousePos.x;
|
||||
|
||||
var width = resizedWidth.Max(300);
|
||||
|
||||
if (!curEvent.isRepaint)
|
||||
position = position.SetWidth(width);
|
||||
|
||||
|
||||
EditorGUIUtility.hotControl = EditorGUIUtility.GetControlID(FocusType.Passive);
|
||||
// GUI.focused
|
||||
|
||||
}
|
||||
void stopResize()
|
||||
{
|
||||
if (!isResizingHorizontally) return;
|
||||
if (!curEvent.isMouseUp) return;
|
||||
|
||||
isResizingHorizontally = false;
|
||||
|
||||
EditorGUIUtility.hotControl = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
EditorGUIUtility.AddCursorRect(resizeArea, MouseCursor.ResizeHorizontal);
|
||||
|
||||
startResize();
|
||||
updateResize();
|
||||
stopResize();
|
||||
|
||||
}
|
||||
void verticalResize()
|
||||
{
|
||||
var resizeArea = this.position.SetPos(0, 0).SetHeightFromBottom(5);
|
||||
|
||||
void startResize()
|
||||
{
|
||||
if (isDragged) return;
|
||||
if (isResizingVertically) return;
|
||||
if (!curEvent.isMouseDown && !curEvent.isMouseDrag) return;
|
||||
if (!resizeArea.IsHovered()) return;
|
||||
|
||||
isResizingVertically = true;
|
||||
|
||||
resizeStartMousePos = curEvent.mousePosition_screenSpace;
|
||||
resizeStartWindowSize = this.position.size;
|
||||
|
||||
}
|
||||
void updateResize()
|
||||
{
|
||||
if (!isResizingVertically) return;
|
||||
|
||||
|
||||
var resizedHeight = resizeStartWindowSize.y + curEvent.mousePosition_screenSpace.y - resizeStartMousePos.y;
|
||||
|
||||
var height = resizedHeight.Min(targetHeight).Max(50);
|
||||
|
||||
if (!curEvent.isRepaint)
|
||||
position = position.SetHeight(height);
|
||||
|
||||
maxHeight = height;
|
||||
|
||||
|
||||
EditorGUIUtility.hotControl = EditorGUIUtility.GetControlID(FocusType.Passive);
|
||||
// GUI.focused
|
||||
|
||||
}
|
||||
void stopResize()
|
||||
{
|
||||
if (!isResizingVertically) return;
|
||||
if (!curEvent.isMouseUp) return;
|
||||
|
||||
isResizingVertically = false;
|
||||
|
||||
EditorGUIUtility.hotControl = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
EditorGUIUtility.AddCursorRect(resizeArea, MouseCursor.ResizeVertical);
|
||||
|
||||
startResize();
|
||||
updateResize();
|
||||
stopResize();
|
||||
|
||||
}
|
||||
|
||||
|
||||
background();
|
||||
outline();
|
||||
|
||||
horizontalResize();
|
||||
verticalResize();
|
||||
|
||||
|
||||
header();
|
||||
|
||||
Space(3);
|
||||
body();
|
||||
|
||||
Space(7);
|
||||
|
||||
|
||||
updatePosition();
|
||||
closeOnEscape();
|
||||
|
||||
if (!isPinned)
|
||||
Repaint();
|
||||
|
||||
}
|
||||
|
||||
public Vector2 targetPosition;
|
||||
public Vector2 currentPosition;
|
||||
Vector2 positionDeriv;
|
||||
float deltaTime;
|
||||
double lastLayoutTime;
|
||||
|
||||
bool isDragged;
|
||||
Vector2 dragStartMousePos;
|
||||
Vector2 dragStartWindowPos;
|
||||
|
||||
public bool isResizingHorizontally;
|
||||
public bool isResizingVertically;
|
||||
public Vector2 resizeStartMousePos;
|
||||
public Vector2 resizeStartWindowSize;
|
||||
|
||||
public float scrollPosition;
|
||||
|
||||
public float targetHeight;
|
||||
public float maxHeight;
|
||||
public float prevHeight;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void OnLostFocus()
|
||||
{
|
||||
if (isPinned) return;
|
||||
|
||||
if (curEvent.holdingAlt && EditorWindow.focusedWindow.GetType().Name == "SceneHierarchyWindow")
|
||||
CloseNextFrameIfNotRefocused();
|
||||
else
|
||||
Close();
|
||||
|
||||
}
|
||||
|
||||
void CloseNextFrameIfNotRefocused()
|
||||
{
|
||||
EditorApplication.delayCall += () => { if (EditorWindow.focusedWindow != this) Close(); };
|
||||
}
|
||||
|
||||
public bool isPinned;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void Init(Component component)
|
||||
{
|
||||
if (editor)
|
||||
editor.DestroyImmediate();
|
||||
|
||||
this.component = component;
|
||||
this.editor = Editor.CreateEditor(component);
|
||||
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
editor?.DestroyImmediate();
|
||||
|
||||
editor = null;
|
||||
component = null;
|
||||
|
||||
EditorPrefs.SetFloat("vHierarchy-componentWindowWidth", position.width);
|
||||
|
||||
}
|
||||
|
||||
public Component component;
|
||||
public Editor editor;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static void CreateFloatingInstance(Vector2 position)
|
||||
{
|
||||
floatingInstance = ScriptableObject.CreateInstance<VHierarchyComponentWindow>();
|
||||
|
||||
floatingInstance.ShowPopup();
|
||||
|
||||
|
||||
floatingInstance.maxHeight = EditorGUIUtility.GetMainWindowPosition().height * .7f;
|
||||
|
||||
|
||||
var savedWidth = EditorPrefs.GetFloat("vHierarchy-componentWindowWidth", minWidth);
|
||||
|
||||
var width = savedWidth.Max(minWidth);
|
||||
|
||||
floatingInstance.position = Rect.zero.SetPos(position).SetWidth(width).SetHeight(200);
|
||||
floatingInstance.prevHeight = floatingInstance.position.height;
|
||||
|
||||
floatingInstance.targetPosition = position;
|
||||
|
||||
}
|
||||
|
||||
public static VHierarchyComponentWindow floatingInstance;
|
||||
|
||||
public static float minWidth => 300;
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4b48d49a631ab443990f28938cbdedb8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,76 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using UnityEditor.ShortcutManagement;
|
||||
using System.Reflection;
|
||||
using System.Linq;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEditor.SceneManagement;
|
||||
using static VHierarchy.Libs.VUtils;
|
||||
using static VHierarchy.Libs.VGUI;
|
||||
|
||||
|
||||
|
||||
namespace VHierarchy
|
||||
{
|
||||
public class VHierarchyData : ScriptableObject, ISerializationCallbackReceiver
|
||||
{
|
||||
|
||||
public SerializableDictionary<string, SceneData> sceneDatas_byGuid = new SerializableDictionary<string, SceneData>();
|
||||
|
||||
|
||||
[System.Serializable]
|
||||
public class SceneData
|
||||
{
|
||||
public SerializableDictionary<GlobalID, GameObjectData> goDatas_byGlobalId = new SerializableDictionary<GlobalID, GameObjectData>();
|
||||
}
|
||||
|
||||
|
||||
[System.Serializable]
|
||||
public class GameObjectData
|
||||
{
|
||||
public int colorIndex;
|
||||
public string iconNameOrGuid = ""; // name for buildin icons, guid for custom ones
|
||||
|
||||
[System.NonSerialized] // set in GetGameObjectData
|
||||
public SceneData sceneData;
|
||||
|
||||
}
|
||||
|
||||
public void OnBeforeSerialize() => VHierarchy.firstDataCacheLayer.Clear();
|
||||
public void OnAfterDeserialize() => VHierarchy.firstDataCacheLayer.Clear();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[CustomEditor(typeof(VHierarchyData))]
|
||||
class Editor : UnityEditor.Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
var style = new GUIStyle(EditorStyles.label) { wordWrap = true };
|
||||
|
||||
|
||||
SetGUIEnabled(false);
|
||||
BeginIndent(0);
|
||||
|
||||
Space(10);
|
||||
EditorGUILayout.LabelField("This file contains data about which icons and colors are assigned to objects", style);
|
||||
|
||||
Space(6);
|
||||
GUILayout.Label("If there are multiple people working on the project, you might want to store this data in scenes to avoid merge conflicts. To do that, create a script that inherits from VHierarchy.VHierarchyDataComponent and add it to any object in the scene", style);
|
||||
|
||||
EndIndent(10);
|
||||
ResetGUIEnabled();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a9752b0c8e144801967e6897679604b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,95 +0,0 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using UnityEditor.ShortcutManagement;
|
||||
using System.Reflection;
|
||||
using System.Linq;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEditor.Experimental.SceneManagement;
|
||||
using Type = System.Type;
|
||||
using static VHierarchy.VHierarchyData;
|
||||
using static VHierarchy.Libs.VUtils;
|
||||
using static VHierarchy.Libs.VGUI;
|
||||
|
||||
|
||||
|
||||
namespace VHierarchy
|
||||
{
|
||||
[ExecuteInEditMode]
|
||||
public abstract class VHierarchyDataComponent : MonoBehaviour, ISerializationCallbackReceiver
|
||||
{
|
||||
public void Awake()
|
||||
{
|
||||
void register()
|
||||
{
|
||||
VHierarchy.dataComponents_byScene[gameObject.scene] = this;
|
||||
}
|
||||
void handleSceneDuplication()
|
||||
{
|
||||
if (sceneData == null) return;
|
||||
if (!sceneData.goDatas_byGlobalId.Any()) return;
|
||||
|
||||
|
||||
var curSceneGuid = gameObject.scene.path.ToGuid();
|
||||
var dataSceneGuid = sceneData.goDatas_byGlobalId.Keys.First().guid;
|
||||
|
||||
if (curSceneGuid == dataSceneGuid) return;
|
||||
|
||||
|
||||
var newDic = new SerializableDictionary<GlobalID, GameObjectData>();
|
||||
|
||||
foreach (var kvp in sceneData.goDatas_byGlobalId)
|
||||
newDic[new GlobalID(kvp.Key.ToString().Replace(dataSceneGuid, curSceneGuid))] = kvp.Value;
|
||||
|
||||
|
||||
sceneData.goDatas_byGlobalId = newDic;
|
||||
|
||||
|
||||
EditorSceneManager.MarkSceneDirty(gameObject.scene);
|
||||
EditorSceneManager.SaveScene(gameObject.scene);
|
||||
|
||||
}
|
||||
|
||||
register();
|
||||
handleSceneDuplication();
|
||||
|
||||
}
|
||||
|
||||
public SceneData sceneData;
|
||||
|
||||
|
||||
public void OnBeforeSerialize() => VHierarchy.firstDataCacheLayer.Clear();
|
||||
public void OnAfterDeserialize() => VHierarchy.firstDataCacheLayer.Clear();
|
||||
|
||||
|
||||
|
||||
[CustomEditor(typeof(VHierarchyDataComponent), true)]
|
||||
class Editor : UnityEditor.Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
var style = EditorStyles.label;
|
||||
style.wordWrap = true;
|
||||
|
||||
|
||||
SetGUIEnabled(false);
|
||||
BeginIndent(0);
|
||||
|
||||
Space(4);
|
||||
EditorGUILayout.LabelField("This component stores vHierarchy icons and colors that are assigned to objects in this scene", style);
|
||||
|
||||
Space(2);
|
||||
|
||||
EndIndent(10);
|
||||
ResetGUIEnabled();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user