1
This commit is contained in:
@@ -23,7 +23,7 @@ MonoBehaviour:
|
||||
m_RequireOpaqueTexture: 1
|
||||
m_OpaqueDownsampling: 1
|
||||
m_SupportsTerrainHoles: 1
|
||||
m_SupportsHDR: 1
|
||||
m_SupportsHDR: 0
|
||||
m_HDRColorBufferPrecision: 0
|
||||
m_MSAA: 1
|
||||
m_RenderScale: 0.6
|
||||
@@ -36,7 +36,7 @@ MonoBehaviour:
|
||||
m_MainLightRenderingMode: 1
|
||||
m_MainLightShadowsSupported: 1
|
||||
m_MainLightShadowmapResolution: 256
|
||||
m_AdditionalLightsRenderingMode: 1
|
||||
m_AdditionalLightsRenderingMode: 0
|
||||
m_AdditionalLightsPerObjectLimit: 4
|
||||
m_AdditionalLightShadowsSupported: 0
|
||||
m_AdditionalLightsShadowmapResolution: 2048
|
||||
@@ -45,7 +45,7 @@ MonoBehaviour:
|
||||
m_AdditionalLightsShadowResolutionTierHigh: 1024
|
||||
m_ReflectionProbeBlending: 0
|
||||
m_ReflectionProbeBoxProjection: 0
|
||||
m_ShadowDistance: 50
|
||||
m_ShadowDistance: 8
|
||||
m_ShadowCascadeCount: 4
|
||||
m_Cascade2Split: 0.25
|
||||
m_Cascade3Split: {x: 0.1, y: 0.3}
|
||||
@@ -82,12 +82,12 @@ MonoBehaviour:
|
||||
m_Textures:
|
||||
blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
|
||||
bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
|
||||
m_PrefilteringModeMainLightShadows: 0
|
||||
m_PrefilteringModeAdditionalLight: 3
|
||||
m_PrefilteringModeMainLightShadows: 3
|
||||
m_PrefilteringModeAdditionalLight: 0
|
||||
m_PrefilteringModeAdditionalLightShadows: 0
|
||||
m_PrefilterXRKeywords: 1
|
||||
m_PrefilteringModeForwardPlus: 0
|
||||
m_PrefilteringModeDeferredRendering: 2
|
||||
m_PrefilteringModeForwardPlus: 2
|
||||
m_PrefilteringModeDeferredRendering: 0
|
||||
m_PrefilteringModeScreenSpaceOcclusion: 0
|
||||
m_PrefilterDebugKeywords: 1
|
||||
m_PrefilterWriteRenderingLayers: 1
|
||||
|
@@ -68,6 +68,10 @@ MonoBehaviour:
|
||||
_serializedList:
|
||||
- Key: 1
|
||||
Value: {fileID: 3094330708855449807, guid: 05ab35d27bb28ad49bc9c2b098b821ae, type: 3}
|
||||
sprintAnimations:
|
||||
_serializedList:
|
||||
- Key: 1
|
||||
Value: {fileID: 3094330708855449807, guid: 8e86aed4685f43b4f8fb6a9b306ea786, type: 3}
|
||||
knockedAnimations:
|
||||
_serializedList:
|
||||
- Key:
|
||||
|
@@ -1,5 +1,18 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-1514724213852417610
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 7
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
@@ -7,8 +20,8 @@ Material:
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: MirrorFlame
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Name: material_guide_path
|
||||
m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
@@ -16,7 +29,7 @@ Material:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 2000
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses: []
|
||||
@@ -86,6 +99,7 @@ Material:
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BlendOp: 0
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
@@ -96,40 +110,26 @@ Material:
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _SampleGI: 0
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.40441176, g: 0.371702, b: 0.371702, a: 1}
|
||||
- _Color: {r: 0.4044117, g: 0.37170196, b: 0.37170196, a: 1}
|
||||
- _BaseColor: {r: 0.047169685, g: 0.6014918, b: 1, a: 1}
|
||||
- _Color: {r: 0.047169663, g: 0.6014917, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!114 &8304035635537127767
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 7
|
@@ -1,5 +1,18 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-8685590349546997708
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 7
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
@@ -7,7 +20,7 @@ Material:
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Gray
|
||||
m_Name: material_toon
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
@@ -16,7 +29,7 @@ Material:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 2000
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses: []
|
||||
@@ -113,21 +126,8 @@ Material:
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
- _Color: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!114 &3096095891881332358
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 7
|
@@ -158,7 +158,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: -46.73, y: 444}
|
||||
m_AnchoredPosition: {x: -46.73, y: 279.93}
|
||||
m_SizeDelta: {x: 64, y: 64}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &322064946
|
||||
|
@@ -16,8 +16,11 @@ using Microsoft.Extensions.Hosting.Unity;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Net.Like.Xue.Tokyo.GameService;
|
||||
using Net.Like.Xue.Tokyo.UX;
|
||||
using Net.Project.B.Dialogue;
|
||||
using Net.Project.B.Health;
|
||||
using Net.Project.B.Interaction;
|
||||
using Net.Project.B.Quest;
|
||||
using Net.Project.B.UX;
|
||||
using Net.Project.B.WorldNode;
|
||||
using Project.B.Animation;
|
||||
using Project.B.CharacterController;
|
||||
@@ -42,7 +45,7 @@ namespace Net.Like.Xue.Tokyo
|
||||
var source = new CancellationTokenSource();
|
||||
destroyCancellationToken.Register(source.Cancel);
|
||||
|
||||
var serviceCollection = new ServiceCollection();
|
||||
var serviceCollection = BITApp.ServiceCollection= new ServiceCollection();
|
||||
|
||||
serviceCollection.AddSingleton<IServiceCollection>(serviceCollection);
|
||||
|
||||
@@ -107,11 +110,20 @@ namespace Net.Like.Xue.Tokyo
|
||||
serviceCollection.AddSingleton<UXMenu>();
|
||||
serviceCollection.AddSingleton<UXConsole>();
|
||||
|
||||
serviceCollection.AddSingleton<UXDialogue>();
|
||||
|
||||
//生成玩家
|
||||
serviceCollection.AddSingleton<GameSpawnPlayerService>();
|
||||
|
||||
//任务
|
||||
serviceCollection.AddSingleton<IQuestService, QuestService>();
|
||||
|
||||
//对话
|
||||
serviceCollection.AddSingleton<IDialogueService, DialogueService>();
|
||||
serviceCollection.AddSingleton<DialogueMiddlewareNodeCanvasDialogueTree>();
|
||||
|
||||
//获取服务提供者
|
||||
var serviceProvider = serviceCollection.BuildServiceProvider();
|
||||
await using var serviceProvider = BITApp.ServiceProvider = serviceCollection.BuildServiceProvider();
|
||||
|
||||
if (serviceProvider is IDisposable disposable)
|
||||
{
|
||||
@@ -155,6 +167,10 @@ namespace Net.Like.Xue.Tokyo
|
||||
serviceProvider.GetRequiredService<WorldHighlightService>();
|
||||
|
||||
serviceProvider.GetRequiredService<UXConsole>();
|
||||
|
||||
serviceProvider.GetRequiredService<DialogueMiddlewareNodeCanvasDialogueTree>();
|
||||
|
||||
serviceProvider.GetRequiredService<UXDialogue>().Initialize(serviceProvider.GetRequiredService<UXHud>());
|
||||
|
||||
YooAssets.LoadAssetSync("MyShaderVariants").AssetObject.As<ShaderVariantCollection>().WarmUp();
|
||||
|
||||
|
37
Assets/Artists/Scripts/SetDayTime.cs
Normal file
37
Assets/Artists/Scripts/SetDayTime.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BITKit;
|
||||
using NodeCanvas.Framework;
|
||||
using Pinwheel.Jupiter;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Net.Like.Xue.Tokyo
|
||||
{
|
||||
public class SetDayTime:MonoBehaviour
|
||||
{
|
||||
private JDayNightCycle _cycle;
|
||||
private void Start()
|
||||
{
|
||||
_cycle = GetComponent<JDayNightCycle>();
|
||||
Data.AddListener<float>("Time",OnSetTime);
|
||||
destroyCancellationToken.Register(Dispose);
|
||||
}
|
||||
private void Dispose()
|
||||
{
|
||||
Data.RemoveListender<float>("Time",OnSetTime);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
Data.Set("Time", _cycle.Time);
|
||||
}
|
||||
|
||||
private void OnSetTime(float obj)
|
||||
{
|
||||
_cycle.Time = obj;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -9,7 +9,8 @@
|
||||
"GUID:c469c0b0902774247810f42d61a18bd7",
|
||||
"GUID:12c795c5ebfb7b245a0399e28b4015e8",
|
||||
"GUID:e527b3ce3106f974585be5134b6200e9",
|
||||
"GUID:d750d221812bb1d48baff92e6ef73e28"
|
||||
"GUID:d750d221812bb1d48baff92e6ef73e28",
|
||||
"GUID:b93d14745ae2c064fb21541ca62ad9de"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
|
@@ -2,10 +2,12 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BITKit;
|
||||
using BITKit.Mod;
|
||||
using BITKit.UX;
|
||||
using BITKit.WorldNode;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Net.Project.B.Interaction;
|
||||
using Net.Project.B.Quest;
|
||||
using Project.B.Map;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
@@ -18,15 +20,29 @@ namespace Net.Like.Xue.Tokyo.UX
|
||||
private readonly IGameMapService _gameMapService;
|
||||
private readonly IWorldInteractionService _interactionService;
|
||||
private readonly WorldInfoNodeService _worldInfoNodeService;
|
||||
public UXHud(IUXService uxService, IGameMapService gameMapService, IWorldInteractionService interactionService, WorldInfoNodeService worldInfoNodeService) : base(uxService)
|
||||
private readonly IQuestService _questService;
|
||||
public UXHud(IUXService uxService, IGameMapService gameMapService, IWorldInteractionService interactionService, WorldInfoNodeService worldInfoNodeService, IQuestService questService) : base(uxService)
|
||||
{
|
||||
_gameMapService = gameMapService;
|
||||
_interactionService = interactionService;
|
||||
_worldInfoNodeService = worldInfoNodeService;
|
||||
_questService = questService;
|
||||
|
||||
_gameMapService.OnMapChanged += OnMapChanged;
|
||||
|
||||
_interactionService.OnInteraction += OnInteraction;
|
||||
|
||||
|
||||
Data.AddListener<float>("Time",x=>
|
||||
{
|
||||
_timeSlider?.SetValueWithoutNotify(x);
|
||||
});
|
||||
|
||||
_questService.OnQuestCreatedOrUpdated +=(x,y,z)=>_questQueue.Enqueue(new(x,y,z));
|
||||
foreach (var (index,quest) in _questService.Quests)
|
||||
{
|
||||
_questQueue.Enqueue(new(quest,QuestState.Inactive,quest.CurrentState));
|
||||
}
|
||||
}
|
||||
|
||||
private void OnInteraction(object arg1, IWorldInteractable arg2, WorldInteractionProcess arg3, object arg4)
|
||||
@@ -58,9 +74,19 @@ namespace Net.Like.Xue.Tokyo.UX
|
||||
private VisualElement _miniPlayer;
|
||||
[UXBindPath("interaction-tips")]
|
||||
private Label _interactionTips;
|
||||
[UXBindPath("time-slider")]
|
||||
private Slider _timeSlider;
|
||||
[UXBindPath("quest-container")]
|
||||
private VisualElement _questContainer;
|
||||
|
||||
private Camera _minimapCamera;
|
||||
private Camera _mainCamera;
|
||||
|
||||
private VisualTreeAsset _questTemplate;
|
||||
|
||||
private readonly Queue<(IQuestData questData, QuestState oldQuestState, QuestState newQuestState)> _questQueue =
|
||||
new();
|
||||
|
||||
public override async UniTask EntryAsync()
|
||||
{
|
||||
await base.EntryAsync();
|
||||
@@ -72,6 +98,13 @@ namespace Net.Like.Xue.Tokyo.UX
|
||||
{
|
||||
UXService.Entry<UXMap>();
|
||||
});
|
||||
|
||||
_timeSlider.RegisterValueChangedCallback(x => { Data.Set("Time", x.newValue); });
|
||||
_questContainer.Clear();
|
||||
|
||||
_questTemplate =await ModService.LoadAsset<VisualTreeAsset>("ux_quest_template");
|
||||
|
||||
_timeSlider.value = Data.Get<float>("Time");
|
||||
}
|
||||
|
||||
public override void OnTick(float deltaTime)
|
||||
@@ -94,6 +127,17 @@ namespace Net.Like.Xue.Tokyo.UX
|
||||
|
||||
_miniPlayer.style.left = _minimapContainer.layout.width * point.x - _miniPlayer.layout.width / 2;
|
||||
_miniPlayer.style.top = _minimapContainer.layout.height * (1-point.y) - _miniPlayer.layout.height / 2;
|
||||
|
||||
|
||||
if (_questContainer is not null && _questTemplate!=null)
|
||||
{
|
||||
while (_questQueue.TryDequeue(out var quest))
|
||||
{
|
||||
var visualElement = _questContainer.Create(_questTemplate);
|
||||
visualElement.Get<Label>(0).text = quest.questData.Name;
|
||||
visualElement.Get<Label>(1).text = quest.questData.Description;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Animancer;
|
||||
@@ -58,6 +59,8 @@ namespace Net.Like.Xue.Tokyo
|
||||
_waitPlayerStart.TrySetResult(infoPlayerStart);
|
||||
}
|
||||
|
||||
public IReadOnlyDictionary<int, IEntity> Entities => _entities.ToDictionary(x => x.entity.Id, x => x.entity);
|
||||
|
||||
public async UniTask<IEntity> CreateAsync(string addressablePath)
|
||||
{
|
||||
await UniTask.SwitchToMainThread();
|
||||
|
@@ -26,3 +26,10 @@
|
||||
flex-grow: 1;
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
.dialogue-container Label {
|
||||
}
|
||||
|
||||
.dialogue-container Label:disabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
6
Assets/Artists/UX/ux_dialogue_choose_template.uxml
Normal file
6
Assets/Artists/UX/ux_dialogue_choose_template.uxml
Normal file
@@ -0,0 +1,6 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
|
||||
<ui:Button parse-escape-sequences="true" display-tooltip-when-elided="true" name="Button-0" style="flex-direction: row; align-items: center;">
|
||||
<ui:Label tabindex="-1" text="[1]" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Label--0" style="width: 32px;" />
|
||||
<ui:Label tabindex="-1" text="选择A" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Label--1" />
|
||||
</ui:Button>
|
||||
</ui:UXML>
|
7
Assets/Artists/UX/ux_dialogue_template.uxml
Normal file
7
Assets/Artists/UX/ux_dialogue_template.uxml
Normal file
@@ -0,0 +1,7 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements">
|
||||
<ui:VisualElement style="flex-direction: row; align-items: center;">
|
||||
<ui:Label tabindex="-1" text="Actor" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Label--0" />
|
||||
<ui:Label tabindex="-1" text=":" parse-escape-sequences="true" display-tooltip-when-elided="true" />
|
||||
<ui:Label tabindex="-1" text="Statement" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Label--1" />
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
@@ -1,12 +1,23 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
|
||||
<ui:Template name="ux_quest_template" src="project://database/Assets/Artists/UX/ux_quest_template.uxml?fileID=9197481963319205126&guid=3e4b142e8b224ce42a5258702fcb6270&type=3#ux_quest_template" />
|
||||
<ui:Template name="ux_dialogue_template" src="project://database/Assets/Artists/UX/ux_dialogue_template.uxml?fileID=9197481963319205126&guid=af60a5419d14491468066d33d8806fc1&type=3#ux_dialogue_template" />
|
||||
<ui:Template name="ux_dialogue_choose_template" src="project://database/Assets/Artists/UX/ux_dialogue_choose_template.uxml?fileID=9197481963319205126&guid=0651c86a74198604da9d71321f73cbd5&type=3#ux_dialogue_choose_template" />
|
||||
<Style src="project://database/Assets/BITKit/Unity/UX/Common/Common.uss?fileID=7433441132597879392&guid=a3a69d3518fd02b489e721f3c5b0b539&type=3#Common" />
|
||||
<ui:VisualElement class="container-my-8" style="position: absolute; left: 32px; top: 32px;">
|
||||
<Style src="project://database/Assets/Artists/UX/Style.uss?fileID=7433441132597879392&guid=506d41b7c5d56a44bb5845e69055a5eb&type=3#Style" />
|
||||
<ui:VisualElement class="container-my-8" style="position: absolute; left: 32px; top: 32px; overflow: hidden;">
|
||||
<ui:VisualElement name="minimap-container" style="background-image: url("project://database/Assets/Artists/Materials/ux_minimap.renderTexture?fileID=8400000&guid=9a9e60eda7295fc47907b25d62d9dd79&type=2#ux_minimap"); width: 256px; height: 256px; background-color: rgba(0, 0, 0, 0.5); border-left-color: rgb(255, 255, 255); border-right-color: rgb(255, 255, 255); border-top-color: rgb(255, 255, 255); border-bottom-color: rgb(255, 255, 255); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;">
|
||||
<ui:VisualElement name="minimap-player" style="width: 32px; height: 32px; background-color: rgb(255, 255, 255); position: absolute; top: 97px; left: 64px; background-image: url("project://database/Assets/Artists/Arts/Avatars/avatar_player.jpg?fileID=2800000&guid=dc1a7b7a5cc9437438280932e8b541a0&type=3#avatar_player");" />
|
||||
</ui:VisualElement>
|
||||
<ui:Slider label="时间" high-value="24" name="time-slider" show-input-field="false" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="quest-container" style="position: absolute; top: 32px; right: 32px; background-color: rgba(0, 0, 0, 0.78);">
|
||||
<ui:Instance template="ux_quest_template" name="ux_quest_template" />
|
||||
</ui:VisualElement>
|
||||
<ui:Label tabindex="-1" text="互动" parse-escape-sequences="true" display-tooltip-when-elided="true" name="interaction-tips" class="flex-center tl" style="top: 32px; background-color: rgba(0, 0, 0, 0.78); padding-top: 4px; padding-right: 8px; padding-bottom: 4px; padding-left: 8px;" />
|
||||
<ui:VisualElement picking-mode="Ignore" class="root">
|
||||
<ui:VisualElement name="dialogue-choose-container">
|
||||
<ui:Instance template="ux_dialogue_choose_template" name="ux_dialogue_choose_template" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement style="margin-top: auto; margin-right: auto; margin-bottom: 16px; margin-left: auto; flex-direction: row; align-items: center; background-color: rgba(0, 0, 0, 0.78); width: 256px;">
|
||||
<ui:VisualElement style="width: 64px; height: 64px; background-image: url("project://database/Assets/Artists/Arts/Avatars/avatar_player.jpg?fileID=2800000&guid=dc1a7b7a5cc9437438280932e8b541a0&type=3#avatar_player");" />
|
||||
<ui:VisualElement style="flex-grow: 1; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px;">
|
||||
@@ -14,4 +25,8 @@
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
<ui:ScrollView picking-mode="Ignore" name="dialogue-container" class="flex-center dialogue-container" style="background-color: rgba(0, 0, 0, 0.78); border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; min-width: 512px; bottom: -25%; max-height: 300px; padding-top: 8px; padding-right: 8px; padding-bottom: 8px; padding-left: 8px;">
|
||||
<ui:Instance template="ux_dialogue_template" name="ux_dialogue_template" />
|
||||
<ui:Instance template="ux_dialogue_template" name="ux_dialogue_template" />
|
||||
</ui:ScrollView>
|
||||
</ui:UXML>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<Style src="project://database/Assets/BITKit/Unity/UX/Common/Common.uss?fileID=7433441132597879392&guid=a3a69d3518fd02b489e721f3c5b0b539&type=3#Common" />
|
||||
<ui:VisualElement class="root" style="background-image: url("project://database/Assets/Artists/Arts/Backgrounds/background_menu.jpg?fileID=21300000&guid=5abe2ac5974a6104fbf483cf5f3f19eb&type=3#background_menu"); background-color: rgb(0, 0, 0); -unity-background-image-tint-color: rgba(255, 255, 255, 0.32);" />
|
||||
<ui:VisualElement class="flex-center" style="min-width: 256px;">
|
||||
<ui:ProgressBar value="48.2" name="load-progress" style="background-color: rgba(255, 255, 255, 0.21); height: 4px; width: 512px;" />
|
||||
<ui:ProgressBar value="0.51" name="load-progress" high-value="1" style="background-color: rgba(255, 255, 255, 0.21); height: 4px; width: 512px;" />
|
||||
<ui:VisualElement style="flex-direction: row; justify-content: space-between;">
|
||||
<ui:Label tabindex="-1" text="map_tokyo" parse-escape-sequences="true" display-tooltip-when-elided="true" name="map-label" class="tl" />
|
||||
<ui:Label tabindex="-1" text="加载中..." parse-escape-sequences="true" display-tooltip-when-elided="true" name="load_step-label" />
|
||||
|
6
Assets/Artists/UX/ux_quest_template.uxml
Normal file
6
Assets/Artists/UX/ux_quest_template.uxml
Normal file
@@ -0,0 +1,6 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements">
|
||||
<ui:VisualElement style="flex-grow: 1;">
|
||||
<ui:Label tabindex="-1" text="任务名称" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Label--0" class="tl" />
|
||||
<ui:Label tabindex="-1" text="任务描述" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Label--1" />
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -2,20 +2,25 @@
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Skybox Cloudy
|
||||
m_Shader: {fileID: 108, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: _MAPPING_LATITUDE_LONGITUDE_LAYOUT
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords:
|
||||
- _MAPPING_LATITUDE_LONGITUDE_LAYOUT
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
|
@@ -2,20 +2,25 @@
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Skybox Daylight
|
||||
m_Shader: {fileID: 108, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: _MAPPING_LATITUDE_LONGITUDE_LAYOUT
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords:
|
||||
- _MAPPING_LATITUDE_LONGITUDE_LAYOUT
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
|
@@ -2,20 +2,25 @@
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Skybox Night
|
||||
m_Shader: {fileID: 108, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: _MAPPING_LATITUDE_LONGITUDE_LAYOUT
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords:
|
||||
- _MAPPING_LATITUDE_LONGITUDE_LAYOUT
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
|
@@ -2,20 +2,25 @@
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Skybox Sunset
|
||||
m_Shader: {fileID: 108, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: _MAPPING_LATITUDE_LONGITUDE_LAYOUT
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords:
|
||||
- _MAPPING_LATITUDE_LONGITUDE_LAYOUT
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
|
@@ -12,6 +12,7 @@ GameObject:
|
||||
- component: {fileID: 5451481438562013308}
|
||||
- component: {fileID: 7801213351329998006}
|
||||
- component: {fileID: 5628896832467355723}
|
||||
- component: {fileID: 5551219519451565407}
|
||||
m_Layer: 0
|
||||
m_Name: SM_fence_01
|
||||
m_TagString: Untagged
|
||||
@@ -105,3 +106,22 @@ BoxCollider:
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 2.6452847, y: 1.0805854, z: 0.092178196}
|
||||
m_Center: {x: 9.597526e-16, y: 0.5402927, z: 1.9195052e-15}
|
||||
--- !u!114 &5551219519451565407
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8593860148783514979}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1e3fdca004f2d45fe8abbed571a8abd5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_OverrideArea: 1
|
||||
m_Area: 1
|
||||
m_OverrideGenerateLinks: 0
|
||||
m_GenerateLinks: 0
|
||||
m_IgnoreFromBuild: 0
|
||||
m_ApplyToChildren: 1
|
||||
m_AffectedAgents: ffffffff
|
||||
|
@@ -12,6 +12,7 @@ GameObject:
|
||||
- component: {fileID: 3376097638743351411}
|
||||
- component: {fileID: 666173907552031929}
|
||||
- component: {fileID: 2233552329396144163}
|
||||
- component: {fileID: 1245374085619807810}
|
||||
m_Layer: 0
|
||||
m_Name: SM_pylon_traffic_01
|
||||
m_TagString: Untagged
|
||||
@@ -106,3 +107,22 @@ MeshCollider:
|
||||
m_Convex: 1
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: -1717690471579594339, guid: ab7bd2102485387479feef4bf7cd05cd, type: 3}
|
||||
--- !u!114 &1245374085619807810
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1314564916344681836}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1e3fdca004f2d45fe8abbed571a8abd5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_OverrideArea: 1
|
||||
m_Area: 1
|
||||
m_OverrideGenerateLinks: 0
|
||||
m_GenerateLinks: 0
|
||||
m_IgnoreFromBuild: 0
|
||||
m_ApplyToChildren: 1
|
||||
m_AffectedAgents: ffffffff
|
||||
|
@@ -19,7 +19,7 @@ GameObject:
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_StaticEditorFlags: 2147483647
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1538259220956459689
|
||||
Transform:
|
||||
|
@@ -122,6 +122,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 5493762063358138333}
|
||||
- component: {fileID: 4676584135131546168}
|
||||
- component: {fileID: 5779194515783330935}
|
||||
m_Layer: 0
|
||||
m_Name: SM_car_japan_02
|
||||
m_TagString: Untagged
|
||||
@@ -168,6 +169,25 @@ MeshCollider:
|
||||
m_Convex: 1
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: -5535246422639665549, guid: dbc981f52e49a12459778d1b63382121, type: 3}
|
||||
--- !u!114 &5779194515783330935
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5149325015808396647}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1e3fdca004f2d45fe8abbed571a8abd5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_OverrideArea: 1
|
||||
m_Area: 1
|
||||
m_OverrideGenerateLinks: 0
|
||||
m_GenerateLinks: 0
|
||||
m_IgnoreFromBuild: 0
|
||||
m_ApplyToChildren: 1
|
||||
m_AffectedAgents: ffffffff
|
||||
--- !u!1 &7091214462922437922
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@@ -93,6 +93,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 553521290116532882}
|
||||
- component: {fileID: 10196678631910779}
|
||||
- component: {fileID: 206508404863321187}
|
||||
m_Layer: 0
|
||||
m_Name: SM_car_sport_japan_01
|
||||
m_TagString: Untagged
|
||||
@@ -139,6 +140,25 @@ MeshCollider:
|
||||
m_Convex: 1
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 5828714007021999026, guid: a7496d926bcaeb14da4feae9222506f9, type: 3}
|
||||
--- !u!114 &206508404863321187
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 929236871327993896}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1e3fdca004f2d45fe8abbed571a8abd5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_OverrideArea: 1
|
||||
m_Area: 1
|
||||
m_OverrideGenerateLinks: 0
|
||||
m_GenerateLinks: 0
|
||||
m_IgnoreFromBuild: 0
|
||||
m_ApplyToChildren: 1
|
||||
m_AffectedAgents: ffffffff
|
||||
--- !u!1 &8390678221298777502
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@@ -47,7 +47,7 @@ MonoBehaviour:
|
||||
CollectorType: 0
|
||||
AddressRuleName: AddressByFileName
|
||||
PackRuleName: PackDirectory
|
||||
FilterRuleName: CollectAll
|
||||
FilterRuleName: CollectPrefab
|
||||
AssetTags:
|
||||
UserData:
|
||||
- GroupName: UX
|
||||
@@ -84,14 +84,6 @@ MonoBehaviour:
|
||||
FilterRuleName: CollectScene
|
||||
AssetTags:
|
||||
UserData:
|
||||
- CollectPath: Assets/Artists/Scenes/map_new_menu.unity
|
||||
CollectorGUID:
|
||||
CollectorType: 0
|
||||
AddressRuleName: AddressByFileName
|
||||
PackRuleName: PackDirectory
|
||||
FilterRuleName: CollectAll
|
||||
AssetTags:
|
||||
UserData:
|
||||
- GroupName: Shader
|
||||
GroupDesc:
|
||||
AssetTags:
|
||||
@@ -102,6 +94,6 @@ MonoBehaviour:
|
||||
CollectorType: 0
|
||||
AddressRuleName: AddressByFileName
|
||||
PackRuleName: PackDirectory
|
||||
FilterRuleName: CollectAll
|
||||
FilterRuleName: CollectShaderVariants
|
||||
AssetTags:
|
||||
UserData:
|
||||
|
@@ -172,22 +172,16 @@ namespace BITKit
|
||||
/// <summary>
|
||||
/// 依赖服务集合
|
||||
/// </summary>
|
||||
public static ServiceCollection ServiceCollection { get; internal set; } = new();
|
||||
public static ServiceCollection ServiceCollection { get; set; } = new();
|
||||
/// <summary>
|
||||
/// 依赖服务提供接口
|
||||
/// </summary>
|
||||
public static ServiceProvider ServiceProvider { get; private set; }
|
||||
public static ServiceProvider BuildServiceProvider()
|
||||
public static ServiceProvider ServiceProvider
|
||||
{
|
||||
var value = ServiceProvider = ServiceCollection.BuildServiceProvider();
|
||||
OnServiceProviderBuild?.Invoke(value);
|
||||
return value;
|
||||
get=>_serviceProvider??=ServiceCollection.BuildServiceProvider();
|
||||
set => _serviceProvider = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 服务创建后的回调
|
||||
/// </summary>
|
||||
public static Action<ServiceProvider> OnServiceProviderBuild;
|
||||
private static ServiceProvider _serviceProvider;
|
||||
/// <summary>
|
||||
/// 主线程
|
||||
/// </summary>
|
||||
|
@@ -29,6 +29,7 @@ namespace BITKit.UX
|
||||
public VisualElement RootVisualElement { get; set; }
|
||||
protected VisualTreeAsset VisualTreeAsset { get; private set; }
|
||||
private readonly ValidHandle _isBusy = new();
|
||||
public readonly UniTaskCompletionSource WaitUtilInitialized = new();
|
||||
protected UIToolKitPanel(IUXService uxService)
|
||||
{
|
||||
UXService = uxService;
|
||||
@@ -76,6 +77,8 @@ namespace BITKit.UX
|
||||
UXUtils.Inject(this);
|
||||
|
||||
RootVisualElement.SetActive(false);
|
||||
|
||||
WaitUtilInitialized.TrySetResult();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"ShaderTotalCount": 17,
|
||||
"VariantTotalCount": 42,
|
||||
"ShaderTotalCount": 18,
|
||||
"VariantTotalCount": 25,
|
||||
"ShaderVariantInfos": [
|
||||
{
|
||||
"AssetPath": "Packages/com.unity.render-pipelines.universal/Shaders/Lit.shader",
|
||||
"ShaderName": "Universal Render Pipeline/Lit",
|
||||
"ShaderVariantCount": 25,
|
||||
"ShaderVariantCount": 7,
|
||||
"ShaderVariantElements": [
|
||||
{
|
||||
"PassType": 8,
|
||||
@@ -19,172 +19,49 @@
|
||||
"_ALPHATEST_ON"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"EVALUATE_SH_VERTEX",
|
||||
"_ADDITIONAL_LIGHTS"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"EVALUATE_SH_VERTEX",
|
||||
"_ADDITIONAL_LIGHTS",
|
||||
"_ALPHAPREMULTIPLY_ON",
|
||||
"_NORMALMAP",
|
||||
"_SURFACE_TYPE_TRANSPARENT"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"EVALUATE_SH_VERTEX",
|
||||
"_ADDITIONAL_LIGHTS",
|
||||
"_ALPHAPREMULTIPLY_ON",
|
||||
"_SURFACE_TYPE_TRANSPARENT"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"EVALUATE_SH_VERTEX",
|
||||
"_ADDITIONAL_LIGHTS",
|
||||
"_NORMALMAP"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"EVALUATE_SH_VERTEX",
|
||||
"_ADDITIONAL_LIGHTS",
|
||||
"_NORMALMAP",
|
||||
"_SURFACE_TYPE_TRANSPARENT"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"EVALUATE_SH_VERTEX",
|
||||
"_ADDITIONAL_LIGHTS",
|
||||
"_SURFACE_TYPE_TRANSPARENT"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"_ALPHATEST_ON"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"_ALPHATEST_ON",
|
||||
"_DETAIL_MULX2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"_ALPHATEST_ON",
|
||||
"_DETAIL_MULX2",
|
||||
"_NORMALMAP"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"_DETAIL_MULX2"
|
||||
"_FORWARD_PLUS",
|
||||
"_MAIN_LIGHT_SHADOWS_CASCADE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"EVALUATE_SH_VERTEX",
|
||||
"_DETAIL_MULX2",
|
||||
"_EMISSION"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"_DETAIL_MULX2",
|
||||
"_METALLICSPECGLOSSMAP"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"_DETAIL_MULX2",
|
||||
"_METALLICSPECGLOSSMAP",
|
||||
"_FORWARD_PLUS",
|
||||
"_MAIN_LIGHT_SHADOWS_CASCADE",
|
||||
"_NORMALMAP"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"_DETAIL_MULX2",
|
||||
"EVALUATE_SH_VERTEX",
|
||||
"_FORWARD_PLUS",
|
||||
"_MAIN_LIGHT_SHADOWS_CASCADE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"EVALUATE_SH_VERTEX",
|
||||
"_FORWARD_PLUS",
|
||||
"_MAIN_LIGHT_SHADOWS_CASCADE",
|
||||
"_NORMALMAP"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"_EMISSION"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"_EMISSION",
|
||||
"_METALLICSPECGLOSSMAP"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"_EMISSION",
|
||||
"_METALLICSPECGLOSSMAP",
|
||||
"_NORMALMAP"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"_EMISSION",
|
||||
"_NORMALMAP"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"_EMISSION",
|
||||
"_RECEIVE_SHADOWS_OFF",
|
||||
"_SPECULARHIGHLIGHTS_OFF"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"_METALLICSPECGLOSSMAP"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"_METALLICSPECGLOSSMAP",
|
||||
"_NORMALMAP"
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"Keywords": [
|
||||
"_NORMALMAP"
|
||||
"EVALUATE_SH_VERTEX",
|
||||
"_FORWARD_PLUS",
|
||||
"_MAIN_LIGHT_SHADOWS_CASCADE",
|
||||
"_RECEIVE_SHADOWS_OFF"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -345,19 +222,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"AssetPath": "Packages/com.unity.render-pipelines.universal/Shaders/Utils/StencilDeferred.shader",
|
||||
"ShaderName": "Hidden/Universal Render Pipeline/StencilDeferred",
|
||||
"ShaderVariantCount": 1,
|
||||
"ShaderVariantElements": [
|
||||
{
|
||||
"PassType": 0,
|
||||
"Keywords": [
|
||||
"_DEFERRED_FIRST_LIGHT"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"AssetPath": "Packages/com.unity.render-pipelines.universal/Shaders/Utils/FallbackError.shader",
|
||||
"ShaderName": "Hidden/Universal Render Pipeline/FallbackError",
|
||||
@@ -392,11 +256,37 @@
|
||||
{
|
||||
"PassType": 8,
|
||||
"Keywords": [
|
||||
"PROCEDURAL_INSTANCING_ON"
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"PassType": 13,
|
||||
"PassType": 8,
|
||||
"Keywords": [
|
||||
"PROCEDURAL_INSTANCING_ON"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"AssetPath": "Packages/com.unity.render-pipelines.core/Runtime/RenderPipelineResources/FallbackShader.shader",
|
||||
"ShaderName": "Hidden/Core/FallbackError",
|
||||
"ShaderVariantCount": 1,
|
||||
"ShaderVariantElements": [
|
||||
{
|
||||
"PassType": 0,
|
||||
"Keywords": [
|
||||
""
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"AssetPath": "Packages/com.unity.toonshader/Runtime/Integrated/Shaders/UnityToon.shader",
|
||||
"ShaderName": "Toon",
|
||||
"ShaderVariantCount": 1,
|
||||
"ShaderVariantElements": [
|
||||
{
|
||||
"PassType": 8,
|
||||
"Keywords": [
|
||||
""
|
||||
]
|
||||
|
@@ -15,52 +15,16 @@ ShaderVariantCollection:
|
||||
passType: 8
|
||||
- keywords: _ALPHATEST_ON
|
||||
passType: 8
|
||||
- keywords:
|
||||
- keywords: EVALUATE_SH_VERTEX _DETAIL_MULX2 _FORWARD_PLUS _MAIN_LIGHT_SHADOWS_CASCADE
|
||||
passType: 13
|
||||
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS
|
||||
- keywords: EVALUATE_SH_VERTEX _DETAIL_MULX2 _FORWARD_PLUS _MAIN_LIGHT_SHADOWS_CASCADE
|
||||
_NORMALMAP
|
||||
passType: 13
|
||||
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _ALPHAPREMULTIPLY_ON _NORMALMAP
|
||||
_SURFACE_TYPE_TRANSPARENT
|
||||
- keywords: EVALUATE_SH_VERTEX _FORWARD_PLUS _MAIN_LIGHT_SHADOWS_CASCADE
|
||||
passType: 13
|
||||
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _ALPHAPREMULTIPLY_ON _SURFACE_TYPE_TRANSPARENT
|
||||
- keywords: EVALUATE_SH_VERTEX _FORWARD_PLUS _MAIN_LIGHT_SHADOWS_CASCADE _NORMALMAP
|
||||
passType: 13
|
||||
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _NORMALMAP
|
||||
passType: 13
|
||||
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _NORMALMAP _SURFACE_TYPE_TRANSPARENT
|
||||
passType: 13
|
||||
- keywords: EVALUATE_SH_VERTEX _ADDITIONAL_LIGHTS _SURFACE_TYPE_TRANSPARENT
|
||||
passType: 13
|
||||
- keywords: _ALPHATEST_ON
|
||||
passType: 13
|
||||
- keywords: _ALPHATEST_ON _DETAIL_MULX2
|
||||
passType: 13
|
||||
- keywords: _ALPHATEST_ON _DETAIL_MULX2 _NORMALMAP
|
||||
passType: 13
|
||||
- keywords: _DETAIL_MULX2
|
||||
passType: 13
|
||||
- keywords: _DETAIL_MULX2 _EMISSION
|
||||
passType: 13
|
||||
- keywords: _DETAIL_MULX2 _METALLICSPECGLOSSMAP
|
||||
passType: 13
|
||||
- keywords: _DETAIL_MULX2 _METALLICSPECGLOSSMAP _NORMALMAP
|
||||
passType: 13
|
||||
- keywords: _DETAIL_MULX2 _NORMALMAP
|
||||
passType: 13
|
||||
- keywords: _EMISSION
|
||||
passType: 13
|
||||
- keywords: _EMISSION _METALLICSPECGLOSSMAP
|
||||
passType: 13
|
||||
- keywords: _EMISSION _METALLICSPECGLOSSMAP _NORMALMAP
|
||||
passType: 13
|
||||
- keywords: _EMISSION _NORMALMAP
|
||||
passType: 13
|
||||
- keywords: _EMISSION _RECEIVE_SHADOWS_OFF _SPECULARHIGHLIGHTS_OFF
|
||||
passType: 13
|
||||
- keywords: _METALLICSPECGLOSSMAP
|
||||
passType: 13
|
||||
- keywords: _METALLICSPECGLOSSMAP _NORMALMAP
|
||||
passType: 13
|
||||
- keywords: _NORMALMAP
|
||||
- keywords: EVALUATE_SH_VERTEX _FORWARD_PLUS _MAIN_LIGHT_SHADOWS_CASCADE _RECEIVE_SHADOWS_OFF
|
||||
passType: 13
|
||||
- first: {fileID: 66, guid: 0000000000000000f000000000000000, type: 0}
|
||||
second:
|
||||
@@ -122,11 +86,6 @@ ShaderVariantCollection:
|
||||
variants:
|
||||
- keywords:
|
||||
passType: 0
|
||||
- first: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3}
|
||||
second:
|
||||
variants:
|
||||
- keywords: _DEFERRED_FIRST_LIGHT
|
||||
passType: 0
|
||||
- first: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3}
|
||||
second:
|
||||
variants:
|
||||
@@ -140,7 +99,17 @@ ShaderVariantCollection:
|
||||
- first: {fileID: -6465566751694194690, guid: dc1a634184354e343a9a36dd032cf2bf, type: 3}
|
||||
second:
|
||||
variants:
|
||||
- keywords:
|
||||
passType: 8
|
||||
- keywords: PROCEDURAL_INSTANCING_ON
|
||||
passType: 8
|
||||
- first: {fileID: 4800000, guid: 36e335017ad71d54fbb10842863188ae, type: 3}
|
||||
second:
|
||||
variants:
|
||||
- keywords:
|
||||
passType: 13
|
||||
passType: 0
|
||||
- first: {fileID: 4800000, guid: be891319084e9d147b09d89e80ce60e0, type: 3}
|
||||
second:
|
||||
variants:
|
||||
- keywords:
|
||||
passType: 8
|
||||
|
25
Assets/NodeCanvas/SetDayNightCycle.asset
Normal file
25
Assets/NodeCanvas/SetDayNightCycle.asset
Normal file
@@ -0,0 +1,25 @@
|
||||
%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: 7a686a47eee2fa44cb0a34b5d86e4d5e, type: 3}
|
||||
m_Name: SetDayNightCycle
|
||||
m_EditorClassIdentifier:
|
||||
_serializedGraph: '{"type":"NodeCanvas.BehaviourTrees.BehaviourTree","nodes":[{"_action":{"valueA":{"_name":"Time","_targetVariableID":"8c5e871a-2681-4245-b0ff-29dd875642df"},"valueB":{"_name":"DayTime","_targetVariableID":"597f3b68-f23d-451f-ae7e-1f8014ed996b"},"$type":"NodeCanvas.Tasks.Actions.SetFloat"},"_position":{"x":428.1655,"y":239.0911},"$type":"NodeCanvas.BehaviourTrees.ActionNode"}],"connections":[],"canvasGroups":[],"localBlackboard":{"_variables":{"DayTime":{"_name":"DayTime","_id":"597f3b68-f23d-451f-ae7e-1f8014ed996b","$type":"NodeCanvas.Framework.Variable`1[[System.Single,
|
||||
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"}}},"derivedData":{"repeat":true,"$type":"NodeCanvas.BehaviourTrees.BehaviourTree+DerivedSerializationData"}}'
|
||||
_objectReferences: []
|
||||
_graphSource:
|
||||
_version: 3.29
|
||||
_category:
|
||||
_comments:
|
||||
_translation: {x: -247.00151, y: -14.459273}
|
||||
_zoomFactor: 0.989325
|
||||
_haltSerialization: 0
|
||||
_externalSerializationFile: {fileID: 0}
|
@@ -0,0 +1,63 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor.Callbacks;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
internal class JCompileLogger
|
||||
{
|
||||
private const string PACKAGE_NAME = "Jupiter - Low Poly Sky And Weather System";
|
||||
private const string PACKAGE_NAME_PLACEHOLDER = "${PACKAGE_NAME}";
|
||||
|
||||
private const string WEBSITE = "http://pinwheel.studio";
|
||||
private const string WEBSITE_PLACEHOLDER = "${WEBSITE}";
|
||||
|
||||
private const string SUPPORT_MAIL = "support@pinwheel.studio";
|
||||
private const string SUPPORT_MAIL_PLACEHOLDER = "${SUPPORT_MAIL}";
|
||||
|
||||
private const string LINK_COLOR = "blue";
|
||||
private const string LINK_COLOR_PLACEHOLDER = "${LC}";
|
||||
|
||||
private const float LOG_MESSAGE_PROBABIILITY = 0.03F;
|
||||
private static string[] messages = new string[]
|
||||
{
|
||||
"Thanks for using the ${PACKAGE_NAME}, please contact <color=${LC}>${SUPPORT_MAIL}</color> for support!",
|
||||
"Thanks for using the ${PACKAGE_NAME}, please give it a 5-stars rating and a positive review on the store!"
|
||||
};
|
||||
|
||||
//[DidReloadScripts]
|
||||
public static void ShowMessageOnCompileSucceeded()
|
||||
{
|
||||
ValidatePackageAndNamespace();
|
||||
if (Random.value < LOG_MESSAGE_PROBABIILITY)
|
||||
{
|
||||
if (messages.Length == 0)
|
||||
return;
|
||||
int msgIndex = Random.Range(0, messages.Length);
|
||||
string msg = messages[msgIndex]
|
||||
.Replace(PACKAGE_NAME_PLACEHOLDER, JVersionInfo.ProductNameAndVersionShort)
|
||||
.Replace(WEBSITE_PLACEHOLDER, WEBSITE)
|
||||
.Replace(SUPPORT_MAIL_PLACEHOLDER, SUPPORT_MAIL)
|
||||
.Replace(LINK_COLOR_PLACEHOLDER, LINK_COLOR);
|
||||
Debug.Log(msg, null);
|
||||
}
|
||||
}
|
||||
|
||||
private static void ValidatePackageAndNamespace()
|
||||
{
|
||||
bool isPackageNameInvalid = PACKAGE_NAME.Equals("PACKAGE_NAME");
|
||||
bool isNamespaceInvalid = typeof(JCompileLogger).Namespace.Contains("PACKAGE_NAME");
|
||||
if (isPackageNameInvalid)
|
||||
{
|
||||
string message = "<color=red>Invalid PACKAGE_NAME in CompileLogger, fix it before release!</color>";
|
||||
Debug.Log(message);
|
||||
}
|
||||
if (isNamespaceInvalid)
|
||||
{
|
||||
string message = "<color=red>Invalid NAMESPACE in CompileLogger, fix it before release!</color>";
|
||||
Debug.Log(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,151 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
public static class JEditorMenus
|
||||
{
|
||||
[MenuItem("GameObject/3D Object/Jupiter Sky/Sunny Day")]
|
||||
public static JSky CreateSunnyDaySky(MenuCommand cmd)
|
||||
{
|
||||
GameObject g = new GameObject("Sunny Day Sky");
|
||||
if (cmd != null && cmd.context != null)
|
||||
{
|
||||
GameObject root = cmd.context as GameObject;
|
||||
GameObjectUtility.SetParentAndAlign(g, root);
|
||||
}
|
||||
|
||||
JSky skyComponent = g.AddComponent<JSky>();
|
||||
JSkyProfile profile = JSkyProfile.CreateInstance<JSkyProfile>();
|
||||
string fileName = "SkyProfile-" + JCommon.GetUniqueID();
|
||||
string filePath = string.Format("Assets/{0}.asset", fileName);
|
||||
AssetDatabase.CreateAsset(profile, filePath);
|
||||
|
||||
profile.CopyFrom(JJupiterSettings.Instance.DefaultProfileSunnyDay);
|
||||
skyComponent.Profile = profile;
|
||||
skyComponent.MoonLightSource = null;
|
||||
|
||||
Light[] lights = Object.FindObjectsOfType<Light>();
|
||||
for (int i = 0; i < lights.Length; ++i)
|
||||
{
|
||||
if (lights[i].type == LightType.Directional)
|
||||
{
|
||||
skyComponent.SunLightSource = lights[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return skyComponent;
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/3D Object/Jupiter Sky/Starry Night")]
|
||||
public static JSky CreateStarryNightSky(MenuCommand cmd)
|
||||
{
|
||||
GameObject g = new GameObject("Starry Night Sky");
|
||||
if (cmd != null && cmd.context != null)
|
||||
{
|
||||
GameObject root = cmd.context as GameObject;
|
||||
GameObjectUtility.SetParentAndAlign(g, root);
|
||||
}
|
||||
|
||||
JSky skyComponent = g.AddComponent<JSky>();
|
||||
JSkyProfile profile = JSkyProfile.CreateInstance<JSkyProfile>();
|
||||
string fileName = "SkyProfile-" + JCommon.GetUniqueID();
|
||||
string filePath = string.Format("Assets/{0}.asset", fileName);
|
||||
AssetDatabase.CreateAsset(profile, filePath);
|
||||
|
||||
profile.CopyFrom(JJupiterSettings.Instance.DefaultProfileStarryNight);
|
||||
skyComponent.Profile = profile;
|
||||
skyComponent.SunLightSource = null;
|
||||
|
||||
Light[] lights = Object.FindObjectsOfType<Light>();
|
||||
for (int i = 0; i < lights.Length; ++i)
|
||||
{
|
||||
if (lights[i].type == LightType.Directional)
|
||||
{
|
||||
skyComponent.MoonLightSource = lights[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return skyComponent;
|
||||
}
|
||||
|
||||
[MenuItem("Window/Jupiter/Tools/Cubemap Creator")]
|
||||
public static void ShowCubemapCreator()
|
||||
{
|
||||
JCubemapCreatorWindow.ShowWindow();
|
||||
}
|
||||
|
||||
[MenuItem("Window/Jupiter/Project/Settings")]
|
||||
public static void ShowSettings()
|
||||
{
|
||||
Selection.activeObject = JJupiterSettings.Instance;
|
||||
}
|
||||
|
||||
[MenuItem("Window/Jupiter/Project/Version Info")]
|
||||
public static void ShowVersionInfo()
|
||||
{
|
||||
EditorUtility.DisplayDialog(
|
||||
"Version Info",
|
||||
JVersionInfo.ProductNameAndVersion,
|
||||
"OK");
|
||||
}
|
||||
|
||||
[MenuItem("Window/Jupiter/Project/Update Dependencies")]
|
||||
public static void UpdateDependencies()
|
||||
{
|
||||
JPackageInitializer.Init();
|
||||
}
|
||||
|
||||
[MenuItem("Window/Jupiter/Learning Resources/Youtube Channel")]
|
||||
public static void ShowYoutubeChannel()
|
||||
{
|
||||
Application.OpenURL(JCommon.YOUTUBE_CHANNEL);
|
||||
}
|
||||
|
||||
[MenuItem("Window/Jupiter/Learning Resources/Online Manual")]
|
||||
public static void ShowOnlineManual()
|
||||
{
|
||||
Application.OpenURL(JCommon.ONLINE_MANUAL);
|
||||
}
|
||||
|
||||
[MenuItem("Window/Jupiter/Community/Forum")]
|
||||
public static void ShowForum()
|
||||
{
|
||||
Application.OpenURL(JCommon.FORUM);
|
||||
}
|
||||
|
||||
[MenuItem("Window/Jupiter/Community/Discord")]
|
||||
public static void ShowDiscord()
|
||||
{
|
||||
Application.OpenURL(JCommon.DISCORD);
|
||||
}
|
||||
|
||||
[MenuItem("Window/Jupiter/Contact/Support")]
|
||||
public static void ShowSupportEmailEditor()
|
||||
{
|
||||
JEditorCommon.OpenEmailEditor(
|
||||
JCommon.SUPPORT_EMAIL,
|
||||
"[Jupiter] SHORT_QUESTION_HERE",
|
||||
"YOUR_QUESTION_IN_DETAIL");
|
||||
}
|
||||
|
||||
[MenuItem("Window/Jupiter/Contact/Business")]
|
||||
public static void ShowBusinessEmailEditor()
|
||||
{
|
||||
JEditorCommon.OpenEmailEditor(
|
||||
JCommon.BUSINESS_EMAIL,
|
||||
"[Jupiter] SHORT_MESSAGE_HERE",
|
||||
"YOUR_MESSAGE_IN_DETAIL");
|
||||
}
|
||||
|
||||
[MenuItem("Window/Jupiter/Leave a Review")]
|
||||
public static void OpenStorePage()
|
||||
{
|
||||
Application.OpenURL("http://u3d.as/1Hry");
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,124 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Callbacks;
|
||||
using System;
|
||||
using UnityEditor.PackageManager;
|
||||
using UnityEditor.PackageManager.Requests;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
public static class JPackageInitializer
|
||||
{
|
||||
public delegate void InitCompletedHandler();
|
||||
public static event InitCompletedHandler Completed;
|
||||
|
||||
public static string JUPITER_KW = "JUPITER";
|
||||
|
||||
private static ListRequest listPackageRequest = null;
|
||||
|
||||
#pragma warning disable 0414
|
||||
|
||||
#pragma warning restore 0414
|
||||
|
||||
[DidReloadScripts]
|
||||
public static void Init()
|
||||
{
|
||||
CheckThirdPartyPackages();
|
||||
CheckUnityPackagesAndInit();
|
||||
}
|
||||
|
||||
private static void CheckThirdPartyPackages()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private static void CheckUnityPackagesAndInit()
|
||||
{
|
||||
listPackageRequest = Client.List(true);
|
||||
EditorApplication.update += OnRequestingPackageList;
|
||||
}
|
||||
|
||||
private static void OnRequestingPackageList()
|
||||
{
|
||||
if (listPackageRequest == null)
|
||||
return;
|
||||
if (!listPackageRequest.IsCompleted)
|
||||
return;
|
||||
if (listPackageRequest.Error != null)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (UnityEditor.PackageManager.PackageInfo p in listPackageRequest.Result)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
EditorApplication.update -= OnRequestingPackageList;
|
||||
InitPackage();
|
||||
}
|
||||
|
||||
private static void InitPackage()
|
||||
{
|
||||
BuildTarget buildTarget = EditorUserBuildSettings.activeBuildTarget;
|
||||
BuildTargetGroup buildGroup = BuildPipeline.GetBuildTargetGroup(buildTarget);
|
||||
|
||||
string symbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(buildGroup);
|
||||
List<string> symbolList = new List<string>(symbols.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries));
|
||||
|
||||
bool isDirty = false;
|
||||
if (!symbolList.Contains(JUPITER_KW))
|
||||
{
|
||||
symbolList.Add(JUPITER_KW);
|
||||
isDirty = true;
|
||||
}
|
||||
|
||||
if (isDirty)
|
||||
{
|
||||
symbols = symbolList.ListElementsToString(";");
|
||||
PlayerSettings.SetScriptingDefineSymbolsForGroup(buildGroup, symbols);
|
||||
}
|
||||
|
||||
if (Completed != null)
|
||||
{
|
||||
Completed.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
private static bool SetKeywordActive(List<string> kwList, string keyword, bool active)
|
||||
{
|
||||
bool isDirty = false;
|
||||
if (active && !kwList.Contains(keyword))
|
||||
{
|
||||
kwList.Add(keyword);
|
||||
isDirty = true;
|
||||
}
|
||||
else if (!active && kwList.Contains(keyword))
|
||||
{
|
||||
kwList.RemoveAll(s => s.Equals(keyword));
|
||||
isDirty = true;
|
||||
}
|
||||
return isDirty;
|
||||
}
|
||||
|
||||
public static List<System.Type> GetAllLoadedTypes()
|
||||
{
|
||||
List<System.Type> loadedTypes = new List<System.Type>();
|
||||
List<string> typeName = new List<string>();
|
||||
foreach (var assembly in System.AppDomain.CurrentDomain.GetAssemblies())
|
||||
{
|
||||
foreach (var t in assembly.GetTypes())
|
||||
{
|
||||
if (t.IsVisible && !t.IsGenericType)
|
||||
{
|
||||
typeName.Add(t.Name);
|
||||
loadedTypes.Add(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
return loadedTypes;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,361 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
[CustomEditor(typeof(JSky))]
|
||||
public class JSkyInspector : Editor
|
||||
{
|
||||
private JSky sky;
|
||||
private JSkyProfile profile;
|
||||
private JDayNightCycle dnc;
|
||||
|
||||
private const string DNC_LABEL = "Controlled by Day Night Cycle";
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
sky = target as JSky;
|
||||
profile = sky.Profile;
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
sky.Profile = JEditorCommon.ScriptableObjectField<JSkyProfile>("Profile", sky.Profile);
|
||||
profile = sky.Profile;
|
||||
if (sky.Profile == null)
|
||||
return;
|
||||
dnc = sky.GetComponent<JDayNightCycle>();
|
||||
|
||||
DrawSceneReferencesGUI();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
DrawSkyGUI();
|
||||
DrawStarsGUI();
|
||||
DrawSunGUI();
|
||||
DrawMoonGUI();
|
||||
DrawHorizonCloudGUI();
|
||||
DrawOverheadCloudGUI();
|
||||
DrawDetailOverlayGUI();
|
||||
DrawUtilitiesGUI();
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
profile.UpdateMaterialProperties();
|
||||
EditorUtility.SetDirty(sky);
|
||||
EditorUtility.SetDirty(profile);
|
||||
}
|
||||
|
||||
DrawAddDayNightCycleGUI();
|
||||
}
|
||||
|
||||
private void DrawSceneReferencesGUI()
|
||||
{
|
||||
string label = "Scene References";
|
||||
string id = "scene-references";
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
sky.SunLightSource = EditorGUILayout.ObjectField("Sun Light Source", sky.SunLightSource, typeof(Light), true) as Light;
|
||||
sky.MoonLightSource = EditorGUILayout.ObjectField("Moon Light Source", sky.MoonLightSource, typeof(Light), true) as Light;
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawSkyGUI()
|
||||
{
|
||||
string label = "Sky";
|
||||
string id = "sky" + profile.GetInstanceID(); ;
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
profile.SkyColor = ColorField("Sky Color", profile.SkyColor, true, true, true, nameof(profile.SkyColor));
|
||||
profile.HorizonColor = ColorField("Horizon Color", profile.HorizonColor, true, true, true, nameof(profile.HorizonColor));
|
||||
profile.GroundColor = ColorField("Ground Color", profile.GroundColor, true, true, true, nameof(profile.GroundColor));
|
||||
if (profile.AllowStepEffect)
|
||||
{
|
||||
profile.HorizonStep = EditorGUILayout.IntField("Horizon Step", profile.HorizonStep);
|
||||
}
|
||||
profile.HorizonExponent = FloatField("Horizon Exponent", profile.HorizonExponent, nameof(profile.HorizonExponent));
|
||||
profile.HorizonThickness = Slider("Horizon Thickness", profile.HorizonThickness, 0f, 1f, nameof(profile.HorizonThickness));
|
||||
profile.FogSyncOption = (JFogSyncOption)EditorGUILayout.EnumPopup("Fog Sync", profile.FogSyncOption);
|
||||
if (profile.FogSyncOption == JFogSyncOption.CustomColor)
|
||||
{
|
||||
profile.FogColor = ColorField("Fog Color", profile.FogColor, true, true, false, nameof(profile.FogColor));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawStarsGUI()
|
||||
{
|
||||
string label = "Stars";
|
||||
string id = "stars" + profile.GetInstanceID(); ;
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
profile.EnableStars = EditorGUILayout.Toggle("Enable", profile.EnableStars);
|
||||
if (profile.EnableStars)
|
||||
{
|
||||
profile.UseBakedStars = EditorGUILayout.Toggle("Baked", profile.UseBakedStars);
|
||||
}
|
||||
if (profile.EnableStars && !profile.UseBakedStars)
|
||||
{
|
||||
profile.StarsStartPosition = Slider("Start", profile.StarsStartPosition, -1, 1, nameof(profile.StarsStartPosition));
|
||||
profile.StarsEndPosition = Slider("End", profile.StarsEndPosition, -1, 1, nameof(profile.StarsEndPosition));
|
||||
profile.StarsOpacity = Slider("Opacity", profile.StarsOpacity, 0f, 1f, nameof(profile.StarsOpacity));
|
||||
profile.StarsLayerCount = EditorGUILayout.DelayedIntField("Layers", profile.StarsLayerCount);
|
||||
|
||||
if (profile.StarsLayerCount > 0)
|
||||
{
|
||||
JEditorCommon.Separator();
|
||||
EditorGUILayout.LabelField("Layer 0");
|
||||
EditorGUI.indentLevel += 1;
|
||||
profile.StarsColor0 = ColorField("Color", profile.StarsColor0, true, true, true, nameof(profile.StarsColor0));
|
||||
profile.StarsDensity0 = Slider("Density", profile.StarsDensity0, 0.01f, 1f, nameof(profile.StarsDensity0));
|
||||
profile.StarsSize0 = Slider("Size", profile.StarsSize0, 0.01f, 1f, nameof(profile.StarsSize0));
|
||||
profile.StarsGlow0 = Slider("Glow", profile.StarsGlow0, 0f, 1f, nameof(profile.StarsGlow0));
|
||||
profile.StarsTwinkle0 = FloatField("Twinkle", profile.StarsTwinkle0, nameof(profile.StarsTwinkle0));
|
||||
EditorGUI.indentLevel -= 1;
|
||||
}
|
||||
|
||||
if (profile.StarsLayerCount > 1)
|
||||
{
|
||||
JEditorCommon.Separator();
|
||||
EditorGUILayout.LabelField("Layer 1");
|
||||
EditorGUI.indentLevel += 1;
|
||||
profile.StarsColor1 = ColorField("Color", profile.StarsColor1, true, true, true, nameof(profile.StarsColor1));
|
||||
profile.StarsDensity1 = Slider("Density", profile.StarsDensity1, 0.01f, 1f, nameof(profile.StarsDensity1));
|
||||
profile.StarsSize1 = Slider("Size", profile.StarsSize1, 0.01f, 1f, nameof(profile.StarsSize1));
|
||||
profile.StarsGlow1 = Slider("Glow", profile.StarsGlow1, 0f, 1f, nameof(profile.StarsGlow1));
|
||||
profile.StarsTwinkle1 = FloatField("Twinkle", profile.StarsTwinkle1, nameof(profile.StarsTwinkle1));
|
||||
EditorGUI.indentLevel -= 1;
|
||||
}
|
||||
|
||||
if (profile.StarsLayerCount > 2)
|
||||
{
|
||||
JEditorCommon.Separator();
|
||||
EditorGUILayout.LabelField("Layer 2");
|
||||
EditorGUI.indentLevel += 1;
|
||||
profile.StarsColor2 = ColorField("Color", profile.StarsColor2, true, true, true, nameof(profile.StarsColor2));
|
||||
profile.StarsDensity2 = Slider("Density", profile.StarsDensity2, 0.01f, 1f, nameof(profile.StarsDensity2));
|
||||
profile.StarsSize2 = Slider("Size", profile.StarsSize2, 0.01f, 1f, nameof(profile.StarsSize2));
|
||||
profile.StarsGlow2 = Slider("Glow", profile.StarsGlow2, 0f, 1f, nameof(profile.StarsGlow2));
|
||||
profile.StarsTwinkle2 = FloatField("Twinkle", profile.StarsTwinkle2, nameof(profile.StarsTwinkle2));
|
||||
EditorGUI.indentLevel -= 1;
|
||||
}
|
||||
}
|
||||
if (profile.EnableStars && profile.UseBakedStars)
|
||||
{
|
||||
profile.StarsCubemap = JEditorCommon.InlineCubemapField("Cubemap", profile.StarsCubemap, -1);
|
||||
profile.StarsTwinkleMap = JEditorCommon.InlineTexture2DField("Twinkle Map", profile.StarsTwinkleMap, -1);
|
||||
profile.StarsOpacity = Slider("Opacity", profile.StarsOpacity, 0f, 1f, nameof(profile.StarsOpacity));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawSunGUI()
|
||||
{
|
||||
string label = "Sun";
|
||||
string id = "sun" + profile.GetInstanceID(); ;
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
profile.EnableSun = EditorGUILayout.Toggle("Enable", profile.EnableSun);
|
||||
if (profile.EnableSun)
|
||||
{
|
||||
profile.UseBakedSun = EditorGUILayout.Toggle("Baked", profile.UseBakedSun);
|
||||
}
|
||||
if (profile.EnableSun && !profile.UseBakedSun)
|
||||
{
|
||||
profile.SunTexture = JEditorCommon.InlineTexture2DField("Texture", profile.SunTexture, -1);
|
||||
profile.SunColor = ColorField("Color", profile.SunColor, true, true, true, nameof(profile.SunColor));
|
||||
profile.SunSize = Slider("Size", profile.SunSize, 0f, 1f, nameof(profile.SunSize));
|
||||
profile.SunSoftEdge = Slider("Soft Edge", profile.SunSoftEdge, 0f, 1f, nameof(profile.SunSoftEdge));
|
||||
profile.SunGlow = Slider("Glow", profile.SunGlow, 0f, 1f, nameof(profile.SunGlow));
|
||||
}
|
||||
if (profile.EnableSun && profile.UseBakedSun)
|
||||
{
|
||||
profile.SunCubemap = JEditorCommon.InlineCubemapField("Cubemap", profile.SunCubemap, -1);
|
||||
}
|
||||
if (profile.EnableSun)
|
||||
{
|
||||
profile.SunLightColor = ColorField("Light Color", profile.SunLightColor, true, false, false, nameof(profile.SunLightColor));
|
||||
profile.SunLightIntensity = FloatField("Light Intensity", profile.SunLightIntensity, nameof(profile.SunLightIntensity));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawMoonGUI()
|
||||
{
|
||||
string label = "Moon";
|
||||
string id = "moon" + profile.GetInstanceID(); ;
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
profile.EnableMoon = EditorGUILayout.Toggle("Enable", profile.EnableMoon);
|
||||
if (profile.EnableMoon)
|
||||
{
|
||||
profile.UseBakedMoon = EditorGUILayout.Toggle("Baked", profile.UseBakedMoon);
|
||||
}
|
||||
if (profile.EnableMoon && !profile.UseBakedMoon)
|
||||
{
|
||||
profile.MoonTexture = JEditorCommon.InlineTexture2DField("Texture", profile.MoonTexture, -1);
|
||||
profile.MoonColor = ColorField("Color", profile.MoonColor, true, true, true, nameof(profile.MoonColor));
|
||||
profile.MoonSize = Slider("Size", profile.MoonSize, 0f, 1f, nameof(profile.MoonSize));
|
||||
profile.MoonSoftEdge = Slider("Soft Edge", profile.MoonSoftEdge, 0f, 1f, nameof(profile.MoonSoftEdge));
|
||||
profile.MoonGlow = Slider("Glow", profile.MoonGlow, 0f, 1f, nameof(profile.MoonGlow));
|
||||
}
|
||||
if (profile.EnableMoon && profile.UseBakedMoon)
|
||||
{
|
||||
profile.MoonCubemap = JEditorCommon.InlineCubemapField("Cubemap", profile.MoonCubemap, -1);
|
||||
}
|
||||
if (profile.EnableMoon)
|
||||
{
|
||||
profile.MoonLightColor = ColorField("Light Color", profile.MoonLightColor, true, false, false, nameof(profile.MoonLightColor));
|
||||
profile.MoonLightIntensity = FloatField("Light Intensity", profile.MoonLightIntensity, nameof(profile.MoonLightIntensity));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawHorizonCloudGUI()
|
||||
{
|
||||
string label = "Horizon Cloud";
|
||||
string id = "horizon-cloud" + profile.GetInstanceID(); ;
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
profile.EnableHorizonCloud = EditorGUILayout.Toggle("Enable", profile.EnableHorizonCloud);
|
||||
if (profile.EnableHorizonCloud)
|
||||
{
|
||||
profile.CustomCloudTexture = JEditorCommon.InlineTexture2DField("Texture", profile.CustomCloudTexture, -1);
|
||||
profile.HorizonCloudColor = ColorField("Color", profile.HorizonCloudColor, true, true, false, nameof(profile.HorizonCloudColor));
|
||||
profile.HorizonCloudStartPosition = Slider("Start", profile.HorizonCloudStartPosition, -1, 1, nameof(profile.HorizonCloudStartPosition));
|
||||
profile.HorizonCloudEndPosition = Slider("End", profile.HorizonCloudEndPosition, -1, 1, nameof(profile.HorizonCloudEndPosition));
|
||||
profile.HorizonCloudSize = FloatField("Size", profile.HorizonCloudSize, nameof(profile.HorizonCloudSize));
|
||||
if (profile.AllowStepEffect)
|
||||
{
|
||||
profile.HorizonCloudStep = EditorGUILayout.IntField("Step", profile.HorizonCloudStep);
|
||||
}
|
||||
profile.HorizonCloudAnimationSpeed = FloatField("Animation Speed", profile.HorizonCloudAnimationSpeed, nameof(profile.HorizonCloudAnimationSpeed));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawOverheadCloudGUI()
|
||||
{
|
||||
string label = "Overhead Cloud";
|
||||
string id = "overhead-cloud" + profile.GetInstanceID(); ;
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
profile.EnableOverheadCloud = EditorGUILayout.Toggle("Enable", profile.EnableOverheadCloud);
|
||||
if (profile.EnableOverheadCloud)
|
||||
{
|
||||
profile.CustomCloudTexture = JEditorCommon.InlineTexture2DField("Texture", profile.CustomCloudTexture, -1);
|
||||
profile.OverheadCloudColor = ColorField("Color", profile.OverheadCloudColor, true, true, false, nameof(profile.OverheadCloudColor));
|
||||
profile.OverheadCloudAltitude = FloatField("Altitude", profile.OverheadCloudAltitude, nameof(profile.OverheadCloudAltitude));
|
||||
profile.OverheadCloudSize = FloatField("Size", profile.OverheadCloudSize, nameof(profile.OverheadCloudSize));
|
||||
if (profile.AllowStepEffect)
|
||||
{
|
||||
profile.OverheadCloudStep = EditorGUILayout.IntField("Step", profile.OverheadCloudStep);
|
||||
}
|
||||
profile.OverheadCloudAnimationSpeed = FloatField("Animation Speed", profile.OverheadCloudAnimationSpeed, nameof(profile.OverheadCloudAnimationSpeed));
|
||||
profile.OverheadCloudFlowDirectionX = Slider("Flow X", profile.OverheadCloudFlowDirectionX, -1, 1, nameof(profile.OverheadCloudFlowDirectionX));
|
||||
profile.OverheadCloudFlowDirectionZ = Slider("Flow Z", profile.OverheadCloudFlowDirectionZ, -1, 1, nameof(profile.OverheadCloudFlowDirectionZ));
|
||||
profile.OverheadCloudRemapMin = FloatField("Remap Min", profile.OverheadCloudRemapMin, nameof(profile.OverheadCloudRemapMin));
|
||||
profile.OverheadCloudRemapMax = FloatField("Remap Max", profile.OverheadCloudRemapMax, nameof(profile.OverheadCloudRemapMax));
|
||||
profile.OverheadCloudCastShadow = EditorGUILayout.Toggle("Cast Shadow (Experimental)", profile.OverheadCloudCastShadow);
|
||||
if (profile.OverheadCloudCastShadow)
|
||||
{
|
||||
profile.OverheadCloudShadowClipMask = EditorGUILayout.Slider("Clip Mask", profile.OverheadCloudShadowClipMask, 0f, 1f);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawDetailOverlayGUI()
|
||||
{
|
||||
string label = "Detail Overlay";
|
||||
string id = "detail-overlay" + profile.GetInstanceID(); ;
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
profile.EnableDetailOverlay = EditorGUILayout.Toggle("Enable", profile.EnableDetailOverlay);
|
||||
if (profile.EnableDetailOverlay)
|
||||
{
|
||||
profile.DetailOverlayTintColor = ColorField("Color", profile.DetailOverlayTintColor, true, true, false, nameof(profile.DetailOverlayTintColor));
|
||||
profile.DetailOverlayCubeMap = JEditorCommon.InlineCubemapField("Cubemap", profile.DetailOverlayCubeMap, -1);
|
||||
profile.DetailOverlayLayer = (JDetailOverlayLayer)EditorGUILayout.EnumPopup("Layer", profile.DetailOverlayLayer);
|
||||
profile.DetailOverlayRotationSpeed = FloatField("Rotation Speed", profile.DetailOverlayRotationSpeed, nameof(profile.DetailOverlayRotationSpeed));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawUtilitiesGUI()
|
||||
{
|
||||
string label = "Utilities";
|
||||
string id = "utilities" + profile.GetInstanceID(); ;
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
profile.AllowStepEffect = EditorGUILayout.Toggle("Allow Step Effect", profile.AllowStepEffect);
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawAddDayNightCycleGUI()
|
||||
{
|
||||
JDayNightCycle cycle = sky.GetComponent<JDayNightCycle>();
|
||||
if (cycle != null)
|
||||
return;
|
||||
|
||||
string label = "Day Night Cycle";
|
||||
string id = "day-night-cycle" + sky.GetInstanceID();
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
if (GUILayout.Button("Add Day Night Cycle"))
|
||||
{
|
||||
sky.gameObject.AddComponent<JDayNightCycle>();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private Color ColorField(string label, Color color, bool colorPicker, bool alpha, bool hdr, string propName)
|
||||
{
|
||||
if (dnc != null && dnc.enabled == true && dnc.Profile != null && dnc.Profile.ContainProperty(propName))
|
||||
{
|
||||
EditorGUILayout.LabelField(label, DNC_LABEL, JEditorCommon.ItalicLabel);
|
||||
return color;
|
||||
}
|
||||
else
|
||||
{
|
||||
return EditorGUILayout.ColorField(new GUIContent(label), color, colorPicker, alpha, hdr);
|
||||
}
|
||||
}
|
||||
|
||||
private float FloatField(string label, float value, string propName)
|
||||
{
|
||||
if (dnc != null && dnc.enabled == true && dnc.Profile != null && dnc.Profile.ContainProperty(propName))
|
||||
{
|
||||
EditorGUILayout.LabelField(label, DNC_LABEL, JEditorCommon.ItalicLabel);
|
||||
return value;
|
||||
}
|
||||
else
|
||||
{
|
||||
return EditorGUILayout.FloatField(label, value);
|
||||
}
|
||||
}
|
||||
|
||||
private float Slider(string label, float value, float min, float max, string propName)
|
||||
{
|
||||
if (dnc != null && dnc.enabled == true && dnc.Profile != null && dnc.Profile.ContainProperty(propName))
|
||||
{
|
||||
EditorGUILayout.LabelField(label, DNC_LABEL, JEditorCommon.ItalicLabel);
|
||||
return value;
|
||||
}
|
||||
else
|
||||
{
|
||||
return EditorGUILayout.Slider(label, value, min, max);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
[CustomEditor(typeof(JSkyProfile))]
|
||||
public class JSkyProfileInspector : Editor
|
||||
{
|
||||
private JSkyProfile instance;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
instance = target as JSkyProfile;
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
EditorGUILayout.LabelField("Select the sky object in the scene to edit this profile.", JEditorCommon.WordWrapItalicLabel);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,394 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using System.Reflection;
|
||||
using System;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
[CustomEditor(typeof(JDayNightCycle))]
|
||||
public class JDayNightCycleInspector : Editor
|
||||
{
|
||||
private static List<JAnimatedProperty> allProperties;
|
||||
private static List<JAnimatedProperty> AllProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
if (allProperties == null)
|
||||
{
|
||||
allProperties = new List<JAnimatedProperty>();
|
||||
}
|
||||
return allProperties;
|
||||
}
|
||||
set
|
||||
{
|
||||
allProperties = value;
|
||||
}
|
||||
}
|
||||
|
||||
static JDayNightCycleInspector()
|
||||
{
|
||||
InitAllAnimatableProperties();
|
||||
}
|
||||
|
||||
private static void InitAllAnimatableProperties()
|
||||
{
|
||||
AllProperties.Clear();
|
||||
Type type = typeof(JSkyProfile);
|
||||
PropertyInfo[] props = type.GetProperties();
|
||||
for (int i = 0; i < props.Length; ++i)
|
||||
{
|
||||
Attribute att = props[i].GetCustomAttribute(typeof(JAnimatableAttribute));
|
||||
if (att != null)
|
||||
{
|
||||
JAnimatableAttribute animAtt = att as JAnimatableAttribute;
|
||||
AllProperties.Add(JAnimatedProperty.Create(props[i].Name, animAtt.DisplayName, animAtt.CurveOrGradient));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private JDayNightCycle cycle;
|
||||
private JDayNightCycleProfile profile;
|
||||
bool isTimeFoldoutExpanded;
|
||||
|
||||
private static readonly int[] resolutionValues = new int[]
|
||||
{
|
||||
16,32,64,128,256,512,1024,2048
|
||||
};
|
||||
|
||||
private static readonly string[] resolutionLabels = new string[]
|
||||
{
|
||||
"16","32","64","128","256","512","1024","2048"
|
||||
};
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
cycle = target as JDayNightCycle;
|
||||
profile = cycle.Profile;
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
EditorGUI.BeginChangeCheck();
|
||||
cycle.Profile = JEditorCommon.ScriptableObjectField<JDayNightCycleProfile>("Profile", cycle.Profile);
|
||||
profile = cycle.Profile;
|
||||
if (cycle.Profile == null)
|
||||
return;
|
||||
|
||||
DrawSceneReferencesGUI();
|
||||
DrawTimeGUI();
|
||||
DrawSkyGUI();
|
||||
DrawStarsGUI();
|
||||
DrawSunGUI();
|
||||
DrawMoonGUI();
|
||||
DrawHorizonCloudGUI();
|
||||
DrawOverheadCloudGUI();
|
||||
DrawDetailOverlayGUI();
|
||||
DrawEnvironmentReflectionGUI();
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
EditorUtility.SetDirty(cycle);
|
||||
EditorUtility.SetDirty(profile);
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawSceneReferencesGUI()
|
||||
{
|
||||
string label = "Scene References";
|
||||
string id = "scene-ref" + cycle.GetInstanceID();
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
cycle.Sky = EditorGUILayout.ObjectField("Sky", cycle.Sky, typeof(JSky), true) as JSky;
|
||||
cycle.SunOrbitPivot = EditorGUILayout.ObjectField("Orbit Pivot", cycle.SunOrbitPivot, typeof(Transform), true) as Transform;
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawTimeGUI()
|
||||
{
|
||||
string label = "Time";
|
||||
string id = "time" + cycle.GetInstanceID();
|
||||
|
||||
isTimeFoldoutExpanded = JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
cycle.StartTime = EditorGUILayout.FloatField("Start Time", cycle.StartTime);
|
||||
cycle.TimeIncrement = EditorGUILayout.FloatField("Time Increment", cycle.TimeIncrement);
|
||||
GUI.enabled = !cycle.AutoTimeIncrement;
|
||||
cycle.Time = EditorGUILayout.Slider("Time", cycle.Time, 0f, 24f);
|
||||
GUI.enabled = true;
|
||||
cycle.AutoTimeIncrement = EditorGUILayout.Toggle("Auto", cycle.AutoTimeIncrement);
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawSkyGUI()
|
||||
{
|
||||
string label = "Sky";
|
||||
string id = "sky" + profile.GetInstanceID();
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
DisplayAddedProperties("Sky");
|
||||
if (GUILayout.Button("Add"))
|
||||
{
|
||||
DisplayAllPropertiesAsContext("Sky");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawStarsGUI()
|
||||
{
|
||||
string label = "Stars";
|
||||
string id = "stars" + profile.GetInstanceID();
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
DisplayAddedProperties("Stars");
|
||||
if (GUILayout.Button("Add"))
|
||||
{
|
||||
DisplayAllPropertiesAsContext("Stars");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawSunGUI()
|
||||
{
|
||||
string label = "Sun";
|
||||
string id = "sun" + profile.GetInstanceID();
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
cycle.UseSunPivot = EditorGUILayout.Toggle("Custom Pivot", cycle.UseSunPivot);
|
||||
if (cycle.UseSunPivot)
|
||||
{
|
||||
cycle.SunOrbitPivot = EditorGUILayout.ObjectField("Pivot", cycle.SunOrbitPivot, typeof(Transform), true) as Transform;
|
||||
}
|
||||
JEditorCommon.Separator();
|
||||
|
||||
DisplayAddedProperties("Sun");
|
||||
if (GUILayout.Button("Add"))
|
||||
{
|
||||
DisplayAllPropertiesAsContext("Sun");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawMoonGUI()
|
||||
{
|
||||
string label = "Moon";
|
||||
string id = "moon" + profile.GetInstanceID();
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
cycle.UseMoonPivot = EditorGUILayout.Toggle("Custom Pivot", cycle.UseMoonPivot);
|
||||
if (cycle.UseMoonPivot)
|
||||
{
|
||||
cycle.MoonOrbitPivot = EditorGUILayout.ObjectField("Pivot", cycle.MoonOrbitPivot, typeof(Transform), true) as Transform;
|
||||
}
|
||||
JEditorCommon.Separator();
|
||||
|
||||
DisplayAddedProperties("Moon");
|
||||
if (GUILayout.Button("Add"))
|
||||
{
|
||||
DisplayAllPropertiesAsContext("Moon");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawHorizonCloudGUI()
|
||||
{
|
||||
string label = "Horizon Cloud";
|
||||
string id = "horizon-cloud" + profile.GetInstanceID();
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
DisplayAddedProperties("Horizon Cloud");
|
||||
if (GUILayout.Button("Add"))
|
||||
{
|
||||
DisplayAllPropertiesAsContext("Horizon Cloud");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawOverheadCloudGUI()
|
||||
{
|
||||
string label = "Overhead Cloud";
|
||||
string id = "overhead-cloud" + profile.GetInstanceID();
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
DisplayAddedProperties("Overhead Cloud");
|
||||
if (GUILayout.Button("Add"))
|
||||
{
|
||||
DisplayAllPropertiesAsContext("Overhead Cloud");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawDetailOverlayGUI()
|
||||
{
|
||||
string label = "Detail Overlay";
|
||||
string id = "detail-overlay" + profile.GetInstanceID();
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
DisplayAddedProperties("Detail Overlay");
|
||||
if (GUILayout.Button("Add"))
|
||||
{
|
||||
DisplayAllPropertiesAsContext("Detail Overlay");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void DrawEnvironmentReflectionGUI()
|
||||
{
|
||||
string label = "Environment Reflection";
|
||||
string id = "env-reflection";
|
||||
|
||||
JEditorCommon.Foldout(label, false, id, () =>
|
||||
{
|
||||
cycle.ShouldUpdateEnvironmentReflection = EditorGUILayout.Toggle("Enable", cycle.ShouldUpdateEnvironmentReflection);
|
||||
if (cycle.ShouldUpdateEnvironmentReflection)
|
||||
{
|
||||
cycle.EnvironmentReflectionResolution = EditorGUILayout.IntPopup("Resolution", cycle.EnvironmentReflectionResolution, resolutionLabels, resolutionValues);
|
||||
cycle.EnvironmentReflectionTimeSlicingMode = (ReflectionProbeTimeSlicingMode)EditorGUILayout.EnumPopup("Time Slicing", cycle.EnvironmentReflectionTimeSlicingMode);
|
||||
EditorGUILayout.LabelField("Realtime Reflection Probe must be enabled in Quality Settings.", JEditorCommon.WordWrapItalicLabel);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void DisplayAddedProperties(string group)
|
||||
{
|
||||
EditorGUI.indentLevel -= 1;
|
||||
JAnimatedProperty toRemoveProp = null;
|
||||
List<JAnimatedProperty> props = profile.AnimatedProperties.FindAll(p => p.DisplayName.StartsWith(group));
|
||||
for (int i = 0; i < props.Count; ++i)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
JAnimatedProperty p = props[i];
|
||||
if (GUILayout.Button("▬", EditorStyles.miniLabel, GUILayout.Width(12)))
|
||||
{
|
||||
toRemoveProp = p;
|
||||
}
|
||||
|
||||
string itemLabel = p.DisplayName.Substring(p.DisplayName.IndexOf("/") + 1);
|
||||
itemLabel = ObjectNames.NicifyVariableName(itemLabel);
|
||||
if (p.CurveOrGradient == JCurveOrGradient.Curve)
|
||||
{
|
||||
p.Curve = EditorGUILayout.CurveField(itemLabel, p.Curve);
|
||||
}
|
||||
else
|
||||
{
|
||||
p.Gradient = EditorGUILayout.GradientField(new GUIContent(itemLabel), p.Gradient, true);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
if (props.Count > 0)
|
||||
{
|
||||
JEditorCommon.Separator();
|
||||
}
|
||||
|
||||
if (toRemoveProp != null)
|
||||
{
|
||||
profile.AnimatedProperties.Remove(toRemoveProp);
|
||||
}
|
||||
EditorGUI.indentLevel += 1;
|
||||
}
|
||||
|
||||
private void DisplayAllPropertiesAsContext(string group)
|
||||
{
|
||||
GenericMenu menu = new GenericMenu();
|
||||
List<JAnimatedProperty> props = AllProperties.FindAll(p => p.DisplayName.StartsWith(group));
|
||||
if (props.Count == 0)
|
||||
{
|
||||
menu.AddDisabledItem(new GUIContent("No item found"));
|
||||
menu.ShowAsContext();
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < props.Count; ++i)
|
||||
{
|
||||
JAnimatedProperty p = props[i];
|
||||
string itemLabel = p.DisplayName.Substring(p.DisplayName.IndexOf("/") + 1);
|
||||
bool added = profile.AnimatedProperties.FindIndex(p0 => p0.Name.Equals(p.Name)) >= 0;
|
||||
|
||||
if (added)
|
||||
{
|
||||
menu.AddDisabledItem(new GUIContent(itemLabel));
|
||||
}
|
||||
else
|
||||
{
|
||||
menu.AddItem(
|
||||
new GUIContent(itemLabel),
|
||||
false,
|
||||
() =>
|
||||
{
|
||||
profile.AddProperty(p);
|
||||
});
|
||||
}
|
||||
}
|
||||
menu.ShowAsContext();
|
||||
}
|
||||
|
||||
public override bool RequiresConstantRepaint()
|
||||
{
|
||||
return isTimeFoldoutExpanded;
|
||||
}
|
||||
|
||||
private void OnSceneGUI()
|
||||
{
|
||||
if (cycle == null)
|
||||
return;
|
||||
|
||||
float evalTime = Mathf.InverseLerp(0f, 24f, cycle.Time);
|
||||
|
||||
if (cycle.Sky.Profile.EnableSun && cycle.Sky.SunLightSource != null)
|
||||
{
|
||||
Color c = cycle.Sky.Profile.SunColor;
|
||||
c.a = Mathf.Max(0.1f, c.a);
|
||||
|
||||
Transform pivot = (cycle.UseSunPivot && cycle.SunOrbitPivot != null) ? cycle.SunOrbitPivot : cycle.transform;
|
||||
Vector3 normal = pivot.right;
|
||||
Handles.color = c;
|
||||
float radius = 10;
|
||||
Handles.DrawWireDisc(pivot.position, normal, radius);
|
||||
|
||||
float angle = evalTime * 360f;
|
||||
Matrix4x4 localRotationMatrix = Matrix4x4.Rotate(Quaternion.Euler(angle, 0, 0));
|
||||
Vector3 localDirection = localRotationMatrix.MultiplyVector(Vector3.up);
|
||||
|
||||
Matrix4x4 localToWorld = pivot.localToWorldMatrix;
|
||||
Vector3 worldDirection = localToWorld.MultiplyVector(localDirection);
|
||||
|
||||
Vector3 worldPos = pivot.transform.position - worldDirection * radius;
|
||||
Handles.color = c;
|
||||
Handles.DrawSolidDisc(worldPos, normal, 1);
|
||||
}
|
||||
|
||||
if (cycle.Sky.Profile.EnableMoon && cycle.Sky.MoonLightSource != null)
|
||||
{
|
||||
Color c = cycle.Sky.Profile.MoonColor;
|
||||
c.a = Mathf.Max(0.1f, c.a);
|
||||
|
||||
Transform pivot = (cycle.UseMoonPivot && cycle.MoonOrbitPivot != null) ? cycle.MoonOrbitPivot : cycle.transform;
|
||||
Vector3 normal = pivot.right;
|
||||
Handles.color = c;
|
||||
float radius = 10;
|
||||
Handles.DrawWireDisc(pivot.position, normal, radius);
|
||||
|
||||
float angle = evalTime * 360f;
|
||||
Matrix4x4 localRotationMatrix = Matrix4x4.Rotate(Quaternion.Euler(angle, 0, 0));
|
||||
Vector3 localDirection = localRotationMatrix.MultiplyVector(Vector3.down);
|
||||
|
||||
Matrix4x4 localToWorld = pivot.localToWorldMatrix;
|
||||
Vector3 worldDirection = localToWorld.MultiplyVector(localDirection);
|
||||
|
||||
Vector3 worldPos = pivot.transform.position - worldDirection * radius;
|
||||
Handles.color = c;
|
||||
Handles.DrawSolidDisc(worldPos, normal, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
[CustomEditor(typeof(JDayNightCycleProfile))]
|
||||
public class JDayNightCycleProfileInspector : Editor
|
||||
{
|
||||
private JDayNightCycleProfile instance;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
instance = target as JDayNightCycleProfile;
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
EditorGUILayout.LabelField("Select the sky object in the scene to edit this profile.", JEditorCommon.WordWrapItalicLabel);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,170 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Pinwheel.Jupiter;
|
||||
using UnityEditor;
|
||||
using System.IO;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
public class JCubemapCreatorWindow : EditorWindow
|
||||
{
|
||||
public Vector3 CameraPosition { get; set; }
|
||||
public float CameraNearPlane { get; set; }
|
||||
public float CameraFarPlane { get; set; }
|
||||
public CameraClearFlags CameraClearFlag { get; set; }
|
||||
public Color CameraBackgroundColor { get; set; }
|
||||
public int Resolution { get; set; }
|
||||
public bool ExportFaceTextures { get; set; }
|
||||
public string Directory { get; set; }
|
||||
|
||||
public static readonly int[] ResolutionValues = new int[] { 16, 32, 64, 128, 256, 512, 1024, 2048 };
|
||||
public static readonly string[] ResolutionLabels = new string[] { "16", "32", "64", "128", "256", "512", "1024", "2048" };
|
||||
|
||||
public const string PREF_PREFIX = "cubemap-creator";
|
||||
public const string CAM_POS_X = "cam-pos-x";
|
||||
public const string CAM_POS_Y = "cam-pos-y";
|
||||
public const string CAM_POS_Z = "cam-pos-z";
|
||||
public const string CAM_NEAR_PLANE = "cam-near-plane";
|
||||
public const string CAM_FAR_PLANE = "cam-far-plane";
|
||||
public const string CAM_CLEAR_FLAG = "cam-clear-flag";
|
||||
public const string CAM_BG_COLOR = "cam-background-color";
|
||||
public const string RESOLUTION = "resolution";
|
||||
public const string EXPORT_FACE_TEXTURES = "export-face-textures";
|
||||
public const string DIRECTORY = "directory";
|
||||
|
||||
public static void ShowWindow()
|
||||
{
|
||||
JCubemapCreatorWindow window = EditorWindow.CreateInstance<JCubemapCreatorWindow>();
|
||||
window.titleContent = new GUIContent("Cubemap Creator");
|
||||
window.minSize = new Vector2(400, 300);
|
||||
window.Show();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
float x = EditorPrefs.GetFloat(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, CAM_POS_X), 0);
|
||||
float y = EditorPrefs.GetFloat(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, CAM_POS_Y), 0);
|
||||
float z = EditorPrefs.GetFloat(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, CAM_POS_Z), 0);
|
||||
CameraPosition = new Vector3(x, y, z);
|
||||
CameraNearPlane = EditorPrefs.GetFloat(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, CAM_NEAR_PLANE), 0.1f);
|
||||
CameraFarPlane = EditorPrefs.GetFloat(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, CAM_FAR_PLANE), 100);
|
||||
CameraClearFlag = (CameraClearFlags)EditorPrefs.GetInt(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, CAM_CLEAR_FLAG), 0);
|
||||
string htmlColor = EditorPrefs.GetString(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, CAM_BG_COLOR), "FFFFFF");
|
||||
Color c = Color.white;
|
||||
ColorUtility.TryParseHtmlString("#" + htmlColor, out c);
|
||||
CameraBackgroundColor = c;
|
||||
Resolution = EditorPrefs.GetInt(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, RESOLUTION), 512);
|
||||
ExportFaceTextures = EditorPrefs.GetBool(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, EXPORT_FACE_TEXTURES), false);
|
||||
Directory = EditorPrefs.GetString(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, DIRECTORY), "Assets/");
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
EditorPrefs.SetFloat(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, CAM_POS_X), CameraPosition.x);
|
||||
EditorPrefs.SetFloat(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, CAM_POS_Y), CameraPosition.y);
|
||||
EditorPrefs.SetFloat(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, CAM_POS_Z), CameraPosition.z);
|
||||
EditorPrefs.SetFloat(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, CAM_NEAR_PLANE), CameraNearPlane);
|
||||
EditorPrefs.SetFloat(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, CAM_FAR_PLANE), CameraFarPlane);
|
||||
EditorPrefs.SetInt(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, CAM_CLEAR_FLAG), (int)CameraClearFlag);
|
||||
EditorPrefs.SetString(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, CAM_BG_COLOR), ColorUtility.ToHtmlStringRGB(CameraBackgroundColor));
|
||||
EditorPrefs.SetInt(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, RESOLUTION), Resolution);
|
||||
EditorPrefs.SetBool(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, EXPORT_FACE_TEXTURES), ExportFaceTextures);
|
||||
EditorPrefs.SetString(JEditorCommon.GetProjectRelatedEditorPrefsKey(PREF_PREFIX, DIRECTORY), Directory);
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
DrawExportGUI();
|
||||
}
|
||||
|
||||
private void DrawExportGUI()
|
||||
{
|
||||
string label = "Export";
|
||||
string id = "export" + GetInstanceID();
|
||||
|
||||
JEditorCommon.Foldout(label, true, id, () =>
|
||||
{
|
||||
CameraPosition = JEditorCommon.InlineVector3Field("Position", CameraPosition);
|
||||
CameraNearPlane = EditorGUILayout.FloatField("Near Plane", CameraNearPlane);
|
||||
CameraFarPlane = EditorGUILayout.FloatField("Far Plane", CameraFarPlane);
|
||||
CameraClearFlag = (CameraClearFlags)EditorGUILayout.EnumPopup("Clear Flags", CameraClearFlag);
|
||||
if (CameraClearFlag == CameraClearFlags.Color)
|
||||
{
|
||||
CameraBackgroundColor = EditorGUILayout.ColorField("Background Color", CameraBackgroundColor);
|
||||
}
|
||||
|
||||
Resolution = EditorGUILayout.IntPopup("Resolution", Resolution, ResolutionLabels, ResolutionValues);
|
||||
ExportFaceTextures = EditorGUILayout.Toggle("Export Face Textures", ExportFaceTextures);
|
||||
|
||||
string dir = Directory;
|
||||
JEditorCommon.BrowseFolder("Directory", ref dir);
|
||||
Directory = dir;
|
||||
|
||||
GUI.enabled = !string.IsNullOrEmpty(Directory);
|
||||
if (GUILayout.Button("Export"))
|
||||
{
|
||||
Export();
|
||||
}
|
||||
GUI.enabled = true;
|
||||
});
|
||||
}
|
||||
|
||||
private void Export()
|
||||
{
|
||||
JUtilities.EnsureDirectoryExists(Directory);
|
||||
|
||||
Cubemap cube = new Cubemap(Resolution, TextureFormat.ARGB32, false);
|
||||
JCubemapRendererArgs args = new JCubemapRendererArgs()
|
||||
{
|
||||
CameraPosition = this.CameraPosition,
|
||||
CameraNearPlane = this.CameraNearPlane,
|
||||
CameraFarPlane = this.CameraFarPlane,
|
||||
CameraClearFlag = this.CameraClearFlag,
|
||||
CameraBackgroundColor = this.CameraBackgroundColor,
|
||||
Resolution = this.Resolution,
|
||||
Cubemap = cube,
|
||||
Face = (CubemapFace)63
|
||||
};
|
||||
JCubemapRenderer.Render(args);
|
||||
|
||||
string fileName = Path.Combine(Directory, "Cubemap-" + JCommon.GetUniqueID() + ".cubemap");
|
||||
AssetDatabase.CreateAsset(cube, fileName);
|
||||
|
||||
if (ExportFaceTextures)
|
||||
{
|
||||
ExportFace(cube, CubemapFace.PositiveX);
|
||||
ExportFace(cube, CubemapFace.NegativeX);
|
||||
ExportFace(cube, CubemapFace.PositiveY);
|
||||
ExportFace(cube, CubemapFace.NegativeY);
|
||||
ExportFace(cube, CubemapFace.PositiveZ);
|
||||
ExportFace(cube, CubemapFace.NegativeZ);
|
||||
}
|
||||
|
||||
AssetDatabase.Refresh();
|
||||
EditorGUIUtility.PingObject(cube);
|
||||
Selection.activeObject = cube;
|
||||
}
|
||||
|
||||
private void ExportFace(Cubemap cube, CubemapFace face)
|
||||
{
|
||||
Texture2D tex = new Texture2D(cube.width, cube.height);
|
||||
Color[] data = cube.GetPixels(face);
|
||||
Color[] flipData = new Color[data.Length];
|
||||
for (int y = 0; y < Resolution; ++y)
|
||||
{
|
||||
for (int x = 0; x < Resolution; ++x)
|
||||
{
|
||||
flipData[JUtilities.To1DIndex(x, y, Resolution)] = data[JUtilities.To1DIndex(Resolution - 1 - x, Resolution - 1 - y, Resolution)];
|
||||
}
|
||||
}
|
||||
tex.SetPixels(flipData);
|
||||
tex.Apply();
|
||||
|
||||
byte[] bytes = tex.EncodeToPNG();
|
||||
string fileName = Path.Combine(Directory, cube.name + "-" + face.ToString() + ".png");
|
||||
File.WriteAllBytes(fileName, bytes);
|
||||
JUtilities.DestroyObject(tex);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,138 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
public class JTwoPaneWindowWindow : EditorWindow
|
||||
{
|
||||
protected float toolbarHeight = EditorGUIUtility.singleLineHeight;
|
||||
protected int toolbarOffsetX = 4;
|
||||
protected int toolbarOverflowY = 5;
|
||||
protected int rightPaneWidth = 300;
|
||||
protected int rightPaneWidthMin = 200;
|
||||
protected int rightPaneWidthMax = 400;
|
||||
protected int resizeRectWidth = 10;
|
||||
protected bool isResizinng = false;
|
||||
|
||||
protected Vector2 rightPaneScrollPos;
|
||||
|
||||
protected Rect LeftPaneRect
|
||||
{
|
||||
get
|
||||
{
|
||||
Rect r = new Rect();
|
||||
r.size = new Vector2(position.size.x - rightPaneWidth, position.size.y - toolbarHeight - toolbarOverflowY);
|
||||
r.position = new Vector2(0, toolbarHeight + toolbarOverflowY);
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
protected Rect RightPaneRect
|
||||
{
|
||||
get
|
||||
{
|
||||
Rect r = new Rect();
|
||||
r.size = new Vector2(rightPaneWidth, position.size.y - toolbarHeight - toolbarOverflowY);
|
||||
r.position = new Vector2(position.size.x - rightPaneWidth, toolbarHeight + toolbarOverflowY);
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
protected Rect ResizePaneRect
|
||||
{
|
||||
get
|
||||
{
|
||||
Rect r = new Rect();
|
||||
r.position = new Vector2(position.size.x - rightPaneWidth - resizeRectWidth * 0.5f, toolbarHeight + toolbarOverflowY);
|
||||
r.size = new Vector2(resizeRectWidth, position.size.y - toolbarHeight - toolbarOverflowY);
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnGUI()
|
||||
{
|
||||
DrawToolbar();
|
||||
DrawLeftPane();
|
||||
DrawRightPane();
|
||||
HandleResize();
|
||||
HandleRepaint();
|
||||
}
|
||||
|
||||
private void DrawToolbar()
|
||||
{
|
||||
Rect r = EditorGUILayout.GetControlRect();
|
||||
RectOffset offset = new RectOffset(toolbarOffsetX, toolbarOffsetX, 0, 0);
|
||||
GUI.Box(offset.Add(r), string.Empty, EditorStyles.toolbar);
|
||||
|
||||
OnToolbarGUI(r);
|
||||
}
|
||||
|
||||
protected virtual void OnToolbarGUI(Rect r)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void DrawLeftPane()
|
||||
{
|
||||
OnLeftPaneGUI(LeftPaneRect);
|
||||
}
|
||||
|
||||
protected virtual void OnLeftPaneGUI(Rect r)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void DrawRightPane()
|
||||
{
|
||||
Color separatorColor = JEditorCommon.boxBorderColor;
|
||||
JEditorCommon.DrawLine(
|
||||
new Vector2(RightPaneRect.min.x - 2, RightPaneRect.min.y - 2),
|
||||
new Vector2(RightPaneRect.min.x - 2, RightPaneRect.max.y),
|
||||
separatorColor);
|
||||
|
||||
GUILayout.BeginArea(RightPaneRect);
|
||||
rightPaneScrollPos = EditorGUILayout.BeginScrollView(rightPaneScrollPos);
|
||||
|
||||
OnRightPaneScrollViewGUI();
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
GUILayout.EndArea();
|
||||
}
|
||||
|
||||
protected virtual void OnRightPaneScrollViewGUI()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void HandleResize()
|
||||
{
|
||||
EditorGUIUtility.AddCursorRect(ResizePaneRect, MouseCursor.ResizeHorizontal);
|
||||
if (Event.current == null)
|
||||
return;
|
||||
if (Event.current.type == EventType.MouseDown &&
|
||||
ResizePaneRect.Contains(Event.current.mousePosition))
|
||||
{
|
||||
isResizinng = true;
|
||||
}
|
||||
else if (Event.current.type == EventType.MouseUp)
|
||||
{
|
||||
isResizinng = false;
|
||||
}
|
||||
|
||||
if (isResizinng)
|
||||
{
|
||||
rightPaneWidth = (int)(position.size.x - Event.current.mousePosition.x);
|
||||
rightPaneWidth = Mathf.Clamp(rightPaneWidth, rightPaneWidthMin, rightPaneWidthMax);
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleRepaint()
|
||||
{
|
||||
if (Event.current == null)
|
||||
return;
|
||||
Repaint();
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,206 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &-7953337332898741536
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Jupiter/Sky
|
||||
m_Shader: {fileID: 4800000, guid: 3129e3b90193a0547900ecf4cf4e9864, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- ALLOW_STEP_EFFECT
|
||||
- HORIZON_CLOUD
|
||||
- MOON
|
||||
- OVERHEAD_CLOUD
|
||||
- STARS
|
||||
- STARS_LAYER_0
|
||||
- STARS_LAYER_1
|
||||
- STARS_LAYER_2
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _DetailOverlayCubemap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MoonCubemap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MoonTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _StarsCubemap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _StarsTwinkleMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SunCubemap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SunTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _DetailOverlayLayer: 0
|
||||
- _DetailOverlayRotationSpeed: 0
|
||||
- _HorizonCloudAnimationSpeed: 50
|
||||
- _HorizonCloudEnd: 0.35
|
||||
- _HorizonCloudSize: 4.47
|
||||
- _HorizonCloudStart: -0.01
|
||||
- _HorizonCloudStep: 25
|
||||
- _HorizonExponent: 5
|
||||
- _HorizonStep: 1000
|
||||
- _HorizonThickness: 1
|
||||
- _MoonGlow: 0.24
|
||||
- _MoonSize: 0.07
|
||||
- _MoonSoftEdge: 0.22
|
||||
- _OverheadCloudAltitude: 1000
|
||||
- _OverheadCloudAnimationSpeed: 50
|
||||
- _OverheadCloudFlowX: 1
|
||||
- _OverheadCloudFlowZ: 1
|
||||
- _OverheadCloudSize: 10
|
||||
- _OverheadCloudStep: 2
|
||||
- _StarsDensity0: 0.4
|
||||
- _StarsDensity1: 0.34
|
||||
- _StarsDensity2: 0.45
|
||||
- _StarsEnd: 1
|
||||
- _StarsGlow0: 0.01
|
||||
- _StarsGlow1: 0.01
|
||||
- _StarsGlow2: 0.01
|
||||
- _StarsOpacity: 1
|
||||
- _StarsSize0: 0.42
|
||||
- _StarsSize1: 0.53
|
||||
- _StarsSize2: 0.46
|
||||
- _StarsStart: 0.25
|
||||
- _StarsTwinkle0: 5
|
||||
- _StarsTwinkle1: 6
|
||||
- _StarsTwinkle2: 2
|
||||
- _SunGlow: 0
|
||||
- _SunSize: 0
|
||||
- _SunSoftEdge: 0
|
||||
m_Colors:
|
||||
- _DetailOverlayColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _GroundColor: {r: 0.1981132, g: 0.1981132, b: 0.1981132, a: 1}
|
||||
- _HorizonCloudColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _HorizonColor: {r: 0.38431373, g: 0.48638386, b: 0.6509804, a: 1}
|
||||
- _MoonColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _MoonDirection: {r: 0, g: 0, b: 1, a: 0}
|
||||
- _OverheadCloudColor: {r: 1, g: 1, b: 1, a: 0.09803922}
|
||||
- _SkyColor: {r: 0.10090523, g: 0.06363475, b: 0.20754719, a: 1}
|
||||
- _StarsColor0: {r: 0.9254902, g: 0.88081425, b: 0.5432628, a: 1}
|
||||
- _StarsColor1: {r: 1, g: 0.24056602, b: 0.8628801, a: 1}
|
||||
- _StarsColor2: {r: 0, g: 0.8351569, b: 1, a: 1}
|
||||
- _SunColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SunDirection: {r: -1, g: -1, b: -1, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
--- !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: fa5278d11d9502245b5cc174a196561b, type: 3}
|
||||
m_Name: StarryNight
|
||||
m_EditorClassIdentifier:
|
||||
skyColor: {r: 0.10090523, g: 0.06363475, b: 0.20754719, a: 1}
|
||||
horizonColor: {r: 0.38431373, g: 0.48638386, b: 0.6509804, a: 1}
|
||||
groundColor: {r: 0.1981132, g: 0.1981132, b: 0.1981132, a: 1}
|
||||
horizonThickness: 1
|
||||
horizonExponent: 5
|
||||
horizonStep: 1000
|
||||
fogSyncOption: 2
|
||||
fogColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
enableStars: 1
|
||||
starsStartPosition: 0.25
|
||||
starsEndPosition: 1
|
||||
starsOpacity: 1
|
||||
starsLayerCount: 3
|
||||
starsColor0: {r: 0.9254902, g: 0.88081425, b: 0.5432628, a: 1}
|
||||
starsColor1: {r: 1, g: 0.24056602, b: 0.8628801, a: 1}
|
||||
starsColor2: {r: 0, g: 0.8351569, b: 1, a: 1}
|
||||
starsDensity0: 0.4
|
||||
starsDensity1: 0.34
|
||||
starsDensity2: 0.45
|
||||
starsSize0: 0.42
|
||||
starsSize1: 0.53
|
||||
starsSize2: 0.46
|
||||
starsGlow0: 0.01
|
||||
starsGlow1: 0.01
|
||||
starsGlow2: 0.01
|
||||
starsTwinkle0: 5
|
||||
starsTwinkle1: 6
|
||||
starsTwinkle2: 2
|
||||
useBakedStars: 0
|
||||
starsCubemap: {fileID: 0}
|
||||
starsTwinkleMap: {fileID: 0}
|
||||
enableSun: 0
|
||||
sunTexture: {fileID: 0}
|
||||
sunColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
sunSize: 0
|
||||
sunSoftEdge: 0
|
||||
sunGlow: 0
|
||||
useBakedSun: 0
|
||||
sunCubemap: {fileID: 0}
|
||||
sunLightColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
sunLightIntensity: 0
|
||||
enableMoon: 1
|
||||
moonTexture: {fileID: 0}
|
||||
moonColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
moonSize: 0.07
|
||||
moonSoftEdge: 0.22
|
||||
moonGlow: 0.24
|
||||
useBakedMoon: 0
|
||||
moonCubemap: {fileID: 0}
|
||||
moonLightColor: {r: 0.8443396, g: 0.9841163, b: 1, a: 1}
|
||||
moonLightIntensity: 0.2
|
||||
customCloudTexture: {fileID: 0}
|
||||
enableHorizonCloud: 1
|
||||
horizonCloudColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
horizonCloudStartPosition: -0.01
|
||||
horizonCloudEndPosition: 0.35
|
||||
horizonCloudSize: 4.47
|
||||
horizonCloudStep: 25
|
||||
horizonCloudAnimationSpeed: 50
|
||||
enableOverheadCloud: 1
|
||||
overheadCloudColor: {r: 1, g: 1, b: 1, a: 0.09803922}
|
||||
overheadCloudAltitude: 1000
|
||||
overheadCloudSize: 10
|
||||
overheadCloudStep: 2
|
||||
overheadCloudAnimationSpeed: 50
|
||||
overheadCloudFlowDirectionX: 1
|
||||
overheadCloudFlowDirectionZ: 1
|
||||
overheadCloudRemapMin: 0
|
||||
overheadCloudRemapMax: 1
|
||||
overheadCloudCastShadow: 0
|
||||
overheadCloudShadowClipMask: 0
|
||||
enableDetailOverlay: 0
|
||||
detailOverlayTintColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
detailOverlayCubeMap: {fileID: 0}
|
||||
detailOverlayLayer: 0
|
||||
detailOverlayRotationSpeed: 0
|
||||
allowStepEffect: 0
|
||||
material: {fileID: -7953337332898741536}
|
||||
shadowMaterial: {fileID: 0}
|
@@ -0,0 +1,202 @@
|
||||
%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: fa5278d11d9502245b5cc174a196561b, type: 3}
|
||||
m_Name: SunnyDay
|
||||
m_EditorClassIdentifier:
|
||||
skyColor: {r: 0.2264151, g: 0.6028122, b: 0.9056604, a: 1}
|
||||
horizonColor: {r: 1, g: 0.94944346, b: 0.839, a: 1}
|
||||
groundColor: {r: 0.4339623, g: 0.4339623, b: 0.4339623, a: 1}
|
||||
horizonThickness: 1
|
||||
horizonExponent: 3
|
||||
horizonStep: 500
|
||||
fogSyncOption: 2
|
||||
fogColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
enableStars: 0
|
||||
starsStartPosition: 0
|
||||
starsEndPosition: 0
|
||||
starsOpacity: 0
|
||||
starsLayerCount: 0
|
||||
starsColor0: {r: 0, g: 0, b: 0, a: 0}
|
||||
starsColor1: {r: 0, g: 0, b: 0, a: 0}
|
||||
starsColor2: {r: 0, g: 0, b: 0, a: 0}
|
||||
starsDensity0: 0
|
||||
starsDensity1: 0
|
||||
starsDensity2: 0
|
||||
starsSize0: 0
|
||||
starsSize1: 0
|
||||
starsSize2: 0
|
||||
starsGlow0: 0
|
||||
starsGlow1: 0
|
||||
starsGlow2: 0
|
||||
starsTwinkle0: 0
|
||||
starsTwinkle1: 0
|
||||
starsTwinkle2: 0
|
||||
useBakedStars: 0
|
||||
starsCubemap: {fileID: 0}
|
||||
starsTwinkleMap: {fileID: 0}
|
||||
enableSun: 1
|
||||
sunTexture: {fileID: 0}
|
||||
sunColor: {r: 1, g: 0.9700814, b: 0.9009434, a: 1}
|
||||
sunSize: 0.07
|
||||
sunSoftEdge: 0.5
|
||||
sunGlow: 0.45
|
||||
useBakedSun: 0
|
||||
sunCubemap: {fileID: 0}
|
||||
sunLightColor: {r: 1, g: 0.9929226, b: 0.9009434, a: 1}
|
||||
sunLightIntensity: 1
|
||||
enableMoon: 0
|
||||
moonTexture: {fileID: 0}
|
||||
moonColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
moonSize: 0
|
||||
moonSoftEdge: 0
|
||||
moonGlow: 0
|
||||
useBakedMoon: 0
|
||||
moonCubemap: {fileID: 0}
|
||||
moonLightColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
moonLightIntensity: 0
|
||||
customCloudTexture: {fileID: 0}
|
||||
enableHorizonCloud: 0
|
||||
horizonCloudColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
horizonCloudStartPosition: -0.1
|
||||
horizonCloudEndPosition: 0.65
|
||||
horizonCloudSize: 4.91
|
||||
horizonCloudStep: 25
|
||||
horizonCloudAnimationSpeed: 50
|
||||
enableOverheadCloud: 1
|
||||
overheadCloudColor: {r: 1, g: 1, b: 1, a: 0.5647059}
|
||||
overheadCloudAltitude: 1000
|
||||
overheadCloudSize: 10
|
||||
overheadCloudStep: 2
|
||||
overheadCloudAnimationSpeed: 50
|
||||
overheadCloudFlowDirectionX: 1
|
||||
overheadCloudFlowDirectionZ: 1
|
||||
overheadCloudRemapMin: 0
|
||||
overheadCloudRemapMax: 1
|
||||
overheadCloudCastShadow: 0
|
||||
overheadCloudShadowClipMask: 0
|
||||
enableDetailOverlay: 1
|
||||
detailOverlayTintColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
detailOverlayCubeMap: {fileID: 0}
|
||||
detailOverlayLayer: 0
|
||||
detailOverlayRotationSpeed: 0
|
||||
allowStepEffect: 0
|
||||
material: {fileID: 683795580653540547}
|
||||
shadowMaterial: {fileID: 0}
|
||||
--- !u!21 &683795580653540547
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Jupiter/Sky
|
||||
m_Shader: {fileID: 4800000, guid: 3129e3b90193a0547900ecf4cf4e9864, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- ALLOW_STEP_EFFECT
|
||||
- DETAIL_OVERLAY
|
||||
- OVERHEAD_CLOUD
|
||||
- SUN
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _DetailOverlayCubemap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MoonCubemap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MoonTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _StarsCubemap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _StarsTwinkleMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SunCubemap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SunTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _DetailOverlayLayer: 0
|
||||
- _DetailOverlayRotationSpeed: 0
|
||||
- _HorizonCloudAnimationSpeed: 50
|
||||
- _HorizonCloudEnd: 0.65
|
||||
- _HorizonCloudSize: 4.91
|
||||
- _HorizonCloudStart: -0.1
|
||||
- _HorizonCloudStep: 25
|
||||
- _HorizonExponent: 3
|
||||
- _HorizonStep: 500
|
||||
- _HorizonThickness: 1
|
||||
- _MoonGlow: 0
|
||||
- _MoonSize: 0
|
||||
- _MoonSoftEdge: 0
|
||||
- _OverheadCloudAltitude: 1000
|
||||
- _OverheadCloudAnimationSpeed: 50
|
||||
- _OverheadCloudFlowX: 1
|
||||
- _OverheadCloudFlowZ: 1
|
||||
- _OverheadCloudSize: 10
|
||||
- _OverheadCloudStep: 2
|
||||
- _StarsDensity0: 0
|
||||
- _StarsDensity1: 0
|
||||
- _StarsDensity2: 0
|
||||
- _StarsEnd: 0
|
||||
- _StarsGlow0: 0
|
||||
- _StarsGlow1: 0
|
||||
- _StarsGlow2: 0
|
||||
- _StarsOpacity: 0
|
||||
- _StarsSize0: 0
|
||||
- _StarsSize1: 0
|
||||
- _StarsSize2: 0
|
||||
- _StarsStart: 0
|
||||
- _StarsTwinkle0: 0
|
||||
- _StarsTwinkle1: 0
|
||||
- _StarsTwinkle2: 0
|
||||
- _SunGlow: 0.45
|
||||
- _SunSize: 0.07
|
||||
- _SunSoftEdge: 0.5
|
||||
m_Colors:
|
||||
- _DetailOverlayColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _GroundColor: {r: 0.4339623, g: 0.4339623, b: 0.4339623, a: 1}
|
||||
- _HorizonCloudColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _HorizonColor: {r: 1, g: 0.94944346, b: 0.839, a: 1}
|
||||
- _MoonColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _MoonDirection: {r: 1, g: 1, b: 1, a: 0}
|
||||
- _OverheadCloudColor: {r: 1, g: 1, b: 1, a: 0.5647059}
|
||||
- _SkyColor: {r: 0.2264151, g: 0.6028122, b: 0.9056604, a: 1}
|
||||
- _StarsColor0: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _StarsColor1: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _StarsColor2: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SunColor: {r: 1, g: 0.9700814, b: 0.9009434, a: 1}
|
||||
- _SunDirection: {r: -0.3213938, g: -0.76604444, b: 0.5566705, a: 0}
|
||||
m_BuildTextureStacks: []
|
@@ -0,0 +1,28 @@
|
||||
%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: 4602ffc9ae1863b4b9155331571220f2, type: 3}
|
||||
m_Name: JupiterSettings
|
||||
m_EditorClassIdentifier:
|
||||
defaultSkybox: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
noiseTexture: {fileID: 2800000, guid: 7f313a2cde54f8e4ba19db94edca915b, type: 3}
|
||||
cloudTexture: {fileID: 2800000, guid: 433abcf8c760aa746a5580cd0a190b51, type: 3}
|
||||
defaultProfileSunnyDay: {fileID: 11400000, guid: b4b856d2b3d3c164fbcf5c87fc2abee2,
|
||||
type: 2}
|
||||
defaultProfileStarryNight: {fileID: 11400000, guid: 8585bdf0dc6491649be0609424d9661b,
|
||||
type: 2}
|
||||
defaultDayNightCycleProfile: {fileID: 11400000, guid: 038b4db3822d0934bafe44586a5925fe,
|
||||
type: 2}
|
||||
internalShaders:
|
||||
skyShader: {fileID: 4800000, guid: 3129e3b90193a0547900ecf4cf4e9864, type: 3}
|
||||
skyShadowShader: {fileID: 4800000, guid: 561c1777fd66e5d488ef1b85ed82bbaa, type: 3}
|
||||
copyTextureShader: {fileID: 4800000, guid: b3f0e74bdb60b6b478290fc44ebf68f6, type: 3}
|
||||
solidColorShader: {fileID: 4800000, guid: 3fe9e551ea5d3fe41b879f13cf0e6a1b, type: 3}
|
@@ -0,0 +1,485 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UnityEngine.Rendering;
|
||||
using DateTime = System.DateTime;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
public static class JCommon
|
||||
{
|
||||
public static string SUPPORT_EMAIL = "support@pinwheel.studio";
|
||||
public static string BUSINESS_EMAIL = "hello@pinwheel.studio";
|
||||
public static string YOUTUBE_CHANNEL = "https://www.youtube.com/channel/UCebwuk5CfIe5kolBI9nuBTg";
|
||||
public static string ONLINE_MANUAL = "https://docs.google.com/document/d/1Wf4CDlD96c6tna1ee0fpquWkdSrGDIO-eKuQDxjJedY/edit?usp=sharing";
|
||||
public static string FORUM = "https://forum.unity.com/threads/pre-released-jupiter-procedural-sky-builtin-lwrp-urp.799635/";
|
||||
public static string DISCORD = "https://discord.gg/HXNnFpS";
|
||||
|
||||
|
||||
public const int PREVIEW_TEXTURE_SIZE = 512;
|
||||
public const int TEXTURE_SIZE_MIN = 1;
|
||||
public const int TEXTURE_SIZE_MAX = 8192;
|
||||
|
||||
public static JRenderPipelineType CurrentRenderPipeline
|
||||
{
|
||||
get
|
||||
{
|
||||
string pipelineName = Shader.globalRenderPipeline;
|
||||
if (pipelineName.Equals("UniversalPipeline,LightweightPipeline"))
|
||||
{
|
||||
return JRenderPipelineType.Universal;
|
||||
}
|
||||
else if (pipelineName.Equals("LightweightPipeline"))
|
||||
{
|
||||
return JRenderPipelineType.Lightweight;
|
||||
}
|
||||
else
|
||||
{
|
||||
return JRenderPipelineType.Builtin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static Vector2[] fullRectUvPoints;
|
||||
public static Vector2[] FullRectUvPoints
|
||||
{
|
||||
get
|
||||
{
|
||||
if (fullRectUvPoints == null)
|
||||
{
|
||||
fullRectUvPoints = new Vector2[]
|
||||
{
|
||||
Vector2.zero,
|
||||
Vector2.up,
|
||||
Vector2.one,
|
||||
Vector2.right
|
||||
};
|
||||
}
|
||||
return fullRectUvPoints;
|
||||
}
|
||||
}
|
||||
|
||||
private static Mesh emptyMesh;
|
||||
public static Mesh EmptyMesh
|
||||
{
|
||||
get
|
||||
{
|
||||
if (emptyMesh == null)
|
||||
{
|
||||
emptyMesh = new Mesh();
|
||||
}
|
||||
return emptyMesh;
|
||||
}
|
||||
}
|
||||
|
||||
private static Material[] emptyMaterials;
|
||||
public static Material[] EmptyMaterials
|
||||
{
|
||||
get
|
||||
{
|
||||
if (emptyMaterials==null)
|
||||
{
|
||||
emptyMaterials = new Material[0];
|
||||
}
|
||||
return emptyMaterials;
|
||||
}
|
||||
}
|
||||
|
||||
public static Rect UnitRect
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Rect(0, 0, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetUniqueID()
|
||||
{
|
||||
string s = GetTimeTick().ToString();
|
||||
return Reverse(s);
|
||||
}
|
||||
|
||||
public static long GetTimeTick()
|
||||
{
|
||||
DateTime time = DateTime.Now;
|
||||
return time.Ticks;
|
||||
}
|
||||
|
||||
public static string Reverse(string s)
|
||||
{
|
||||
char[] chars = s.ToCharArray();
|
||||
System.Array.Reverse(chars);
|
||||
return new string(chars);
|
||||
}
|
||||
|
||||
public static void SetDirty(Object o)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
EditorUtility.SetDirty(o);
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void AddObjectToAsset(Object objectToAdd, Object asset)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
AssetDatabase.AddObjectToAsset(objectToAdd, asset);
|
||||
#endif
|
||||
}
|
||||
|
||||
public static Texture2D CreateTexture(int resolution, Color fill, TextureFormat format = TextureFormat.ARGB32)
|
||||
{
|
||||
Texture2D t = new Texture2D(resolution, resolution, format, false);
|
||||
Color[] colors = new Color[resolution * resolution];
|
||||
JUtilities.Fill(colors, fill);
|
||||
t.SetPixels(colors);
|
||||
t.Apply();
|
||||
return t;
|
||||
}
|
||||
|
||||
public static void CopyToRT(Texture t, RenderTexture rt)
|
||||
{
|
||||
RenderTexture.active = rt;
|
||||
Graphics.Blit(t, rt);
|
||||
RenderTexture.active = null;
|
||||
}
|
||||
|
||||
public static void CopyFromRT(Texture2D t, RenderTexture rt)
|
||||
{
|
||||
RenderTexture.active = rt;
|
||||
t.ReadPixels(new Rect(0, 0, rt.width, rt.height), 0, 0);
|
||||
t.Apply();
|
||||
RenderTexture.active = null;
|
||||
}
|
||||
|
||||
public static void CopyTexture(Texture2D src, Texture2D des)
|
||||
{
|
||||
RenderTexture rt = new RenderTexture(des.width, des.height, 0, RenderTextureFormat.ARGBFloat, RenderTextureReadWrite.Default);
|
||||
CopyToRT(src, rt);
|
||||
CopyFromRT(des, rt);
|
||||
rt.Release();
|
||||
JUtilities.DestroyObject(rt);
|
||||
}
|
||||
|
||||
public static Texture2D CloneTexture(Texture2D t)
|
||||
{
|
||||
RenderTexture rt = new RenderTexture(t.width, t.height, 0, RenderTextureFormat.ARGB32);
|
||||
CopyToRT(t, rt);
|
||||
Texture2D result = new Texture2D(t.width, t.height, TextureFormat.ARGB32, false);
|
||||
result.filterMode = t.filterMode;
|
||||
result.wrapMode = t.wrapMode;
|
||||
CopyFromRT(result, rt);
|
||||
rt.Release();
|
||||
Object.DestroyImmediate(rt);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void FillTexture(Texture2D t, Color c)
|
||||
{
|
||||
Color[] colors = new Color[t.width * t.height];
|
||||
JUtilities.Fill(colors, c);
|
||||
t.SetPixels(colors);
|
||||
t.Apply();
|
||||
}
|
||||
|
||||
public static void FillTexture(RenderTexture rt, Color c)
|
||||
{
|
||||
Texture2D tex = new Texture2D(1, 1, TextureFormat.ARGB32, false);
|
||||
tex.SetPixel(0, 0, c);
|
||||
tex.Apply();
|
||||
CopyToRT(tex, rt);
|
||||
JUtilities.DestroyObject(tex);
|
||||
}
|
||||
|
||||
public static Texture2D CloneAndResizeTexture(Texture2D t, int width, int height)
|
||||
{
|
||||
RenderTexture rt = new RenderTexture(width, height, 0, RenderTextureFormat.ARGB32);
|
||||
CopyToRT(t, rt);
|
||||
Texture2D result = new Texture2D(width, height, TextureFormat.ARGB32, false);
|
||||
result.filterMode = t.filterMode;
|
||||
result.wrapMode = t.wrapMode;
|
||||
CopyFromRT(result, rt);
|
||||
rt.Release();
|
||||
Object.DestroyImmediate(rt);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static RenderTexture CopyToRT(Texture src, int startX, int startY, int width, int height, Color defaultColor)
|
||||
{
|
||||
int endX = startX + width - 1;
|
||||
int endY = startY + height - 1;
|
||||
Vector2 startUV = new Vector2(
|
||||
JUtilities.InverseLerpUnclamped(0, src.width - 1, startX),
|
||||
JUtilities.InverseLerpUnclamped(0, src.height - 1, startY));
|
||||
Vector2 endUV = new Vector2(
|
||||
JUtilities.InverseLerpUnclamped(0, src.width - 1, endX),
|
||||
JUtilities.InverseLerpUnclamped(0, src.height - 1, endY));
|
||||
Material mat = JInternalMaterials.CopyTextureMaterial;
|
||||
mat.SetTexture("_MainTex", src);
|
||||
mat.SetVector("_StartUV", startUV);
|
||||
mat.SetVector("_EndUV", endUV);
|
||||
mat.SetColor("_DefaultColor", defaultColor);
|
||||
mat.SetPass(0);
|
||||
RenderTexture rt = new RenderTexture(width, height, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB);
|
||||
RenderTexture.active = rt;
|
||||
Graphics.Blit(src, mat);
|
||||
RenderTexture.active = null;
|
||||
|
||||
return rt;
|
||||
}
|
||||
|
||||
public static void DrawTexture(RenderTexture rt, Texture texture, Rect uvRect, Material mat, int pass = 0)
|
||||
{
|
||||
if (mat == null)
|
||||
mat = JInternalMaterials.UnlitTextureMaterial;
|
||||
RenderTexture.active = rt;
|
||||
GL.PushMatrix();
|
||||
mat.SetTexture("_MainTex", texture);
|
||||
mat.SetPass(pass);
|
||||
GL.LoadOrtho();
|
||||
GL.Begin(GL.QUADS);
|
||||
GL.TexCoord(new Vector3(0, 0, 0));
|
||||
GL.Vertex3(uvRect.min.x, uvRect.min.y, 0);
|
||||
GL.TexCoord(new Vector3(0, 1, 0));
|
||||
GL.Vertex3(uvRect.min.x, uvRect.max.y, 0);
|
||||
GL.TexCoord(new Vector3(1, 1, 0));
|
||||
GL.Vertex3(uvRect.max.x, uvRect.max.y, 0);
|
||||
GL.TexCoord(new Vector3(1, 0, 0));
|
||||
GL.Vertex3(uvRect.max.x, uvRect.min.y, 0);
|
||||
GL.End();
|
||||
GL.PopMatrix();
|
||||
RenderTexture.active = null;
|
||||
}
|
||||
|
||||
public static void DrawTriangle(RenderTexture rt, Vector2 v0, Vector2 v1, Vector2 v2, Color c)
|
||||
{
|
||||
Material mat = JInternalMaterials.SolidColorMaterial;
|
||||
mat.SetColor("_Color", c);
|
||||
RenderTexture.active = rt;
|
||||
GL.PushMatrix();
|
||||
mat.SetPass(0);
|
||||
GL.LoadOrtho();
|
||||
GL.Begin(GL.TRIANGLES);
|
||||
GL.Vertex3(v0.x, v0.y, 0);
|
||||
GL.Vertex3(v1.x, v1.y, 0);
|
||||
GL.Vertex3(v2.x, v2.y, 0);
|
||||
GL.End();
|
||||
GL.PopMatrix();
|
||||
RenderTexture.active = null;
|
||||
}
|
||||
|
||||
public static void DrawQuad(RenderTexture rt, Vector2[] quadCorners, Material mat, int pass)
|
||||
{
|
||||
RenderTexture.active = rt;
|
||||
GL.PushMatrix();
|
||||
mat.SetPass(pass);
|
||||
GL.LoadOrtho();
|
||||
GL.Begin(GL.QUADS);
|
||||
GL.TexCoord(new Vector3(0, 0, 0));
|
||||
GL.Vertex3(quadCorners[0].x, quadCorners[0].y, 0);
|
||||
GL.TexCoord(new Vector3(0, 1, 0));
|
||||
GL.Vertex3(quadCorners[1].x, quadCorners[1].y, 0);
|
||||
GL.TexCoord(new Vector3(1, 1, 0));
|
||||
GL.Vertex3(quadCorners[2].x, quadCorners[2].y, 0);
|
||||
GL.TexCoord(new Vector3(1, 0, 0));
|
||||
GL.Vertex3(quadCorners[3].x, quadCorners[3].y, 0);
|
||||
GL.End();
|
||||
GL.PopMatrix();
|
||||
RenderTexture.active = null;
|
||||
}
|
||||
|
||||
public static List<System.Type> GetAllLoadedTypes()
|
||||
{
|
||||
List<System.Type> loadedTypes = new List<System.Type>();
|
||||
List<string> typeName = new List<string>();
|
||||
foreach (var assembly in System.AppDomain.CurrentDomain.GetAssemblies())
|
||||
{
|
||||
foreach (var t in assembly.GetTypes())
|
||||
{
|
||||
if (t.IsVisible && !t.IsGenericType)
|
||||
{
|
||||
typeName.Add(t.Name);
|
||||
loadedTypes.Add(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
return loadedTypes;
|
||||
}
|
||||
|
||||
public static IEnumerable<Rect> CompareHeightMap(int gridSize, Color[] oldValues, Color[] newValues)
|
||||
{
|
||||
if (oldValues.LongLength != newValues.LongLength)
|
||||
{
|
||||
return new Rect[1] { new Rect(0, 0, 1, 1) };
|
||||
}
|
||||
Rect[] rects = new Rect[gridSize * gridSize];
|
||||
for (int x = 0; x < gridSize; ++x)
|
||||
{
|
||||
for (int z = 0; z < gridSize; ++z)
|
||||
{
|
||||
rects[JUtilities.To1DIndex(x, z, gridSize)] = GetUvRange(gridSize, x, z);
|
||||
}
|
||||
}
|
||||
|
||||
HashSet<Rect> dirtyRects = new HashSet<Rect>();
|
||||
|
||||
int index = 0;
|
||||
int resolution = Mathf.RoundToInt(Mathf.Sqrt(newValues.LongLength));
|
||||
for (int rectIndex = 0; rectIndex < rects.Length; ++rectIndex)
|
||||
{
|
||||
Rect r = rects[rectIndex];
|
||||
int startX = (int)Mathf.Lerp(0, resolution - 1, r.min.x);
|
||||
int startY = (int)Mathf.Lerp(0, resolution - 1, r.min.y);
|
||||
int endX = (int)Mathf.Lerp(0, resolution - 1, r.max.x);
|
||||
int endY = (int)Mathf.Lerp(0, resolution - 1, r.max.y);
|
||||
for (int x = startX; x <= endX; ++x)
|
||||
{
|
||||
for (int y = startY; y <= endY; ++y)
|
||||
{
|
||||
index = JUtilities.To1DIndex(x, y, resolution);
|
||||
if (oldValues[index].r == newValues[index].r &&
|
||||
oldValues[index].g == newValues[index].g &&
|
||||
oldValues[index].b == newValues[index].b &&
|
||||
oldValues[index].a == newValues[index].a)
|
||||
continue;
|
||||
dirtyRects.Add(r);
|
||||
|
||||
Rect hRect = new Rect();
|
||||
hRect.size = new Vector2(r.width * 1.2f, r.height);
|
||||
hRect.center = r.center;
|
||||
dirtyRects.Add(hRect);
|
||||
|
||||
Rect vRect = new Rect();
|
||||
vRect.size = new Vector2(r.width, r.height * 1.2f);
|
||||
vRect.center = r.center;
|
||||
dirtyRects.Add(vRect);
|
||||
break;
|
||||
}
|
||||
if (dirtyRects.Contains(r))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return dirtyRects;
|
||||
}
|
||||
|
||||
public static Rect GetUvRange(int gridSize, int x, int z)
|
||||
{
|
||||
Vector2 position = new Vector2(x * 1.0f / gridSize, z * 1.0f / gridSize);
|
||||
Vector2 size = Vector2.one / gridSize;
|
||||
return new Rect(position, size);
|
||||
}
|
||||
|
||||
public static Texture2D CreateTextureFromCurve(AnimationCurve curve, int width, int height)
|
||||
{
|
||||
Texture2D t = new Texture2D(width, height, TextureFormat.ARGB32, false);
|
||||
t.wrapMode = TextureWrapMode.Clamp;
|
||||
Color[] colors = new Color[width * height];
|
||||
for (int x = 0; x < width; ++x)
|
||||
{
|
||||
float f = Mathf.InverseLerp(0, width - 1, x);
|
||||
float value = curve.Evaluate(f);
|
||||
Color c = new Color(value, value, value, value);
|
||||
for (int y = 0; y < height; ++y)
|
||||
{
|
||||
colors[JUtilities.To1DIndex(x, y, width)] = c;
|
||||
}
|
||||
}
|
||||
t.filterMode = FilterMode.Bilinear;
|
||||
t.SetPixels(colors);
|
||||
t.Apply();
|
||||
return t;
|
||||
}
|
||||
|
||||
public static Vector3[] GetBrushQuadCorners(Vector3 center, float radius, float rotation)
|
||||
{
|
||||
Matrix4x4 matrix = Matrix4x4.Rotate(Quaternion.Euler(0, rotation, 0));
|
||||
Vector3[] corners = new Vector3[]
|
||||
{
|
||||
center + matrix.MultiplyPoint(new Vector3(-1,0,-1)*radius),
|
||||
center + matrix.MultiplyPoint(new Vector3(-1,0,1)*radius),
|
||||
center + matrix.MultiplyPoint(new Vector3(1,0,1)*radius),
|
||||
center + matrix.MultiplyPoint(new Vector3(1,0,-1)*radius)
|
||||
};
|
||||
return corners;
|
||||
}
|
||||
|
||||
//public static void RegisterBeginRender(Camera.CameraCallback callback)
|
||||
//{
|
||||
// Camera.onPreCull += callback;
|
||||
//}
|
||||
|
||||
//public static void RegisterBeginRenderSRP(System.Action<Camera> callback)
|
||||
//{
|
||||
// RenderPipelineManager.beginCameraRendering += callback;
|
||||
//}
|
||||
|
||||
//public static void UnregisterBeginRender(Camera.CameraCallback callback)
|
||||
//{
|
||||
// Camera.onPreCull -= callback;
|
||||
//}
|
||||
|
||||
//public static void UnregisterBeginRenderSRP(System.Action<Camera> callback)
|
||||
//{
|
||||
// RenderPipeline.beginCameraRendering -= callback;
|
||||
//}
|
||||
|
||||
//public static void RegisterEndRender(Camera.CameraCallback callback)
|
||||
//{
|
||||
// Camera.onPostRender += callback;
|
||||
//}
|
||||
|
||||
public static void ClearRT(RenderTexture rt)
|
||||
{
|
||||
RenderTexture.active = rt;
|
||||
GL.Clear(true, true, Color.clear);
|
||||
RenderTexture.active = null;
|
||||
}
|
||||
|
||||
public static void SetMaterialKeywordActive(Material mat, string keyword, bool active)
|
||||
{
|
||||
if (active)
|
||||
{
|
||||
mat.EnableKeyword(keyword);
|
||||
}
|
||||
else
|
||||
{
|
||||
mat.DisableKeyword(keyword);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Editor_ProgressBar(string title, string detail, float percent)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
EditorUtility.DisplayProgressBar(title, detail, percent);
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void Editor_CancelableProgressBar(string title, string detail, float percent)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
if (EditorUtility.DisplayCancelableProgressBar(title, detail, percent))
|
||||
{
|
||||
throw new JProgressCancelledException();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void Editor_ClearProgressBar()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
EditorUtility.ClearProgressBar();
|
||||
#endif
|
||||
}
|
||||
|
||||
public static Camera CreateCamera()
|
||||
{
|
||||
GameObject g = new GameObject();
|
||||
Camera cam = g.AddComponent<Camera>();
|
||||
return cam;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
public enum JDetailOverlayLayer
|
||||
{
|
||||
AfterSky,
|
||||
AfterStars,
|
||||
AfterSun,
|
||||
AfterMoon,
|
||||
AfterHorizonCloud,
|
||||
AfterOverheadCloud
|
||||
}
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
public enum JFogSyncOption
|
||||
{
|
||||
DontSync,
|
||||
SkyColor,
|
||||
HorizonColor,
|
||||
GroundColor,
|
||||
CustomColor
|
||||
}
|
||||
}
|
@@ -0,0 +1,125 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
//[CreateAssetMenu(menuName = "Jupiter/Settings")]
|
||||
public class JJupiterSettings : ScriptableObject
|
||||
{
|
||||
private static JJupiterSettings instance;
|
||||
public static JJupiterSettings Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
instance = Resources.Load<JJupiterSettings>("JupiterSettings");
|
||||
if (instance == null)
|
||||
{
|
||||
instance = ScriptableObject.CreateInstance<JJupiterSettings>() as JJupiterSettings;
|
||||
}
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private Material defaultSkybox;
|
||||
public Material DefaultSkybox
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultSkybox;
|
||||
}
|
||||
set
|
||||
{
|
||||
defaultSkybox = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private Texture2D noiseTexture;
|
||||
public Texture2D NoiseTexture
|
||||
{
|
||||
get
|
||||
{
|
||||
return noiseTexture;
|
||||
}
|
||||
set
|
||||
{
|
||||
noiseTexture = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private Texture2D cloudTexture;
|
||||
public Texture2D CloudTexture
|
||||
{
|
||||
get
|
||||
{
|
||||
return cloudTexture;
|
||||
}
|
||||
set
|
||||
{
|
||||
cloudTexture = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private JSkyProfile defaultProfileSunnyDay;
|
||||
public JSkyProfile DefaultProfileSunnyDay
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultProfileSunnyDay;
|
||||
}
|
||||
set
|
||||
{
|
||||
defaultProfileSunnyDay = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private JSkyProfile defaultProfileStarryNight;
|
||||
public JSkyProfile DefaultProfileStarryNight
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultProfileStarryNight;
|
||||
}
|
||||
set
|
||||
{
|
||||
defaultProfileStarryNight = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private JDayNightCycleProfile defaultDayNightCycleProfile;
|
||||
public JDayNightCycleProfile DefaultDayNightCycleProfile
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultDayNightCycleProfile;
|
||||
}
|
||||
set
|
||||
{
|
||||
defaultDayNightCycleProfile = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private JInternalShaderSettings internalShaders;
|
||||
public JInternalShaderSettings InternalShaders
|
||||
{
|
||||
get
|
||||
{
|
||||
return internalShaders;
|
||||
}
|
||||
set
|
||||
{
|
||||
internalShaders = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,334 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
public static class JMat
|
||||
{
|
||||
public static readonly int NOISE_TEX = Shader.PropertyToID("_NoiseTex");
|
||||
public static readonly int CLOUD_TEX = Shader.PropertyToID("_CloudTex");
|
||||
|
||||
public static readonly int SKY_COLOR = Shader.PropertyToID("_SkyColor");
|
||||
public static readonly int HORIZON_COLOR = Shader.PropertyToID("_HorizonColor");
|
||||
public static readonly int GROUND_COLOR = Shader.PropertyToID("_GroundColor");
|
||||
public static readonly int HORIZON_THICKNESS = Shader.PropertyToID("_HorizonThickness");
|
||||
public static readonly int HORIZON_EXPONENT = Shader.PropertyToID("_HorizonExponent");
|
||||
public static readonly int HORIZON_STEP = Shader.PropertyToID("_HorizonStep");
|
||||
public static readonly int FOG_COLOR = Shader.PropertyToID("_FogColor");
|
||||
|
||||
public static readonly string KW_STARS = "STARS";
|
||||
public static readonly string KW_STARS_LAYER_0 = "STARS_LAYER_0";
|
||||
public static readonly string KW_STARS_LAYER_1 = "STARS_LAYER_1";
|
||||
public static readonly string KW_STARS_LAYER_2 = "STARS_LAYER_2";
|
||||
public static readonly int STARS_START = Shader.PropertyToID("_StarsStartPosition");
|
||||
public static readonly int STARS_END = Shader.PropertyToID("_StarsEndPosition");
|
||||
public static readonly int STARS_OPACITY = Shader.PropertyToID("_StarsOpacity");
|
||||
public static readonly int STARS_COLOR_0 = Shader.PropertyToID("_StarsColor0");
|
||||
public static readonly int STARS_COLOR_1 = Shader.PropertyToID("_StarsColor1");
|
||||
public static readonly int STARS_COLOR_2 = Shader.PropertyToID("_StarsColor2");
|
||||
public static readonly int STARS_DENSITY_0 = Shader.PropertyToID("_StarsDensity0");
|
||||
public static readonly int STARS_DENSITY_1 = Shader.PropertyToID("_StarsDensity1");
|
||||
public static readonly int STARS_DENSITY_2 = Shader.PropertyToID("_StarsDensity2");
|
||||
public static readonly int STARS_SIZE_0 = Shader.PropertyToID("_StarsSize0");
|
||||
public static readonly int STARS_SIZE_1 = Shader.PropertyToID("_StarsSize1");
|
||||
public static readonly int STARS_SIZE_2 = Shader.PropertyToID("_StarsSize2");
|
||||
public static readonly int STARS_GLOW_0 = Shader.PropertyToID("_StarsGlow0");
|
||||
public static readonly int STARS_GLOW_1 = Shader.PropertyToID("_StarsGlow1");
|
||||
public static readonly int STARS_GLOW_2 = Shader.PropertyToID("_StarsGlow2");
|
||||
public static readonly int STARS_TWINKLE_0 = Shader.PropertyToID("_StarsTwinkle0");
|
||||
public static readonly int STARS_TWINKLE_1 = Shader.PropertyToID("_StarsTwinkle1");
|
||||
public static readonly int STARS_TWINKLE_2 = Shader.PropertyToID("_StarsTwinkle2");
|
||||
|
||||
public static readonly string KW_STARS_BAKED = "STARS_BAKED";
|
||||
public static readonly int STARS_CUBEMAP = Shader.PropertyToID("_StarsCubemap");
|
||||
public static readonly int STARS_TWINKLE_MAP = Shader.PropertyToID("_StarsTwinkleMap");
|
||||
|
||||
public static readonly string KW_SUN = "SUN";
|
||||
public static readonly string KW_SUN_USE_TEXTURE = "SUN_USE_TEXTURE";
|
||||
public static readonly int SUN_TEX = Shader.PropertyToID("_SunTex");
|
||||
public static readonly int SUN_COLOR = Shader.PropertyToID("_SunColor");
|
||||
public static readonly int SUN_SIZE = Shader.PropertyToID("_SunSize");
|
||||
public static readonly int SUN_SOFT_EDGE = Shader.PropertyToID("_SunSoftEdge");
|
||||
public static readonly int SUN_GLOW = Shader.PropertyToID("_SunGlow");
|
||||
public static readonly int SUN_DIRECTION = Shader.PropertyToID("_SunDirection");
|
||||
public static readonly int SUN_TRANSFORM_MATRIX = Shader.PropertyToID("_PositionToSunUV");
|
||||
public static readonly int SUN_LIGHT_COLOR = Shader.PropertyToID("_SunLightColor");
|
||||
public static readonly int SUN_LIGHT_INTENSITY = Shader.PropertyToID("_SunLightIntensity");
|
||||
|
||||
public static readonly string KW_SUN_BAKED = "SUN_BAKED";
|
||||
public static readonly int SUN_CUBEMAP = Shader.PropertyToID("_SunCubemap");
|
||||
public static readonly int SUN_ROTATION_MATRIX = Shader.PropertyToID("_SunRotationMatrix");
|
||||
|
||||
public static readonly string KW_MOON = "MOON";
|
||||
public static readonly string KW_MOON_USE_TEXTURE = "MOON_USE_TEXTURE";
|
||||
public static readonly int MOON_TEX = Shader.PropertyToID("_MoonTex");
|
||||
public static readonly int MOON_COLOR = Shader.PropertyToID("_MoonColor");
|
||||
public static readonly int MOON_SIZE = Shader.PropertyToID("_MoonSize");
|
||||
public static readonly int MOON_SOFT_EDGE = Shader.PropertyToID("_MoonSoftEdge");
|
||||
public static readonly int MOON_GLOW = Shader.PropertyToID("_MoonGlow");
|
||||
public static readonly int MOON_DIRECTION = Shader.PropertyToID("_MoonDirection");
|
||||
public static readonly int MOON_TRANSFORM_MATRIX = Shader.PropertyToID("_PositionToMoonUV");
|
||||
public static readonly int MOON_LIGHT_COLOR = Shader.PropertyToID("_MoonLightColor");
|
||||
public static readonly int MOON_LIGHT_INTENSITY = Shader.PropertyToID("_MoonLightIntensity");
|
||||
|
||||
public static readonly string KW_MOON_BAKED = "MOON_BAKED";
|
||||
public static readonly int MOON_CUBEMAP = Shader.PropertyToID("_MoonCubemap");
|
||||
public static readonly int MOON_ROTATION_MATRIX = Shader.PropertyToID("_MoonRotationMatrix");
|
||||
|
||||
public static readonly string KW_HORIZON_CLOUD = "HORIZON_CLOUD";
|
||||
public static readonly int HORIZON_CLOUD_COLOR = Shader.PropertyToID("_HorizonCloudColor");
|
||||
public static readonly int HORIZON_CLOUD_START = Shader.PropertyToID("_HorizonCloudStartPosition");
|
||||
public static readonly int HORIZON_CLOUD_END = Shader.PropertyToID("_HorizonCloudEndPosition");
|
||||
public static readonly int HORIZON_CLOUD_SIZE = Shader.PropertyToID("_HorizonCloudSize");
|
||||
public static readonly int HORIZON_CLOUD_STEP = Shader.PropertyToID("_HorizonCloudStep");
|
||||
public static readonly int HORIZON_CLOUD_ANIMATION_SPEED = Shader.PropertyToID("_HorizonCloudAnimationSpeed");
|
||||
|
||||
public static readonly string KW_OVERHEAD_CLOUD = "OVERHEAD_CLOUD";
|
||||
public static readonly int OVERHEAD_CLOUD_COLOR = Shader.PropertyToID("_OverheadCloudColor");
|
||||
public static readonly int OVERHEAD_CLOUD_ALTITUDE = Shader.PropertyToID("_OverheadCloudAltitude");
|
||||
public static readonly int OVERHEAD_CLOUD_SIZE = Shader.PropertyToID("_OverheadCloudSize");
|
||||
public static readonly int OVERHEAD_CLOUD_STEP = Shader.PropertyToID("_OverheadCloudStep");
|
||||
public static readonly int OVERHEAD_CLOUD_ANIMATION_SPEED = Shader.PropertyToID("_OverheadCloudAnimationSpeed");
|
||||
public static readonly int OVERHEAD_CLOUD_FLOW_X = Shader.PropertyToID("_OverheadCloudFlowDirectionX");
|
||||
public static readonly int OVERHEAD_CLOUD_FLOW_Z = Shader.PropertyToID("_OverheadCloudFlowDirectionZ");
|
||||
public static readonly int OVERHEAD_CLOUD_REMAP_MIN = Shader.PropertyToID("_OverheadCloudRemapMin");
|
||||
public static readonly int OVERHEAD_CLOUD_REMAP_MAX = Shader.PropertyToID("_OverheadCloudRemapMax");
|
||||
public static readonly int OVERHEAD_CLOUD_SHADOW_CLIP_MASK = Shader.PropertyToID("_OverheadCloudShadowClipMask");
|
||||
|
||||
public static readonly string KW_DETAIL_OVERLAY = "DETAIL_OVERLAY";
|
||||
public static readonly string KW_DETAIL_OVERLAY_ROTATION = "DETAIL_OVERLAY_ROTATION";
|
||||
public static readonly int DETAIL_OVERLAY_COLOR = Shader.PropertyToID("_DetailOverlayTintColor");
|
||||
public static readonly int DETAIL_OVERLAY_CUBEMAP = Shader.PropertyToID("_DetailOverlayCubemap");
|
||||
public static readonly int DETAIL_OVERLAY_LAYER = Shader.PropertyToID("_DetailOverlayLayer");
|
||||
public static readonly int DETAIL_OVERLAY_ROTATION_SPEED = Shader.PropertyToID("_DetailOverlayRotationSpeed");
|
||||
|
||||
public static readonly string KW_ALLOW_STEP_EFFECT = "ALLOW_STEP_EFFECT";
|
||||
|
||||
private static Material activeMaterial;
|
||||
|
||||
public static void SetActiveMaterial(Material mat)
|
||||
{
|
||||
activeMaterial = mat;
|
||||
}
|
||||
|
||||
public static void GetColor(int prop, ref Color value)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (activeMaterial.HasProperty(prop))
|
||||
{
|
||||
value = activeMaterial.GetColor(prop);
|
||||
}
|
||||
}
|
||||
catch (NullReferenceException nullEx)
|
||||
{
|
||||
Debug.LogError(nullEx.ToString());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static void GetFloat(int prop, ref float value)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (activeMaterial.HasProperty(prop))
|
||||
{
|
||||
value = activeMaterial.GetFloat(prop);
|
||||
}
|
||||
}
|
||||
catch (NullReferenceException nullEx)
|
||||
{
|
||||
Debug.LogError(nullEx.ToString());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static void GetVector(int prop, ref Vector4 value)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (activeMaterial.HasProperty(prop))
|
||||
{
|
||||
value = activeMaterial.GetVector(prop);
|
||||
}
|
||||
}
|
||||
catch (NullReferenceException nullEx)
|
||||
{
|
||||
Debug.LogError(nullEx.ToString());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static void GetTexture(int prop, ref Texture value)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (activeMaterial.HasProperty(prop))
|
||||
{
|
||||
value = activeMaterial.GetTexture(prop);
|
||||
}
|
||||
}
|
||||
catch (NullReferenceException nullEx)
|
||||
{
|
||||
Debug.LogError(nullEx.ToString());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static void GetKeywordEnabled(string kw, ref bool value)
|
||||
{
|
||||
try
|
||||
{
|
||||
value = activeMaterial.IsKeywordEnabled(kw);
|
||||
}
|
||||
catch (NullReferenceException nullEx)
|
||||
{
|
||||
Debug.LogError(nullEx.ToString());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static void SetColor(int prop, Color value)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (activeMaterial.HasProperty(prop))
|
||||
{
|
||||
activeMaterial.SetColor(prop, value);
|
||||
}
|
||||
}
|
||||
catch (NullReferenceException nullEx)
|
||||
{
|
||||
Debug.LogError(nullEx.ToString());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static void SetFloat(int prop, float value)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (activeMaterial.HasProperty(prop))
|
||||
{
|
||||
activeMaterial.SetFloat(prop, value);
|
||||
}
|
||||
}
|
||||
catch (NullReferenceException nullEx)
|
||||
{
|
||||
Debug.LogError(nullEx.ToString());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static void SetVector(int prop, Vector4 value)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (activeMaterial.HasProperty(prop))
|
||||
{
|
||||
activeMaterial.SetVector(prop, value);
|
||||
}
|
||||
}
|
||||
catch (NullReferenceException nullEx)
|
||||
{
|
||||
Debug.LogError(nullEx.ToString());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static void SetTexture(int prop, Texture value)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (activeMaterial.HasProperty(prop))
|
||||
{
|
||||
activeMaterial.SetTexture(prop, value);
|
||||
}
|
||||
}
|
||||
catch (NullReferenceException nullEx)
|
||||
{
|
||||
Debug.LogError(nullEx.ToString());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static void SetMatrix(int prop, Matrix4x4 value)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (activeMaterial.HasProperty(prop))
|
||||
{
|
||||
activeMaterial.SetMatrix(prop, value);
|
||||
}
|
||||
}
|
||||
catch (NullReferenceException nullEx)
|
||||
{
|
||||
Debug.LogError(nullEx.ToString());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static void SetKeywordEnable(string kw, bool enable)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (enable)
|
||||
{
|
||||
activeMaterial.EnableKeyword(kw);
|
||||
}
|
||||
else
|
||||
{
|
||||
activeMaterial.DisableKeyword(kw);
|
||||
}
|
||||
}
|
||||
catch (NullReferenceException nullEx)
|
||||
{
|
||||
Debug.LogError(nullEx.ToString());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static void SetOverrideTag(string tag, string value)
|
||||
{
|
||||
activeMaterial.SetOverrideTag(tag, value);
|
||||
}
|
||||
|
||||
public static void SetRenderQueue(int queue)
|
||||
{
|
||||
activeMaterial.renderQueue = queue;
|
||||
}
|
||||
|
||||
public static void SetRenderQueue(RenderQueue queue)
|
||||
{
|
||||
activeMaterial.renderQueue = (int)queue;
|
||||
}
|
||||
|
||||
public static void SetSourceBlend(BlendMode mode)
|
||||
{
|
||||
activeMaterial.SetInt("_SrcBlend", (int)mode);
|
||||
}
|
||||
|
||||
public static void SetDestBlend(BlendMode mode)
|
||||
{
|
||||
activeMaterial.SetInt("_DstBlend", (int)mode);
|
||||
}
|
||||
|
||||
public static void SetZWrite(bool value)
|
||||
{
|
||||
activeMaterial.SetInt("_ZWrite", value ? 1 : 0);
|
||||
}
|
||||
|
||||
public static void SetBlend(bool value)
|
||||
{
|
||||
activeMaterial.SetInt("_Blend", value ? 1 : 0);
|
||||
}
|
||||
|
||||
public static void SetShader(Shader shader)
|
||||
{
|
||||
activeMaterial.shader = shader;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,261 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
[ExecuteInEditMode]
|
||||
public class JSky : MonoBehaviour
|
||||
{
|
||||
public static readonly Vector3 DefaultSunDirection = Vector3.forward;
|
||||
public static readonly Vector3 DefaultMoonDirection = Vector3.forward;
|
||||
|
||||
[SerializeField]
|
||||
private JSkyProfile profile;
|
||||
public JSkyProfile Profile
|
||||
{
|
||||
get
|
||||
{
|
||||
return profile;
|
||||
}
|
||||
set
|
||||
{
|
||||
profile = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private Light sunLightSource;
|
||||
public Light SunLightSource
|
||||
{
|
||||
get
|
||||
{
|
||||
return sunLightSource;
|
||||
}
|
||||
set
|
||||
{
|
||||
Light src = value;
|
||||
if (src != null && src.type == LightType.Directional)
|
||||
{
|
||||
sunLightSource = src;
|
||||
}
|
||||
else
|
||||
{
|
||||
sunLightSource = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private Light moonLightSource;
|
||||
public Light MoonLightSource
|
||||
{
|
||||
get
|
||||
{
|
||||
return moonLightSource;
|
||||
}
|
||||
set
|
||||
{
|
||||
Light src = value;
|
||||
if (src != null && src.type == LightType.Directional)
|
||||
{
|
||||
moonLightSource = src;
|
||||
}
|
||||
else
|
||||
{
|
||||
moonLightSource = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public JDayNightCycle DNC { get; set; }
|
||||
|
||||
private static Mesh sphereMesh;
|
||||
private static Mesh SphereMesh
|
||||
{
|
||||
get
|
||||
{
|
||||
if (sphereMesh == null)
|
||||
{
|
||||
sphereMesh = Resources.GetBuiltinResource<Mesh>("Sphere.fbx");
|
||||
}
|
||||
return sphereMesh;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
Camera.onPreCull += OnCameraPreCull;
|
||||
RenderPipelineManager.beginCameraRendering += OnBeginCameraRenderingSRP;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
Camera.onPreCull -= OnCameraPreCull;
|
||||
RenderPipelineManager.beginCameraRendering -= OnBeginCameraRenderingSRP;
|
||||
RenderSettings.skybox = JJupiterSettings.Instance.DefaultSkybox;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
RenderSettings.skybox = JJupiterSettings.Instance.DefaultSkybox;
|
||||
}
|
||||
|
||||
private void Reset()
|
||||
{
|
||||
Light[] lights = FindObjectsOfType<Light>();
|
||||
for (int i = 0; i < lights.Length; ++i)
|
||||
{
|
||||
if (lights[i].type == LightType.Directional)
|
||||
{
|
||||
SunLightSource = lights[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnCameraPreCull(Camera cam)
|
||||
{
|
||||
SetupSkyMaterial();
|
||||
SyncFog();
|
||||
RenderShadow(cam);
|
||||
}
|
||||
|
||||
private void OnBeginCameraRenderingSRP(ScriptableRenderContext context, Camera cam)
|
||||
{
|
||||
OnCameraPreCull(cam);
|
||||
}
|
||||
|
||||
private void SetupSkyMaterial()
|
||||
{
|
||||
if (Profile == null)
|
||||
{
|
||||
RenderSettings.skybox = JJupiterSettings.Instance.DefaultSkybox;
|
||||
return;
|
||||
}
|
||||
RenderSettings.skybox = Profile.Material;
|
||||
|
||||
Profile.Material.SetTexture(JMat.NOISE_TEX, JJupiterSettings.Instance.NoiseTexture);
|
||||
Profile.Material.SetTexture(JMat.CLOUD_TEX, Profile.CustomCloudTexture ? Profile.CustomCloudTexture : JJupiterSettings.Instance.CloudTexture);
|
||||
|
||||
if (Profile.EnableSun)
|
||||
{
|
||||
if (SunLightSource != null)
|
||||
{
|
||||
JDayNightCycleProfile dncProfile = DNC ? DNC.Profile : null;
|
||||
bool isSunLightColorOverridden = dncProfile != null && dncProfile.ContainProperty(nameof(Profile.SunLightColor));
|
||||
if (!isSunLightColorOverridden)
|
||||
{
|
||||
SunLightSource.color = Profile.SunLightColor;
|
||||
}
|
||||
bool isSunLightIntensityOverridden = dncProfile != null && dncProfile.ContainProperty(nameof(Profile.SunLightIntensity));
|
||||
if (!isSunLightIntensityOverridden)
|
||||
{
|
||||
SunLightSource.intensity = Profile.SunLightIntensity;
|
||||
}
|
||||
}
|
||||
|
||||
Vector3 sunDirection = SunLightSource ? SunLightSource.transform.forward : DefaultSunDirection;
|
||||
if (Profile.UseBakedSun)
|
||||
{
|
||||
Matrix4x4 sunRotationMatrix = Matrix4x4.Rotate(
|
||||
Quaternion.FromToRotation(sunDirection, DefaultSunDirection));
|
||||
Profile.Material.SetMatrix(JMat.SUN_ROTATION_MATRIX, sunRotationMatrix);
|
||||
}
|
||||
else
|
||||
{
|
||||
Matrix4x4 positionToSunUV = Matrix4x4.TRS(
|
||||
-sunDirection,
|
||||
Quaternion.LookRotation(sunDirection),
|
||||
Profile.SunSize * Vector3.one).inverse;
|
||||
Profile.Material.SetVector(JMat.SUN_DIRECTION, sunDirection);
|
||||
Profile.Material.SetMatrix(JMat.SUN_TRANSFORM_MATRIX, positionToSunUV);
|
||||
}
|
||||
}
|
||||
|
||||
if (Profile.EnableMoon)
|
||||
{
|
||||
if (MoonLightSource != null)
|
||||
{
|
||||
JDayNightCycleProfile dncProfile = DNC ? DNC.Profile : null;
|
||||
bool isMoonLightColorOverridden = dncProfile != null && dncProfile.ContainProperty(nameof(Profile.MoonLightColor));
|
||||
if (!isMoonLightColorOverridden)
|
||||
{
|
||||
MoonLightSource.color = Profile.MoonLightColor;
|
||||
}
|
||||
bool isMoonLightIntensityOverridden = dncProfile != null && dncProfile.ContainProperty(nameof(Profile.MoonLightIntensity));
|
||||
if (!isMoonLightIntensityOverridden)
|
||||
{
|
||||
MoonLightSource.intensity = Profile.MoonLightIntensity;
|
||||
}
|
||||
}
|
||||
|
||||
Vector3 moonDirection = MoonLightSource ? MoonLightSource.transform.forward : DefaultMoonDirection;
|
||||
if (Profile.UseBakedMoon)
|
||||
{
|
||||
Matrix4x4 moonRotationMatrix = Matrix4x4.Rotate(
|
||||
Quaternion.FromToRotation(moonDirection, DefaultMoonDirection));
|
||||
Profile.Material.SetMatrix(JMat.MOON_ROTATION_MATRIX, moonRotationMatrix);
|
||||
}
|
||||
else
|
||||
{
|
||||
Matrix4x4 positionToMoonUV = Matrix4x4.TRS(
|
||||
-moonDirection,
|
||||
Quaternion.LookRotation(moonDirection),
|
||||
Profile.MoonSize * Vector3.one).inverse;
|
||||
Profile.Material.SetVector(JMat.MOON_DIRECTION, moonDirection);
|
||||
Profile.Material.SetMatrix(JMat.MOON_TRANSFORM_MATRIX, positionToMoonUV);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SyncFog()
|
||||
{
|
||||
if (Profile == null)
|
||||
return;
|
||||
if (Profile.FogSyncOption == JFogSyncOption.DontSync)
|
||||
return;
|
||||
if (Profile.FogSyncOption == JFogSyncOption.SkyColor)
|
||||
{
|
||||
RenderSettings.fogColor = Profile.Material.GetColor(JMat.SKY_COLOR);
|
||||
}
|
||||
else if (Profile.FogSyncOption == JFogSyncOption.HorizonColor)
|
||||
{
|
||||
RenderSettings.fogColor = Profile.Material.GetColor(JMat.HORIZON_COLOR);
|
||||
}
|
||||
else if (Profile.FogSyncOption == JFogSyncOption.GroundColor)
|
||||
{
|
||||
RenderSettings.fogColor = Profile.Material.GetColor(JMat.GROUND_COLOR);
|
||||
}
|
||||
else if (Profile.FogSyncOption == JFogSyncOption.CustomColor)
|
||||
{
|
||||
RenderSettings.fogColor = Profile.Material.GetColor(JMat.FOG_COLOR);
|
||||
}
|
||||
}
|
||||
|
||||
private void RenderShadow(Camera cam)
|
||||
{
|
||||
if (Profile == null)
|
||||
return;
|
||||
if (Profile.EnableOverheadCloud && Profile.OverheadCloudCastShadow)
|
||||
{
|
||||
Profile.ShadowMaterial.SetTexture(JMat.NOISE_TEX, JJupiterSettings.Instance.NoiseTexture);
|
||||
Profile.ShadowMaterial.SetTexture(JMat.CLOUD_TEX, Profile.CustomCloudTexture ? Profile.CustomCloudTexture : JJupiterSettings.Instance.CloudTexture);
|
||||
Graphics.DrawMesh(
|
||||
SphereMesh,
|
||||
Matrix4x4.TRS(Vector3.zero, Quaternion.identity, 2 * Vector3.one * Profile.OverheadCloudAltitude),
|
||||
Profile.ShadowMaterial,
|
||||
0,
|
||||
cam,
|
||||
0,
|
||||
null,
|
||||
ShadowCastingMode.ShadowsOnly,
|
||||
false,
|
||||
null,
|
||||
LightProbeUsage.Off,
|
||||
null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,20 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public class JAnimatableAttribute : Attribute
|
||||
{
|
||||
public string DisplayName { get; set; }
|
||||
public JCurveOrGradient CurveOrGradient { get; set; }
|
||||
|
||||
public JAnimatableAttribute(string displayName, JCurveOrGradient curveOrGradient)
|
||||
{
|
||||
DisplayName = displayName;
|
||||
CurveOrGradient = curveOrGradient;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,115 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
[System.Serializable]
|
||||
public class JAnimatedProperty
|
||||
{
|
||||
[SerializeField]
|
||||
private string name;
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
if (name == null)
|
||||
{
|
||||
name = string.Empty;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
set
|
||||
{
|
||||
name = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private string displayName;
|
||||
public string DisplayName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (displayName == null)
|
||||
{
|
||||
displayName = string.Empty;
|
||||
}
|
||||
return displayName;
|
||||
}
|
||||
set
|
||||
{
|
||||
displayName = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private JCurveOrGradient curveOrGradient;
|
||||
public JCurveOrGradient CurveOrGradient
|
||||
{
|
||||
get
|
||||
{
|
||||
return curveOrGradient;
|
||||
}
|
||||
set
|
||||
{
|
||||
curveOrGradient = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private AnimationCurve curve;
|
||||
public AnimationCurve Curve
|
||||
{
|
||||
get
|
||||
{
|
||||
if (curve == null)
|
||||
{
|
||||
curve = AnimationCurve.EaseInOut(0, 0, 1, 0);
|
||||
}
|
||||
return curve;
|
||||
}
|
||||
set
|
||||
{
|
||||
curve = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private Gradient gradient;
|
||||
public Gradient Gradient
|
||||
{
|
||||
get
|
||||
{
|
||||
if (gradient == null)
|
||||
{
|
||||
gradient = JUtilities.CreateFullWhiteGradient();
|
||||
}
|
||||
return gradient;
|
||||
}
|
||||
set
|
||||
{
|
||||
gradient = value;
|
||||
}
|
||||
}
|
||||
|
||||
public float EvaluateFloat(float t)
|
||||
{
|
||||
return Curve.Evaluate(t);
|
||||
}
|
||||
|
||||
public Color EvaluateColor(float t)
|
||||
{
|
||||
return Gradient.Evaluate(t);
|
||||
}
|
||||
|
||||
public static JAnimatedProperty Create(string name, string displayName, JCurveOrGradient curveOrGradient)
|
||||
{
|
||||
JAnimatedProperty props = new JAnimatedProperty();
|
||||
props.name = name;
|
||||
props.displayName = displayName;
|
||||
props.curveOrGradient = curveOrGradient;
|
||||
return props;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,11 +1,11 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BITKit.UX;
|
||||
using UnityEngine;
|
||||
|
||||
public class UIToolkitSubPanel
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
public UIToolkitSubPanel()
|
||||
public enum JCurveOrGradient
|
||||
{
|
||||
Curve, Gradient
|
||||
}
|
||||
}
|
@@ -0,0 +1,372 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.Rendering;
|
||||
using System;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
[ExecuteInEditMode]
|
||||
public class JDayNightCycle : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private JDayNightCycleProfile profile;
|
||||
public JDayNightCycleProfile Profile
|
||||
{
|
||||
get
|
||||
{
|
||||
return profile;
|
||||
}
|
||||
set
|
||||
{
|
||||
profile = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private JSky sky;
|
||||
public JSky Sky
|
||||
{
|
||||
get
|
||||
{
|
||||
return sky;
|
||||
}
|
||||
set
|
||||
{
|
||||
sky = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private bool useSunPivot;
|
||||
public bool UseSunPivot
|
||||
{
|
||||
get
|
||||
{
|
||||
return useSunPivot;
|
||||
}
|
||||
set
|
||||
{
|
||||
useSunPivot = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private Transform sunOrbitPivot;
|
||||
public Transform SunOrbitPivot
|
||||
{
|
||||
get
|
||||
{
|
||||
return sunOrbitPivot;
|
||||
}
|
||||
set
|
||||
{
|
||||
sunOrbitPivot = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private bool useMoonPivot;
|
||||
public bool UseMoonPivot
|
||||
{
|
||||
get
|
||||
{
|
||||
return useMoonPivot;
|
||||
}
|
||||
set
|
||||
{
|
||||
useMoonPivot = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private Transform moonOrbitPivot;
|
||||
public Transform MoonOrbitPivot
|
||||
{
|
||||
get
|
||||
{
|
||||
return moonOrbitPivot;
|
||||
}
|
||||
set
|
||||
{
|
||||
moonOrbitPivot = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private float startTime;
|
||||
public float StartTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return startTime;
|
||||
}
|
||||
set
|
||||
{
|
||||
startTime = Mathf.Clamp(value, 0f, 24f);
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private float timeIncrement;
|
||||
public float TimeIncrement
|
||||
{
|
||||
get
|
||||
{
|
||||
return timeIncrement;
|
||||
}
|
||||
set
|
||||
{
|
||||
timeIncrement = Mathf.Max(0, value);
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private bool autoTimeIncrement;
|
||||
public bool AutoTimeIncrement
|
||||
{
|
||||
get
|
||||
{
|
||||
return autoTimeIncrement;
|
||||
}
|
||||
set
|
||||
{
|
||||
autoTimeIncrement = value;
|
||||
}
|
||||
}
|
||||
|
||||
private float time;
|
||||
public float Time
|
||||
{
|
||||
get
|
||||
{
|
||||
return time % 24f;
|
||||
}
|
||||
set
|
||||
{
|
||||
time = value % 24f;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private bool shouldUpdateEnvironmentReflection;
|
||||
public bool ShouldUpdateEnvironmentReflection
|
||||
{
|
||||
get
|
||||
{
|
||||
return shouldUpdateEnvironmentReflection;
|
||||
}
|
||||
set
|
||||
{
|
||||
shouldUpdateEnvironmentReflection = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private int environmentReflectionResolution;
|
||||
public int EnvironmentReflectionResolution
|
||||
{
|
||||
get
|
||||
{
|
||||
return environmentReflectionResolution;
|
||||
}
|
||||
set
|
||||
{
|
||||
int oldValue = environmentReflectionResolution;
|
||||
int newValue = Mathf.Clamp(value, 16, 2048);
|
||||
environmentReflectionResolution = newValue;
|
||||
if (oldValue != newValue)
|
||||
{
|
||||
if (environmentReflection != null)
|
||||
{
|
||||
JUtilities.DestroyObject(environmentReflection);
|
||||
}
|
||||
if (environmentProbe != null)
|
||||
{
|
||||
JUtilities.DestroyGameobject(environmentProbe.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private ReflectionProbeTimeSlicingMode environmentReflectionTimeSlicingMode;
|
||||
public ReflectionProbeTimeSlicingMode EnvironmentReflectionTimeSlicingMode
|
||||
{
|
||||
get
|
||||
{
|
||||
return environmentReflectionTimeSlicingMode;
|
||||
}
|
||||
set
|
||||
{
|
||||
environmentReflectionTimeSlicingMode = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private ReflectionProbe environmentProbe;
|
||||
private ReflectionProbe EnvironmentProbe
|
||||
{
|
||||
get
|
||||
{
|
||||
if (environmentProbe == null)
|
||||
{
|
||||
GameObject probeGO = new GameObject("~EnvironmentReflectionRenderer");
|
||||
probeGO.transform.parent = transform;
|
||||
probeGO.transform.position = new Vector3(0, -1000, 0);
|
||||
probeGO.transform.rotation = Quaternion.identity;
|
||||
probeGO.transform.localScale = Vector3.one;
|
||||
probeGO.hideFlags = HideFlags.DontSave;
|
||||
|
||||
environmentProbe = probeGO.AddComponent<ReflectionProbe>();
|
||||
environmentProbe.resolution = EnvironmentReflectionResolution;
|
||||
environmentProbe.size = new Vector3(1, 1, 1);
|
||||
environmentProbe.cullingMask = 0;
|
||||
}
|
||||
environmentProbe.clearFlags = ReflectionProbeClearFlags.Skybox;
|
||||
environmentProbe.mode = ReflectionProbeMode.Realtime;
|
||||
environmentProbe.refreshMode = ReflectionProbeRefreshMode.ViaScripting;
|
||||
environmentProbe.timeSlicingMode = EnvironmentReflectionTimeSlicingMode;
|
||||
environmentProbe.hdr = false;
|
||||
|
||||
return environmentProbe;
|
||||
}
|
||||
}
|
||||
|
||||
private Cubemap environmentReflection;
|
||||
private Cubemap EnvironmentReflection
|
||||
{
|
||||
get
|
||||
{
|
||||
if (environmentReflection == null)
|
||||
{
|
||||
environmentReflection = new Cubemap(EnvironmentProbe.resolution, TextureFormat.RGBA32, true);
|
||||
}
|
||||
return environmentReflection;
|
||||
}
|
||||
}
|
||||
|
||||
private int probeRenderId = -1;
|
||||
|
||||
private float DeltaTime
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Application.isPlaying)
|
||||
return UnityEngine.Time.deltaTime;
|
||||
else
|
||||
return 1.0f / 60f;
|
||||
}
|
||||
}
|
||||
|
||||
private void Reset()
|
||||
{
|
||||
Sky = GetComponent<JSky>();
|
||||
StartTime = 0;
|
||||
TimeIncrement = 1;
|
||||
AutoTimeIncrement = true;
|
||||
Time = 0;
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
time = StartTime;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
CleanUp();
|
||||
}
|
||||
private void CleanUp()
|
||||
{
|
||||
if (environmentProbe != null)
|
||||
{
|
||||
JUtilities.DestroyGameobject(environmentProbe.gameObject);
|
||||
}
|
||||
if (environmentReflection != null)
|
||||
{
|
||||
JUtilities.DestroyObject(environmentReflection);
|
||||
}
|
||||
if (Sky != null)
|
||||
{
|
||||
Sky.DNC = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
AnimateSky();
|
||||
if (ShouldUpdateEnvironmentReflection)
|
||||
{
|
||||
UpdateEnvironmentReflection();
|
||||
}
|
||||
else
|
||||
{
|
||||
RenderSettings.defaultReflectionMode = DefaultReflectionMode.Skybox;
|
||||
}
|
||||
}
|
||||
|
||||
private void AnimateSky()
|
||||
{
|
||||
if (Profile == null)
|
||||
return;
|
||||
if (Sky == null)
|
||||
return;
|
||||
if (Sky.Profile == null)
|
||||
return;
|
||||
Sky.DNC = this;
|
||||
if (AutoTimeIncrement)
|
||||
{
|
||||
Time += TimeIncrement * DeltaTime;
|
||||
}
|
||||
float evalTime = Mathf.InverseLerp(0f, 24f, Time);
|
||||
Profile.Animate(Sky, evalTime);
|
||||
|
||||
if (Sky.Profile.EnableSun && Sky.SunLightSource != null)
|
||||
{
|
||||
float angle = evalTime * 360f;
|
||||
Matrix4x4 localRotationMatrix = Matrix4x4.Rotate(Quaternion.Euler(angle, 0, 0));
|
||||
Vector3 localDirection = localRotationMatrix.MultiplyVector(Vector3.up);
|
||||
|
||||
Transform pivot = (UseSunPivot && SunOrbitPivot != null) ? SunOrbitPivot : transform;
|
||||
Matrix4x4 localToWorld = pivot.localToWorldMatrix;
|
||||
Vector3 worldDirection = localToWorld.MultiplyVector(localDirection);
|
||||
Sky.SunLightSource.transform.forward = worldDirection;
|
||||
Sky.SunLightSource.color = Sky.Profile.Material.GetColor(JMat.SUN_LIGHT_COLOR);
|
||||
Sky.SunLightSource.intensity = Sky.Profile.Material.GetFloat(JMat.SUN_LIGHT_INTENSITY);
|
||||
}
|
||||
|
||||
if (Sky.Profile.EnableMoon && Sky.MoonLightSource != null)
|
||||
{
|
||||
float angle = evalTime * 360f;
|
||||
Matrix4x4 localRotationMatrix = Matrix4x4.Rotate(Quaternion.Euler(angle, 0, 0));
|
||||
Vector3 localDirection = localRotationMatrix.MultiplyVector(Vector3.down);
|
||||
|
||||
Transform pivot = (UseMoonPivot && MoonOrbitPivot != null) ? MoonOrbitPivot : transform;
|
||||
Matrix4x4 localToWorld = pivot.localToWorldMatrix;
|
||||
Vector3 worldDirection = localToWorld.MultiplyVector(localDirection);
|
||||
Sky.MoonLightSource.transform.forward = worldDirection;
|
||||
Sky.MoonLightSource.color = Sky.Profile.Material.GetColor(JMat.MOON_LIGHT_COLOR);
|
||||
Sky.MoonLightSource.intensity = Sky.Profile.Material.GetFloat(JMat.MOON_LIGHT_INTENSITY);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateEnvironmentReflection()
|
||||
{
|
||||
if ((SystemInfo.copyTextureSupport & CopyTextureSupport.RTToTexture) != 0)
|
||||
{
|
||||
if (EnvironmentProbe.texture == null)
|
||||
{
|
||||
probeRenderId = EnvironmentProbe.RenderProbe();
|
||||
}
|
||||
else if (EnvironmentProbe.texture != null || EnvironmentProbe.IsFinishedRendering(probeRenderId))
|
||||
{
|
||||
Graphics.CopyTexture(EnvironmentProbe.texture, EnvironmentReflection as Texture);
|
||||
RenderSettings.customReflection = EnvironmentReflection;
|
||||
RenderSettings.defaultReflectionMode = DefaultReflectionMode.Custom;
|
||||
probeRenderId = EnvironmentProbe.RenderProbe();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,130 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
[UnityEditor.InitializeOnLoad]
|
||||
#endif
|
||||
[CreateAssetMenu(menuName = "Jupiter/Day Night Cycle Profile")]
|
||||
public class JDayNightCycleProfile : ScriptableObject
|
||||
{
|
||||
private static Dictionary<string, int> propertyRemap;
|
||||
private static Dictionary<string, int> PropertyRemap
|
||||
{
|
||||
get
|
||||
{
|
||||
if (propertyRemap == null)
|
||||
{
|
||||
propertyRemap = new Dictionary<string, int>();
|
||||
}
|
||||
return propertyRemap;
|
||||
}
|
||||
set
|
||||
{
|
||||
propertyRemap = value;
|
||||
}
|
||||
}
|
||||
|
||||
static JDayNightCycleProfile()
|
||||
{
|
||||
InitPropertyRemap();
|
||||
}
|
||||
|
||||
private static void InitPropertyRemap()
|
||||
{
|
||||
PropertyRemap.Clear();
|
||||
Type type = typeof(JSkyProfile);
|
||||
PropertyInfo[] props = type.GetProperties(BindingFlags.Public | BindingFlags.Instance);
|
||||
foreach (PropertyInfo p in props)
|
||||
{
|
||||
JAnimatableAttribute animatable = p.GetCustomAttribute(typeof(JAnimatableAttribute), false) as JAnimatableAttribute;
|
||||
if (animatable == null)
|
||||
continue;
|
||||
string name = p.Name;
|
||||
int id = Shader.PropertyToID("_" + name);
|
||||
PropertyRemap.Add(name, id);
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private List<JAnimatedProperty> animatedProperties;
|
||||
public List<JAnimatedProperty> AnimatedProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
if (animatedProperties == null)
|
||||
{
|
||||
animatedProperties = new List<JAnimatedProperty>();
|
||||
}
|
||||
return animatedProperties;
|
||||
}
|
||||
set
|
||||
{
|
||||
animatedProperties = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddProperty(JAnimatedProperty p, bool setDefaultValue = true)
|
||||
{
|
||||
if (setDefaultValue)
|
||||
{
|
||||
JDayNightCycleProfile defaultProfile = JJupiterSettings.Instance.DefaultDayNightCycleProfile;
|
||||
if (defaultProfile != null)
|
||||
{
|
||||
JAnimatedProperty defaultProp = defaultProfile.AnimatedProperties.Find(p0 => p0.Name != null && p0.Name.Equals(p.Name));
|
||||
if (defaultProp != null)
|
||||
{
|
||||
p.Curve = defaultProp.Curve;
|
||||
p.Gradient = defaultProp.Gradient;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AnimatedProperties.Add(p);
|
||||
}
|
||||
|
||||
public void Animate(JSky sky, float t)
|
||||
{
|
||||
CheckDefaultProfileAndThrow(sky.Profile);
|
||||
|
||||
for (int i = 0; i < AnimatedProperties.Count; ++i)
|
||||
{
|
||||
JAnimatedProperty aProp = AnimatedProperties[i];
|
||||
int id = 0;
|
||||
if (!PropertyRemap.TryGetValue(aProp.Name, out id))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (aProp.CurveOrGradient == JCurveOrGradient.Curve)
|
||||
{
|
||||
sky.Profile.Material.SetFloat(id, aProp.EvaluateFloat(t));
|
||||
}
|
||||
else
|
||||
{
|
||||
sky.Profile.Material.SetColor(id, aProp.EvaluateColor(t));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckDefaultProfileAndThrow(JSkyProfile p)
|
||||
{
|
||||
if (p == null)
|
||||
return;
|
||||
if (p == JJupiterSettings.Instance.DefaultProfileSunnyDay ||
|
||||
p == JJupiterSettings.Instance.DefaultProfileStarryNight)
|
||||
{
|
||||
throw new ArgumentException("Animating default sky profile is prohibited. You must create a new profile for your sky to animate it.");
|
||||
}
|
||||
}
|
||||
|
||||
public bool ContainProperty(string propertyName)
|
||||
{
|
||||
return AnimatedProperties.Exists((p) => p.Name.Equals(propertyName));
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,26 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
public static class JCubemapRenderer
|
||||
{
|
||||
public static bool Render(JCubemapRendererArgs args)
|
||||
{
|
||||
GameObject go = new GameObject("~CubemapRendererCamera");
|
||||
go.transform.position = args.CameraPosition;
|
||||
|
||||
Camera cam = go.AddComponent<Camera>();
|
||||
cam.clearFlags = args.CameraClearFlag;
|
||||
cam.nearClipPlane = args.CameraNearPlane;
|
||||
cam.farClipPlane = args.CameraFarPlane;
|
||||
cam.backgroundColor = args.CameraBackgroundColor;
|
||||
|
||||
bool result = cam.RenderToCubemap(args.Cubemap, (int)args.Face);
|
||||
JUtilities.DestroyGameobject(go);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
public struct JCubemapRendererArgs
|
||||
{
|
||||
public Cubemap Cubemap { get; set; }
|
||||
|
||||
public Vector3 CameraPosition { get; set; }
|
||||
public float CameraNearPlane { get; set; }
|
||||
public float CameraFarPlane { get; set; }
|
||||
public CameraClearFlags CameraClearFlag { get; set; }
|
||||
public Color CameraBackgroundColor { get; set; }
|
||||
public int Resolution { get; set; }
|
||||
public CubemapFace Face { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.All, AllowMultiple = false)]
|
||||
public class JDisplayName : Attribute
|
||||
{
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
public JDisplayName(string name)
|
||||
{
|
||||
DisplayName = name;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,48 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
public static class JInternalMaterials
|
||||
{
|
||||
private static Material copyTextureMaterial;
|
||||
public static Material CopyTextureMaterial
|
||||
{
|
||||
get
|
||||
{
|
||||
if (copyTextureMaterial == null)
|
||||
{
|
||||
copyTextureMaterial = new Material(JJupiterSettings.Instance.InternalShaders.CopyTextureShader);
|
||||
}
|
||||
return copyTextureMaterial;
|
||||
}
|
||||
}
|
||||
|
||||
private static Material solidColorMaterial;
|
||||
public static Material SolidColorMaterial
|
||||
{
|
||||
get
|
||||
{
|
||||
if (solidColorMaterial == null)
|
||||
{
|
||||
solidColorMaterial = new Material(JJupiterSettings.Instance.InternalShaders.SolidColorShader);
|
||||
}
|
||||
return solidColorMaterial;
|
||||
}
|
||||
}
|
||||
|
||||
private static Material unlitTextureMaterial;
|
||||
public static Material UnlitTextureMaterial
|
||||
{
|
||||
get
|
||||
{
|
||||
if (unlitTextureMaterial == null)
|
||||
{
|
||||
unlitTextureMaterial = new Material(Shader.Find("Unlit/Texture"));
|
||||
}
|
||||
return unlitTextureMaterial;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,66 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
[System.Serializable]
|
||||
public struct JInternalShaderSettings
|
||||
{
|
||||
[SerializeField]
|
||||
private Shader skyShader;
|
||||
public Shader SkyShader
|
||||
{
|
||||
get
|
||||
{
|
||||
return skyShader;
|
||||
}
|
||||
set
|
||||
{
|
||||
skyShader = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private Shader skyShadowShader;
|
||||
public Shader SkyShadowShader
|
||||
{
|
||||
get
|
||||
{
|
||||
return skyShadowShader;
|
||||
}
|
||||
set
|
||||
{
|
||||
skyShadowShader = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private Shader copyTextureShader;
|
||||
public Shader CopyTextureShader
|
||||
{
|
||||
get
|
||||
{
|
||||
return copyTextureShader;
|
||||
}
|
||||
set
|
||||
{
|
||||
copyTextureShader = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private Shader solidColorShader;
|
||||
public Shader SolidColorShader
|
||||
{
|
||||
get
|
||||
{
|
||||
return solidColorShader;
|
||||
}
|
||||
set
|
||||
{
|
||||
solidColorShader = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
public class JProgressCancelledException : Exception
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
public enum JRenderPipelineType
|
||||
{
|
||||
Builtin, Lightweight, Universal
|
||||
}
|
||||
}
|
@@ -0,0 +1,757 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using System.Linq;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
/// <summary>
|
||||
/// Utility class for helper function
|
||||
/// </summary>
|
||||
public static class JUtilities
|
||||
{
|
||||
public static float DELTA_TIME = 0.0167f;
|
||||
|
||||
private static Mesh quadMesh;
|
||||
public static Mesh QuadMesh
|
||||
{
|
||||
get
|
||||
{
|
||||
if (quadMesh == null)
|
||||
{
|
||||
quadMesh = JUtilities.GetPrimitiveMesh(PrimitiveType.Quad);
|
||||
}
|
||||
return quadMesh;
|
||||
}
|
||||
}
|
||||
|
||||
public static string ListElementsToString<T>(this IEnumerable<T> list, string separator)
|
||||
{
|
||||
IEnumerator<T> i = list.GetEnumerator();
|
||||
System.Text.StringBuilder s = new System.Text.StringBuilder();
|
||||
if (i.MoveNext())
|
||||
s.Append(i.Current.ToString());
|
||||
while (i.MoveNext())
|
||||
s.Append(separator).Append(i.Current.ToString());
|
||||
return s.ToString();
|
||||
}
|
||||
|
||||
public static T[][] CreateJaggedArray<T>(int dimension1, int dimension2)
|
||||
{
|
||||
T[][] jaggedArray = new T[dimension1][];
|
||||
for (int i = 0; i < dimension1; ++i)
|
||||
{
|
||||
jaggedArray[i] = new T[dimension2];
|
||||
}
|
||||
return jaggedArray;
|
||||
}
|
||||
|
||||
public static T[] To1dArray<T>(T[][] jaggedArray)
|
||||
{
|
||||
List<T> result = new List<T>();
|
||||
for (int z = 0; z < jaggedArray.Length; ++z)
|
||||
{
|
||||
for (int x = 0; x < jaggedArray[z].Length; ++x)
|
||||
{
|
||||
result.Add(jaggedArray[z][x]);
|
||||
}
|
||||
}
|
||||
return result.ToArray();
|
||||
}
|
||||
|
||||
public static T[] To1dArray<T>(T[,] grid)
|
||||
{
|
||||
int height = grid.GetLength(0);
|
||||
int width = grid.GetLength(1);
|
||||
T[] result = new T[height * width];
|
||||
for (int z = 0; z < height; ++z)
|
||||
{
|
||||
for (int x = 0; x < width; ++x)
|
||||
{
|
||||
result[To1DIndex(x, z, width)] = grid[z, x];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void Fill<T>(T[] array, T value)
|
||||
{
|
||||
for (int i = 0; i < array.Length; ++i)
|
||||
{
|
||||
array[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static void CopyTo<T>(T[] src, T[] des)
|
||||
{
|
||||
int limit = Mathf.Min(src.Length, des.Length);
|
||||
for (int i = 0; i < limit; ++i)
|
||||
{
|
||||
des[i] = src[i];
|
||||
}
|
||||
}
|
||||
|
||||
public static int Sum(int[,] array)
|
||||
{
|
||||
int sum = 0;
|
||||
int length = array.GetLength(0);
|
||||
int width = array.GetLength(1);
|
||||
for (int z = 0; z < length; ++z)
|
||||
{
|
||||
for (int x = 0; x < width; ++x)
|
||||
{
|
||||
sum += array[z, x];
|
||||
}
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
public static int To1DIndex(int x, int z, int width)
|
||||
{
|
||||
return z * width + x;
|
||||
}
|
||||
|
||||
public static bool IsInRange(float number, float minValue, float maxValue)
|
||||
{
|
||||
return number >= minValue && number <= maxValue;
|
||||
}
|
||||
|
||||
public static bool IsInRangeExclusive(float number, float minValue, float maxValue)
|
||||
{
|
||||
return number > minValue && number < maxValue;
|
||||
}
|
||||
|
||||
public static float GetFraction(float value, float floor, float ceil)
|
||||
{
|
||||
return (value - floor) / (ceil - floor);
|
||||
}
|
||||
|
||||
public static void ClearChildren(Transform t)
|
||||
{
|
||||
int childCount = t.childCount;
|
||||
for (int i = childCount - 1; i >= 0; --i)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
if (!UnityEditor.EditorApplication.isPlaying)
|
||||
{
|
||||
GameObject.DestroyImmediate(t.GetChild(i).gameObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameObject.Destroy(t.GetChild(i).gameObject);
|
||||
}
|
||||
#else
|
||||
GameObject.Destroy(t.GetChild(i).gameObject);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
public static Gradient CreateFullWhiteGradient()
|
||||
{
|
||||
Gradient g = new Gradient();
|
||||
GradientColorKey color = new GradientColorKey(Color.white, 1);
|
||||
GradientAlphaKey alpha = new GradientAlphaKey(1, 1);
|
||||
g.SetKeys(new GradientColorKey[] { color }, new GradientAlphaKey[] { alpha });
|
||||
return g;
|
||||
}
|
||||
|
||||
public static Gradient CreateFullTransparentGradient()
|
||||
{
|
||||
Gradient g = new Gradient();
|
||||
GradientColorKey color = new GradientColorKey(Color.white, 1);
|
||||
GradientAlphaKey alpha = new GradientAlphaKey(0, 1);
|
||||
g.SetKeys(new GradientColorKey[] { color }, new GradientAlphaKey[] { alpha });
|
||||
return g;
|
||||
}
|
||||
|
||||
public static void CalculateBarycentricCoord(Vector2 p, Vector2 p1, Vector2 p2, Vector2 p3, ref Vector3 bary)
|
||||
{
|
||||
Vector2 v0 = p2 - p1;
|
||||
Vector2 v1 = p3 - p1;
|
||||
Vector2 v2 = p - p1;
|
||||
float d00 = Vector2.Dot(v0, v0);
|
||||
float d01 = Vector2.Dot(v0, v1);
|
||||
float d11 = Vector2.Dot(v1, v1);
|
||||
float d20 = Vector2.Dot(v2, v0);
|
||||
float d21 = Vector2.Dot(v2, v1);
|
||||
float inverseDenom = 1 / (d00 * d11 - d01 * d01);
|
||||
bary.y = (d11 * d20 - d01 * d21) * inverseDenom;
|
||||
bary.z = (d00 * d21 - d01 * d20) * inverseDenom;
|
||||
bary.x = 1.0f - bary.y - bary.z;
|
||||
}
|
||||
|
||||
public static void ExpandTrisUvCoord(Texture2D tex, Vector2[] trisUv)
|
||||
{
|
||||
Vector2 texelSize = tex.texelSize;
|
||||
Vector2 center = (trisUv[0] + trisUv[1] + trisUv[2]) / 3;
|
||||
trisUv[0] += (trisUv[0] - center).normalized * texelSize.magnitude;
|
||||
trisUv[0].x = Mathf.Clamp01(trisUv[0].x);
|
||||
trisUv[0].y = Mathf.Clamp01(trisUv[0].y);
|
||||
|
||||
trisUv[1] += (trisUv[1] - center).normalized * texelSize.magnitude;
|
||||
trisUv[1].x = Mathf.Clamp01(trisUv[1].x);
|
||||
trisUv[1].y = Mathf.Clamp01(trisUv[1].y);
|
||||
|
||||
trisUv[2] += (trisUv[2] - center).normalized * texelSize.magnitude;
|
||||
trisUv[2].x = Mathf.Clamp01(trisUv[2].x);
|
||||
trisUv[2].y = Mathf.Clamp01(trisUv[2].y);
|
||||
}
|
||||
|
||||
public static bool ContainIdenticalElements<T>(T[] arr1, T[] arr2)
|
||||
{
|
||||
if (arr1 == null && arr2 == null)
|
||||
return true;
|
||||
if (arr1 == null && arr2 != null)
|
||||
return false;
|
||||
if (arr1 != null && arr2 == null)
|
||||
return false;
|
||||
if (arr1.Length != arr2.Length)
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < arr1.Length; ++i)
|
||||
{
|
||||
if (!arr1[i].Equals(arr2[i]))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static float GetNearestMultiple(float number, float multipleOf)
|
||||
{
|
||||
int multiplier = 0;
|
||||
while (multipleOf * multiplier < number)
|
||||
{
|
||||
multiplier += 1;
|
||||
}
|
||||
|
||||
float floor = multipleOf * (multiplier - 1);
|
||||
float ceil = multipleOf * multiplier;
|
||||
float f0 = number - floor;
|
||||
float f1 = ceil - number;
|
||||
|
||||
if (f0 < f1)
|
||||
return floor;
|
||||
else
|
||||
return ceil;
|
||||
}
|
||||
|
||||
public static Transform GetChildrenWithName(Transform parent, string name)
|
||||
{
|
||||
Transform t = parent.Find(name);
|
||||
if (t == null)
|
||||
{
|
||||
GameObject g = new GameObject(name);
|
||||
g.transform.parent = parent;
|
||||
ResetTransform(g.transform, parent);
|
||||
t = g.transform;
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
public static void ResetTransform(Transform t, Transform parent)
|
||||
{
|
||||
t.parent = parent;
|
||||
t.localPosition = Vector3.zero;
|
||||
t.localRotation = Quaternion.identity;
|
||||
t.localScale = Vector3.one;
|
||||
}
|
||||
|
||||
public static void DestroyGameobject(GameObject g)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
if (UnityEditor.EditorApplication.isPlaying)
|
||||
GameObject.Destroy(g);
|
||||
else
|
||||
GameObject.DestroyImmediate(g);
|
||||
#else
|
||||
GameObject.Destroy(g);
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void DestroyGameObjectWithUndo(GameObject g)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
Undo.DestroyObjectImmediate(g);
|
||||
#else
|
||||
DestroyGameobject(g);
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void DestroyObject(Object o)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
if (UnityEditor.EditorApplication.isPlaying)
|
||||
Object.Destroy(o);
|
||||
else
|
||||
Object.DestroyImmediate(o, true);
|
||||
#else
|
||||
GameObject.Destroy(o);
|
||||
#endif
|
||||
}
|
||||
|
||||
public static string Repeat(char src, int count)
|
||||
{
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
sb.Append(src, count);
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public static void MarkCurrentSceneDirty()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
if (!UnityEditor.EditorApplication.isPlaying)
|
||||
UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(UnityEditor.SceneManagement.EditorSceneManager.GetActiveScene());
|
||||
#endif
|
||||
}
|
||||
|
||||
public static GameObject[] GetChildrenGameObjects(Transform parent)
|
||||
{
|
||||
GameObject[] children = new GameObject[parent.childCount];
|
||||
for (int i = 0; i < parent.childCount; ++i)
|
||||
{
|
||||
children[i] = parent.GetChild(i).gameObject;
|
||||
}
|
||||
return children;
|
||||
}
|
||||
|
||||
public static Transform[] GetChildrenTransforms(Transform parent)
|
||||
{
|
||||
Transform[] children = new Transform[parent.childCount];
|
||||
for (int i = 0; i < parent.childCount; ++i)
|
||||
{
|
||||
children[i] = parent.GetChild(i);
|
||||
}
|
||||
return children;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// https://en.wikipedia.org/wiki/Rodrigues%27_rotation_formula
|
||||
/// </summary>
|
||||
/// <param name="vector"></param>
|
||||
/// <param name="normal"></param>
|
||||
/// <param name="angleDegree"></param>
|
||||
/// <returns></returns>
|
||||
public static Vector3 RotateVectorAroundNormal(Vector3 vector, Vector3 normal, float angleDegree)
|
||||
{
|
||||
float sin = Mathf.Sin(angleDegree * Mathf.Deg2Rad);
|
||||
float cos = Mathf.Cos(angleDegree * Mathf.Deg2Rad);
|
||||
Vector3 rotatedVector =
|
||||
vector * cos +
|
||||
Vector3.Cross(normal, vector) * sin +
|
||||
normal * Vector3.Dot(normal, vector) * (1 - cos);
|
||||
return rotatedVector;
|
||||
}
|
||||
|
||||
public static Mesh GetPrimitiveMesh(PrimitiveType type)
|
||||
{
|
||||
GameObject g = GameObject.CreatePrimitive(type);
|
||||
Mesh m = g.GetComponent<MeshFilter>().sharedMesh;
|
||||
DestroyGameobject(g);
|
||||
return m;
|
||||
}
|
||||
|
||||
public static void ShuffleList<T>(List<T> list)
|
||||
{
|
||||
int length = list.Count;
|
||||
for (int i = 0; i < length - 1; ++i)
|
||||
{
|
||||
int j = UnityEngine.Random.Range(0, length);
|
||||
T tmp = list[i];
|
||||
list[i] = list[j];
|
||||
list[j] = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
public static int[] GetShuffleIndicesArray(int length)
|
||||
{
|
||||
int[] indices = GetIndicesArray(length);
|
||||
for (int i = 0; i < length - 1; ++i)
|
||||
{
|
||||
int j = UnityEngine.Random.Range(0, length);
|
||||
int tmp = indices[i];
|
||||
indices[i] = indices[j];
|
||||
indices[j] = tmp;
|
||||
}
|
||||
|
||||
return indices;
|
||||
}
|
||||
|
||||
public static int[] GetIndicesArray(int length)
|
||||
{
|
||||
int[] indices = new int[length];
|
||||
for (int i = 0; i < length; ++i)
|
||||
{
|
||||
indices[i] = i;
|
||||
}
|
||||
return indices;
|
||||
}
|
||||
|
||||
public static void ResetArray<T>(ref T[] array, int count, T defaultValue)
|
||||
{
|
||||
if (array != null && array.Length == count)
|
||||
{
|
||||
JUtilities.Fill(array, defaultValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
array = new T[count];
|
||||
}
|
||||
}
|
||||
|
||||
public static bool EnsureArrayLength<T>(ref T[] array, int count)
|
||||
{
|
||||
if (array == null || array.Length != count)
|
||||
{
|
||||
array = new T[count];
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static float GetValueBilinear(float[] data, int width, int height, Vector2 uv)
|
||||
{
|
||||
float value = 0;
|
||||
Vector2 pixelCoord = new Vector2(
|
||||
Mathf.Lerp(0, width - 1, uv.x),
|
||||
Mathf.Lerp(0, height - 1, uv.y));
|
||||
//apply a bilinear filter
|
||||
int xFloor = Mathf.FloorToInt(pixelCoord.x);
|
||||
int xCeil = Mathf.CeilToInt(pixelCoord.x);
|
||||
int yFloor = Mathf.FloorToInt(pixelCoord.y);
|
||||
int yCeil = Mathf.CeilToInt(pixelCoord.y);
|
||||
|
||||
float f00 = data[JUtilities.To1DIndex(xFloor, yFloor, width)];
|
||||
float f01 = data[JUtilities.To1DIndex(xFloor, yCeil, width)];
|
||||
float f10 = data[JUtilities.To1DIndex(xCeil, yFloor, width)];
|
||||
float f11 = data[JUtilities.To1DIndex(xCeil, yCeil, width)];
|
||||
|
||||
Vector2 unitCoord = new Vector2(
|
||||
pixelCoord.x - xFloor,
|
||||
pixelCoord.y - yFloor);
|
||||
|
||||
value =
|
||||
f00 * (1 - unitCoord.x) * (1 - unitCoord.y) +
|
||||
f01 * (1 - unitCoord.x) * unitCoord.y +
|
||||
f10 * unitCoord.x * (1 - unitCoord.y) +
|
||||
f11 * unitCoord.x * unitCoord.y;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Color GetColorBilinear(Color[] textureData, int width, int height, Vector2 uv)
|
||||
{
|
||||
Color color = Color.clear;
|
||||
Vector2 pixelCoord = new Vector2(
|
||||
Mathf.Lerp(0, width - 1, uv.x),
|
||||
Mathf.Lerp(0, height - 1, uv.y));
|
||||
//apply a bilinear filter
|
||||
int xFloor = Mathf.FloorToInt(pixelCoord.x);
|
||||
int xCeil = Mathf.CeilToInt(pixelCoord.x);
|
||||
int yFloor = Mathf.FloorToInt(pixelCoord.y);
|
||||
int yCeil = Mathf.CeilToInt(pixelCoord.y);
|
||||
|
||||
Color f00 = textureData[JUtilities.To1DIndex(xFloor, yFloor, width)];
|
||||
Color f01 = textureData[JUtilities.To1DIndex(xFloor, yCeil, width)];
|
||||
Color f10 = textureData[JUtilities.To1DIndex(xCeil, yFloor, width)];
|
||||
Color f11 = textureData[JUtilities.To1DIndex(xCeil, yCeil, width)];
|
||||
|
||||
Vector2 unitCoord = new Vector2(
|
||||
pixelCoord.x - xFloor,
|
||||
pixelCoord.y - yFloor);
|
||||
|
||||
color =
|
||||
f00 * (1 - unitCoord.x) * (1 - unitCoord.y) +
|
||||
f01 * (1 - unitCoord.x) * unitCoord.y +
|
||||
f10 * unitCoord.x * (1 - unitCoord.y) +
|
||||
f11 * unitCoord.x * unitCoord.y;
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
public static GameObject CreatePreviewGameObject(Mesh m, Material mat, Vector3 position)
|
||||
{
|
||||
GameObject g = new GameObject("GO");
|
||||
g.transform.position = position;
|
||||
g.transform.rotation = Quaternion.identity;
|
||||
g.transform.localScale = Vector3.one;
|
||||
|
||||
MeshFilter mf = g.AddComponent<MeshFilter>();
|
||||
mf.sharedMesh = m;
|
||||
|
||||
MeshRenderer mr = g.AddComponent<MeshRenderer>();
|
||||
mr.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
|
||||
mr.receiveShadows = false;
|
||||
mr.sharedMaterial = mat;
|
||||
|
||||
return g;
|
||||
}
|
||||
|
||||
public static Camera CreatePreviewCamera(GameObject target, float distance, float padding)
|
||||
{
|
||||
GameObject g = new GameObject("CAM");
|
||||
g.transform.rotation = Quaternion.identity;
|
||||
g.transform.localScale = Vector3.one;
|
||||
|
||||
Camera cam = g.AddComponent<Camera>();
|
||||
cam.orthographic = true;
|
||||
cam.clearFlags = CameraClearFlags.Nothing;
|
||||
cam.aspect = 1;
|
||||
|
||||
MeshRenderer mr = target.GetComponent<MeshRenderer>();
|
||||
Bounds bounds = mr.bounds;
|
||||
cam.transform.position = bounds.center + new Vector3(-1, 0.5f, -1) * distance;
|
||||
cam.transform.LookAt(bounds.center);
|
||||
cam.orthographicSize = Mathf.Max(bounds.size.x, bounds.size.y, bounds.size.z) / 2 + padding;
|
||||
|
||||
return cam;
|
||||
}
|
||||
|
||||
public static void EnsureDirectoryExists(string dir)
|
||||
{
|
||||
if (!System.IO.Directory.Exists(dir))
|
||||
{
|
||||
System.IO.Directory.CreateDirectory(dir);
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetStaticRecursively(GameObject g, bool isStatic)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
g.isStatic = isStatic;
|
||||
GameObject[] children = GetChildrenGameObjects(g.transform);
|
||||
for (int i = 0; i < children.Length; ++i)
|
||||
{
|
||||
SetStaticRecursively(children[i], isStatic);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void EnsureLengthSufficient<T>(List<T> list, int preferredLength) where T : Object
|
||||
{
|
||||
if (list == null)
|
||||
list = new List<T>();
|
||||
while (list.Count < preferredLength)
|
||||
{
|
||||
list.Add(null);
|
||||
}
|
||||
}
|
||||
|
||||
public static void EnsureLengthSufficient(List<string> list, int preferredLength)
|
||||
{
|
||||
if (list == null)
|
||||
list = new List<string>();
|
||||
while (list.Count < preferredLength)
|
||||
{
|
||||
list.Add(string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
public static void EnsureLengthSufficient(List<bool> list, int preferredLength)
|
||||
{
|
||||
if (list == null)
|
||||
list = new List<bool>();
|
||||
while (list.Count < preferredLength)
|
||||
{
|
||||
list.Add(false);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Ellipsis(string s, int length)
|
||||
{
|
||||
if (s.Length < length)
|
||||
return s;
|
||||
string s0 = s.Substring(0, length);
|
||||
return s0 + "...";
|
||||
}
|
||||
|
||||
public static bool IsRectContainPointExclusive(Rect r, Vector2 p)
|
||||
{
|
||||
return
|
||||
p.x > r.min.x &&
|
||||
p.x < r.max.x &&
|
||||
p.y > r.min.y &&
|
||||
p.y < r.max.y;
|
||||
}
|
||||
|
||||
public static Color GetColor(Color baseColor, float alpha)
|
||||
{
|
||||
return new Color(baseColor.r, baseColor.g, baseColor.b, alpha);
|
||||
}
|
||||
|
||||
public static Rect GetRectContainsPoints(params Vector2[] points)
|
||||
{
|
||||
float xMin = float.MaxValue;
|
||||
float xMax = float.MinValue;
|
||||
float yMin = float.MaxValue;
|
||||
float yMax = float.MinValue;
|
||||
for (int i = 0; i < points.Length; ++i)
|
||||
{
|
||||
xMin = points[i].x < xMin ? points[i].x : xMin;
|
||||
xMax = points[i].x > xMax ? points[i].x : xMax;
|
||||
yMin = points[i].y < yMin ? points[i].y : yMin;
|
||||
yMax = points[i].y > yMax ? points[i].y : yMax;
|
||||
}
|
||||
return Rect.MinMaxRect(xMin, yMin, xMax, yMax);
|
||||
}
|
||||
|
||||
public static float InverseLerpUnclamped(float a, float b, float value)
|
||||
{
|
||||
if (a != b)
|
||||
{
|
||||
return (value - a) / (b - a);
|
||||
}
|
||||
return 0f;
|
||||
}
|
||||
|
||||
public static Vector2 PointToNormalizedUnclampled(Rect r, Vector2 point)
|
||||
{
|
||||
return new Vector2(InverseLerpUnclamped(r.x, r.xMax, point.x), InverseLerpUnclamped(r.y, r.yMax, point.y));
|
||||
}
|
||||
|
||||
public static Rect GetUvRect(Vector2 v0, Vector2 v1, Vector2 v2)
|
||||
{
|
||||
return Rect.MinMaxRect(
|
||||
Mathf.Min(v0.x, v1.x, v2.x),
|
||||
Mathf.Min(v0.y, v1.y, v2.y),
|
||||
Mathf.Max(v0.x, v1.x, v2.x),
|
||||
Mathf.Max(v0.y, v1.y, v2.y));
|
||||
}
|
||||
|
||||
public static Gradient Clone(Gradient src)
|
||||
{
|
||||
if (src == null)
|
||||
return null;
|
||||
Gradient des = new Gradient();
|
||||
des.SetKeys(src.colorKeys, src.alphaKeys);
|
||||
return des;
|
||||
}
|
||||
|
||||
public static AnimationCurve Clone(AnimationCurve src)
|
||||
{
|
||||
if (src == null)
|
||||
return null;
|
||||
AnimationCurve des = new AnimationCurve();
|
||||
Keyframe[] keys = src.keys;
|
||||
for (int i = 0; i < keys.Length; ++i)
|
||||
{
|
||||
des.AddKey(keys[i]);
|
||||
}
|
||||
|
||||
des.preWrapMode = src.preWrapMode;
|
||||
des.postWrapMode = src.postWrapMode;
|
||||
return des;
|
||||
}
|
||||
|
||||
public static bool IsPointInsideQuadXZ(Vector3 point, Vector3[] quad)
|
||||
{
|
||||
Vector3 bary = Vector3.zero;
|
||||
CalculateBarycentricCoord(
|
||||
new Vector2(point.x, point.z),
|
||||
new Vector2(quad[0].x, quad[0].z),
|
||||
new Vector2(quad[1].x, quad[1].z),
|
||||
new Vector2(quad[2].x, quad[2].z),
|
||||
ref bary);
|
||||
if (bary.x >= 0 && bary.y >= 0 && bary.z >= 0)
|
||||
return true;
|
||||
|
||||
CalculateBarycentricCoord(
|
||||
new Vector2(point.x, point.z),
|
||||
new Vector2(quad[0].x, quad[0].z),
|
||||
new Vector2(quad[2].x, quad[2].z),
|
||||
new Vector2(quad[3].x, quad[3].z),
|
||||
ref bary);
|
||||
if (bary.x >= 0 && bary.y >= 0 && bary.z >= 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void DestroyMeshArray(Mesh[] meshes)
|
||||
{
|
||||
for (int i = 0; i < meshes.Length; ++i)
|
||||
{
|
||||
if (meshes[i] != null)
|
||||
{
|
||||
Object.DestroyImmediate(meshes[i], true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Vector2 FlipY(Vector2 v)
|
||||
{
|
||||
return new Vector2(v.x, 1 - v.y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// https://en.wikipedia.org/wiki/Delaunay_triangulation#Algorithms
|
||||
/// </summary>
|
||||
/// <param name="v0"></param>
|
||||
/// <param name="v1"></param>
|
||||
/// <param name="v2"></param>
|
||||
/// <param name="p"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsPointInCircumcircle(Vector2 v0, Vector2 v1, Vector2 v2, Vector2 p)
|
||||
{
|
||||
Matrix4x4 mat = new Matrix4x4();
|
||||
mat.SetRow(0, new Vector4(v0.x, v0.y, v0.x * v0.x + v0.y * v0.y, 1));
|
||||
mat.SetRow(1, new Vector4(v2.x, v2.y, v2.x * v2.x + v2.y * v2.y, 1)); //a,b,c counterclockwise
|
||||
mat.SetRow(2, new Vector4(v1.x, v1.y, v1.x * v1.x + v1.y * v1.y, 1));
|
||||
mat.SetRow(3, new Vector4(p.x, p.y, p.x * p.x + p.y * p.y, 1));
|
||||
|
||||
return mat.determinant > 0;
|
||||
}
|
||||
|
||||
public static bool IsPointInCircumcircleXZ(Vector3 v0, Vector3 v1, Vector3 v2, Vector3 p)
|
||||
{
|
||||
Matrix4x4 mat = new Matrix4x4();
|
||||
mat.SetRow(0, new Vector4(v0.x, v0.z, v0.x * v0.x + v0.z * v0.z, 1));
|
||||
mat.SetRow(1, new Vector4(v2.x, v2.z, v2.x * v2.x + v2.z * v2.z, 1)); //a,b,c counterclockwise
|
||||
mat.SetRow(2, new Vector4(v1.x, v1.z, v1.x * v1.x + v1.z * v1.z, 1));
|
||||
mat.SetRow(3, new Vector4(p.x, p.z, p.x * p.x + p.z * p.z, 1));
|
||||
|
||||
return mat.determinant > 0;
|
||||
}
|
||||
|
||||
public static bool AreSetEqual(ushort[] setA, ushort[] setB)
|
||||
{
|
||||
HashSet<ushort> a = new HashSet<ushort>(setA);
|
||||
HashSet<ushort> b = new HashSet<ushort>(setB);
|
||||
return a.SetEquals(b);
|
||||
}
|
||||
|
||||
public static void Distinct<T>(this List<T> list)
|
||||
{
|
||||
list.Distinct();
|
||||
}
|
||||
|
||||
public static void AddIfNotContains<T>(this IList<T> list, IEnumerable<T> items)
|
||||
{
|
||||
IEnumerator<T> iter = items.GetEnumerator();
|
||||
while (iter.MoveNext())
|
||||
{
|
||||
T current = iter.Current;
|
||||
if (!list.Contains(current))
|
||||
{
|
||||
list.Add(current);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void AddIfNotContains<T>(this IList<T> list, T item)
|
||||
{
|
||||
if (!list.Contains(item))
|
||||
{
|
||||
list.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
public static Vector3 ToX0Y(this Vector2 v)
|
||||
{
|
||||
return new Vector3(v.x, 0, v.y);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,52 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Pinwheel.Jupiter
|
||||
{
|
||||
/// <summary>
|
||||
/// Utility class contains product info
|
||||
/// </summary>
|
||||
public static class JVersionInfo
|
||||
{
|
||||
public static string Code
|
||||
{
|
||||
get
|
||||
{
|
||||
return "1.2.14";
|
||||
}
|
||||
}
|
||||
|
||||
public static string ProductName
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Jupiter - Procedural Sky";
|
||||
}
|
||||
}
|
||||
|
||||
public static string ProductNameAndVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format("{0} v{1}", ProductName, Code);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ProductNameShort
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Jupiter";
|
||||
}
|
||||
}
|
||||
|
||||
public static string ProductNameAndVersionShort
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format("{0} v{1}", ProductNameShort, Code);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
#ifndef FILE_INCLUDED
|
||||
#define FILE_INCLUDED
|
||||
|
||||
|
||||
|
||||
#endif
|
@@ -0,0 +1,162 @@
|
||||
#ifndef COMMON_INCLUDED
|
||||
#define COMMON_INCLUDED
|
||||
|
||||
sampler2D _NoiseTex;
|
||||
sampler2D _CloudTex;
|
||||
|
||||
float NoiseTexFrag(float2 uv)
|
||||
{
|
||||
return tex2D(_NoiseTex, uv).r*2 - 1;
|
||||
}
|
||||
|
||||
float NoiseTexVert(float2 uv)
|
||||
{
|
||||
return tex2Dlod(_NoiseTex, float4(uv.xy, 0, 0)).r*2 - 1;
|
||||
}
|
||||
|
||||
float CloudTexFrag(float2 uv)
|
||||
{
|
||||
return tex2D(_CloudTex, uv).r*2 - 1;
|
||||
}
|
||||
|
||||
float CloudTexLod0(float2 uv)
|
||||
{
|
||||
return tex2Dlod(_CloudTex, float4(uv.xy, 0, 0)).r*2 - 1;
|
||||
}
|
||||
|
||||
float CloudTexVert(float2 uv)
|
||||
{
|
||||
return CloudTexLod0(uv);
|
||||
}
|
||||
|
||||
float2 GradientNoise_dir(float2 p)
|
||||
{
|
||||
p = p % 289;
|
||||
float x = (34 * p.x + 1) * p.x % 289 + p.y;
|
||||
x = (34 * x + 1) * x % 289;
|
||||
x = frac(x / 41) * 2 - 1;
|
||||
return normalize(float2(x - floor(x + 0.5), abs(x) - 0.5));
|
||||
}
|
||||
|
||||
float GradientNoise(float2 p)
|
||||
{
|
||||
float2 ip = floor(p);
|
||||
float2 fp = frac(p);
|
||||
float d00 = dot(GradientNoise_dir(ip), fp);
|
||||
float d01 = dot(GradientNoise_dir(ip + float2(0, 1)), fp - float2(0, 1));
|
||||
float d10 = dot(GradientNoise_dir(ip + float2(1, 0)), fp - float2(1, 0));
|
||||
float d11 = dot(GradientNoise_dir(ip + float2(1, 1)), fp - float2(1, 1));
|
||||
fp = fp * fp * fp * (fp * (fp * 6 - 15) + 10);
|
||||
return lerp(lerp(d00, d01, fp.y), lerp(d10, d11, fp.y), fp.x);
|
||||
}
|
||||
|
||||
float InverseLerpUnclamped(float a, float b, float value)
|
||||
{
|
||||
//adding a==b check if needed
|
||||
return (value - a) / (b - a + 0.00000001);
|
||||
}
|
||||
|
||||
float RandomValue(float seed)
|
||||
{
|
||||
return frac(seed*23.456*(1+ceil(seed)*12.345));
|
||||
}
|
||||
|
||||
float RandomValue(float3 seed)
|
||||
{
|
||||
float3 value = frac(seed*23.456*(1+ceil(seed)*12.345));
|
||||
return max(value.x, min(value.y, value.z));
|
||||
}
|
||||
|
||||
float2 VoronoiRandomVector (float2 UV, float offset)
|
||||
{
|
||||
float2x2 m = float2x2(15.27, 47.63, 99.41, 89.98);
|
||||
UV = frac(sin(mul(UV, m)) * 46839.32);
|
||||
return float2(sin(UV.y*+offset)*0.5+0.5, cos(UV.x*offset)*0.5+0.5);
|
||||
}
|
||||
|
||||
float Voronoi(float2 UV, float AngleOffset, float CellDensity)
|
||||
{
|
||||
float2 g = floor(UV * CellDensity);
|
||||
float2 f = frac(UV * CellDensity);
|
||||
float t = 8.0;
|
||||
float3 res = float3(8.0, 0.0, 0.0);
|
||||
float noiseValue = 0;
|
||||
|
||||
for(int y=-1; y<=1; y++)
|
||||
{
|
||||
for(int x=-1; x<=1; x++)
|
||||
{
|
||||
float2 lattice = float2(x,y);
|
||||
float2 offset = VoronoiRandomVector(lattice + g, AngleOffset);
|
||||
float d = distance(lattice + offset, f);
|
||||
if(d < res.x)
|
||||
{
|
||||
res = float3(d, offset.x, offset.y);
|
||||
noiseValue = res.x;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return noiseValue;
|
||||
}
|
||||
|
||||
float2 PanUV(float2 uv, float2 speed)
|
||||
{
|
||||
return uv + _Time.y*speed;
|
||||
}
|
||||
|
||||
half IsOrtho()
|
||||
{
|
||||
return unity_OrthoParams.w;
|
||||
}
|
||||
|
||||
half GetNearPlane()
|
||||
{
|
||||
return _ProjectionParams.y;
|
||||
}
|
||||
|
||||
half GetFarPlane()
|
||||
{
|
||||
return _ProjectionParams.z;
|
||||
}
|
||||
|
||||
float SqrDistance(float3 pt1, float3 pt2)
|
||||
{
|
||||
float3 v = pt2 - pt1;
|
||||
return dot(v,v);
|
||||
}
|
||||
|
||||
fixed SqrDistance(fixed pt1, fixed pt2)
|
||||
{
|
||||
fixed v = pt2 - pt1;
|
||||
return dot(v,v);
|
||||
}
|
||||
|
||||
float SqrMagnitude(float2 p)
|
||||
{
|
||||
return p.x*p.x + p.y*p.y;
|
||||
}
|
||||
|
||||
float SqrMagnitude(float3 p)
|
||||
{
|
||||
return p.x*p.x + p.y*p.y + p.z*p.z;
|
||||
}
|
||||
|
||||
float StepValue(float v, float count)
|
||||
{
|
||||
float step = 1.0/count;
|
||||
return v-v%step;
|
||||
}
|
||||
|
||||
float TriangleWave(float t)
|
||||
{
|
||||
return 2.0 * abs( 2 * (t - floor(0.5 + t)) ) - 1.0;
|
||||
}
|
||||
|
||||
fixed4 BlendOverlay(fixed4 src, fixed4 des)
|
||||
{
|
||||
fixed4 result = src*src.a + des*(1-src.a);
|
||||
result.a = 1 - (1-src.a)*(1-des.a);
|
||||
return result;
|
||||
}
|
||||
#endif
|
@@ -0,0 +1,33 @@
|
||||
#ifndef DETAIL_OVERLAY_INCLUDED
|
||||
#define DETAIL_OVERLAY_INCLUDED
|
||||
|
||||
void CalculateDetailOverlayColor(
|
||||
float4 localPos,
|
||||
samplerCUBE cubemap,
|
||||
fixed4 tint,
|
||||
out fixed4 color)
|
||||
{
|
||||
color = texCUBE(cubemap, localPos.xyz);
|
||||
color *= tint;
|
||||
}
|
||||
|
||||
void CalculateDetailOverlayColor(
|
||||
float4 localPos,
|
||||
samplerCUBE cubemap,
|
||||
fixed4 tint,
|
||||
float rotationSpeed,
|
||||
out fixed4 color)
|
||||
{
|
||||
float angle = rotationSpeed*_Time.y;
|
||||
float sinY = sin(radians(angle));
|
||||
float cosY = cos(radians(angle));
|
||||
float3x3 ry = float3x3(cosY, 0, sinY,
|
||||
0, 1, 0,
|
||||
-sinY, 0, cosY);
|
||||
localPos.xyz = mul(ry, localPos.xyz);
|
||||
|
||||
color = texCUBE(cubemap, localPos.xyz);
|
||||
color *= tint;
|
||||
}
|
||||
|
||||
#endif
|
@@ -0,0 +1,52 @@
|
||||
#ifndef HORIZON_CLOUD_INCLUDED
|
||||
#define HORIZON_CLOUD_INCLUDED
|
||||
|
||||
#include "JCommon.cginc"
|
||||
|
||||
void CalculateHorizonCloudColor(
|
||||
float4 localPos,
|
||||
fixed4 cloudColor,
|
||||
fixed cloudStart, fixed cloudEnd,
|
||||
fixed cloudSize, fixed cloudStep,
|
||||
fixed animationSpeed,
|
||||
out fixed4 color)
|
||||
{
|
||||
fixed fadeBottom = saturate(InverseLerpUnclamped(cloudStart, 0, localPos.y));
|
||||
fixed fadeTop = saturate(InverseLerpUnclamped(cloudEnd, 0, localPos.y));
|
||||
fixed fade = saturate(lerp(fadeBottom, fadeTop, localPos.y >= 0));
|
||||
fade = fade*fade;
|
||||
|
||||
fixed loop;
|
||||
#if SHADER_API_MOBILE
|
||||
loop = 1;
|
||||
#else
|
||||
loop = 2;
|
||||
#endif
|
||||
|
||||
fixed noise = 0;
|
||||
fixed sample0 = 0;
|
||||
fixed sample1 = 0;
|
||||
fixed noiseSize = cloudSize + 0.0001;
|
||||
fixed noiseAmp = 1;
|
||||
fixed sign = -1;
|
||||
fixed2 span = animationSpeed*_Time.y*0.0001;
|
||||
for (fixed i=0; i<loop; ++i)
|
||||
{
|
||||
sample0 = CloudTexLod0((localPos.xy)/noiseSize + sign*span)*noiseAmp;
|
||||
sample1 = CloudTexLod0((localPos.yz)/noiseSize + sign*span)*noiseAmp;
|
||||
noise += (sample0 + sample1)*0.5;
|
||||
noiseSize *= 0.5;
|
||||
noiseAmp *= 0.5;
|
||||
sign *= -1;
|
||||
}
|
||||
|
||||
noise = noise*0.5 + 0.5;
|
||||
|
||||
#if ALLOW_STEP_EFFECT
|
||||
noise = StepValue(noise, cloudStep);
|
||||
#endif
|
||||
|
||||
color = fixed4(1, 1, 1, fade*noise*2)*cloudColor;
|
||||
}
|
||||
|
||||
#endif
|
@@ -0,0 +1,65 @@
|
||||
#ifndef OVERHEAD_CLOUD_INCLUDED
|
||||
#define OVERHEAD_CLOUD_INCLUDED
|
||||
|
||||
#include "JCommon.cginc"
|
||||
|
||||
void CalculateOverheadCloudColor(
|
||||
float4 localPos,
|
||||
fixed4 cloudColor,
|
||||
fixed cloudAltitude,
|
||||
fixed cloudSize, fixed cloudStep,
|
||||
fixed animationSpeed,
|
||||
fixed flowX, fixed flowZ,
|
||||
fixed remapMin, fixed remapMax,
|
||||
out fixed4 color)
|
||||
{
|
||||
fixed3 rayDir = localPos.xyz;
|
||||
float3 cloudPlaneOrigin = float3(0, cloudAltitude, 0);
|
||||
float3 cloudPlaneNormal = float3(0, 1, 0);
|
||||
|
||||
float rayLength = dot(cloudPlaneOrigin, cloudPlaneNormal) / (dot(rayDir, cloudPlaneNormal) + 0.000001);
|
||||
float3 intersectionPoint = rayDir * rayLength;
|
||||
|
||||
fixed loop;
|
||||
#if SHADER_API_MOBILE
|
||||
loop = 1;
|
||||
#else
|
||||
loop = 2;
|
||||
#endif
|
||||
|
||||
fixed noise = 0;
|
||||
fixed sample = 0;
|
||||
fixed noiseSize = cloudSize * 1000 + 0.0001;
|
||||
fixed noiseAmp = 1;
|
||||
fixed sign = -1;
|
||||
fixed2 span = fixed2(flowX, flowZ) * animationSpeed * _Time.y * 0.0001;
|
||||
for (fixed i = 0; i < loop; ++i)
|
||||
{
|
||||
sample = CloudTexLod0((intersectionPoint.xz) / noiseSize + sign * span) * noiseAmp;
|
||||
noise += sample;
|
||||
noiseSize *= 0.5;
|
||||
noiseAmp *= 0.5;
|
||||
sign *= -1;
|
||||
}
|
||||
noise = noise * 0.5 + 0.5;
|
||||
noise = noise * cloudColor.a;
|
||||
noise = lerp(remapMin, remapMax, noise);
|
||||
noise = saturate(noise);
|
||||
|
||||
#if ALLOW_STEP_EFFECT
|
||||
noise = StepValue(noise, cloudStep);
|
||||
#endif
|
||||
|
||||
color = fixed4(cloudColor.rgb, noise);
|
||||
|
||||
float sqrCloudDiscRadius = 100000000;
|
||||
float sqrDistanceToCloudPlaneOrigin = SqrDistance(intersectionPoint, cloudPlaneOrigin);
|
||||
|
||||
fixed fDistance = saturate(1 - InverseLerpUnclamped(0, sqrCloudDiscRadius, sqrDistanceToCloudPlaneOrigin));
|
||||
color.a *= fDistance * fDistance;
|
||||
|
||||
fixed4 clear = fixed4(0, 0, 0, 0);
|
||||
color = lerp(clear, color, localPos.y > 0);
|
||||
}
|
||||
|
||||
#endif
|
@@ -0,0 +1,25 @@
|
||||
#ifndef SKY_GRADIENT_INCLUDED
|
||||
#define SKY_GRADIENT_INCLUDED
|
||||
|
||||
#include "JCommon.cginc"
|
||||
|
||||
void CalculateSkyGradientColor(
|
||||
float4 localPos,
|
||||
fixed4 skyColor, fixed4 horizonColor, fixed4 groundColor,
|
||||
fixed horizonThickness, fixed horizonExponent, fixed horizonStep,
|
||||
out fixed4 skyBlendColor, out fixed4 horizonBlendColor)
|
||||
{
|
||||
skyBlendColor = lerp(groundColor, skyColor, localPos.y > 0);
|
||||
horizonThickness *= lerp(0.25, 1, localPos.y > 0);
|
||||
|
||||
#if ALLOW_STEP_EFFECT
|
||||
localPos.y = StepValue(localPos.y, horizonStep);
|
||||
#endif
|
||||
|
||||
fixed horizonBlendFactor = saturate(1 - InverseLerpUnclamped(0, horizonThickness, abs(localPos.y)));
|
||||
horizonBlendFactor = pow(horizonBlendFactor, horizonExponent);
|
||||
//horizon = lerp(color, horizonColor, horizonBlendFactor);
|
||||
horizonBlendColor = fixed4(horizonColor.xyz, horizonBlendFactor*horizonColor.a);
|
||||
}
|
||||
|
||||
#endif
|
@@ -0,0 +1,55 @@
|
||||
#ifndef STARS_INCLUDED
|
||||
#define STARS_INCLUDED
|
||||
|
||||
#include "JCommon.cginc"
|
||||
|
||||
void CalculateStarsColor(
|
||||
float4 localPos,
|
||||
float starsStartPosition, float starsEndPosition,
|
||||
fixed4 starsColor, fixed starsOpacity,
|
||||
float starsDensity,
|
||||
float starsSize,
|
||||
fixed starsGlow,
|
||||
fixed starsTwinkle,
|
||||
out fixed4 color)
|
||||
{
|
||||
float cellCount = starsDensity*50;
|
||||
float cellSize = 1/cellCount;
|
||||
|
||||
float3 cellCenter = floor(localPos.xyz/cellSize)*cellSize + 0.5*cellSize*float3(1,1,1);
|
||||
float rand = RandomValue(cellCenter.xyz) - 0.5;
|
||||
float3 starPos = cellCenter + float3(1,1,1)*cellSize*rand;
|
||||
float sqrDistance = SqrDistance(localPos.xyz, starPos);
|
||||
float sqrDistanceThreshold = 0.00001*starsSize*starsSize;
|
||||
|
||||
fixed4 clear = fixed4(0,0,0,0);
|
||||
fixed4 white = fixed4(1,1,1,1);
|
||||
|
||||
color = lerp(clear, white, sqrDistance <= sqrDistanceThreshold);
|
||||
color *= starsColor;
|
||||
color.a *= 2*(1 + starsGlow)*(rand + 0.5);
|
||||
float wave = TriangleWave(rand*_Time.y*starsTwinkle)*0.5 + 0.5;
|
||||
color.a *= lerp(0.5, 1, (1-wave));
|
||||
color.a *= starsOpacity;
|
||||
|
||||
color = lerp(clear, color, cellCenter.y >= starsStartPosition);
|
||||
color = lerp(clear, color, cellCenter.y <= starsEndPosition);
|
||||
color = lerp(clear, color, rand <= starsDensity);
|
||||
}
|
||||
|
||||
void CalculateStarsColorBaked(
|
||||
float4 localPos,
|
||||
samplerCUBE starsCubemap,
|
||||
sampler2D starsTwinkleMap,
|
||||
fixed starsOpacity,
|
||||
out fixed4 color)
|
||||
{
|
||||
float2 span = float2(1,1)*_Time.y*0.1;
|
||||
fixed twinkle = tex2D(starsTwinkleMap, localPos.xy + span).r;
|
||||
|
||||
color = texCUBE(starsCubemap, localPos.xyz);
|
||||
color.a *= twinkle;
|
||||
color.a *= starsOpacity;
|
||||
}
|
||||
|
||||
#endif
|
@@ -0,0 +1,90 @@
|
||||
#ifndef SUN_MOON_INCLUDED
|
||||
#define SUN_MOON_INCLUDED
|
||||
|
||||
#include "JCommon.cginc"
|
||||
|
||||
void CalculateSunMoonColorTextured(
|
||||
float4 localPos,
|
||||
sampler2D tex, float4x4 posToUvMatrix,
|
||||
fixed4 tintColor,
|
||||
float size, fixed softEdge, fixed glow,
|
||||
float4 direction,
|
||||
out fixed4 color)
|
||||
{
|
||||
fixed3 sunPos = -direction;
|
||||
fixed3 rayDir = localPos.xyz;
|
||||
fixed3 sunPlaneOrigin = sunPos;
|
||||
fixed3 sunPlaneNormal = sunPos;
|
||||
|
||||
fixed rayLength = dot(sunPlaneOrigin, sunPlaneNormal)/(dot(rayDir, sunPlaneNormal)+0.000001);
|
||||
fixed3 intersectionPoint = rayDir*rayLength;
|
||||
fixed sqrDistanceToSun = SqrDistance(intersectionPoint, sunPos);
|
||||
fixed fSize = 1 - InverseLerpUnclamped(0, size*size*0.25, sqrDistanceToSun);
|
||||
fixed fGlow = 1 - InverseLerpUnclamped(0, size*size*400*glow*glow, sqrDistanceToSun);
|
||||
fGlow = saturate(fGlow);
|
||||
|
||||
fixed4 clear = fixed4(0,0,0,0);
|
||||
fixed4 white = fixed4(1,1,1,1);
|
||||
|
||||
fixed4 glowColor = fixed4(tintColor.xyz, fGlow*fGlow*fGlow*fGlow*fGlow*fGlow*glow);
|
||||
float4 uvSpacePos = mul(posToUvMatrix, localPos);
|
||||
fixed4 texColor = tex2D(tex, uvSpacePos.xy - float2(0.5, 0.5));
|
||||
texColor.a = lerp(0, texColor.a, SqrMagnitude(uvSpacePos.xy) <= 0.25);
|
||||
float texAlpha = texColor.a;
|
||||
|
||||
float fSoftEdge = saturate(lerp(0, 1/(softEdge+0.0000001), fSize));
|
||||
texColor = lerp(glowColor, texColor, fSoftEdge*texAlpha);
|
||||
texColor.a = texAlpha*fSoftEdge;
|
||||
|
||||
color = texColor + glowColor*glowColor.a;
|
||||
color *= tintColor;
|
||||
color.a = saturate(color.a);
|
||||
|
||||
float dotProduct = dot(localPos.xyz, sunPos);
|
||||
color = lerp(clear, color, dotProduct >= 0);
|
||||
}
|
||||
|
||||
void CalculateSunMoonColor(
|
||||
float4 localPos,
|
||||
fixed4 tintColor,
|
||||
float size, fixed softEdge, fixed glow,
|
||||
float4 direction,
|
||||
out fixed4 color)
|
||||
{
|
||||
fixed3 sunPos = -direction;
|
||||
fixed3 rayDir = localPos.xyz;
|
||||
fixed3 sunPlaneOrigin = sunPos;
|
||||
fixed3 sunPlaneNormal = sunPos;
|
||||
|
||||
fixed rayLength = dot(sunPlaneOrigin, sunPlaneNormal)/(dot(rayDir, sunPlaneNormal)+0.000001);
|
||||
fixed3 intersectionPoint = rayDir*rayLength;
|
||||
fixed sqrDistanceToSun = SqrDistance(intersectionPoint, sunPos);
|
||||
fixed fSize = 1 - InverseLerpUnclamped(0, size*size*0.25, sqrDistanceToSun);
|
||||
fixed fGlow = 1 - InverseLerpUnclamped(0, size*size*400*glow*glow, sqrDistanceToSun);
|
||||
fGlow = saturate(fGlow);
|
||||
|
||||
fixed4 clear = fixed4(0,0,0,0);
|
||||
fixed4 white = fixed4(1,1,1,1);
|
||||
|
||||
fixed4 texColor = white;
|
||||
fixed4 glowColor = fixed4(tintColor.xyz, fGlow*fGlow*fGlow*fGlow*fGlow*fGlow*glow);
|
||||
fixed fSoftEdge = saturate(lerp(0, 1/(softEdge+0.0000001), fSize));
|
||||
texColor = lerp(glowColor, texColor, fSoftEdge);
|
||||
|
||||
color = texColor + glowColor*glowColor.a*glowColor.a;
|
||||
color *= tintColor;
|
||||
color.a = saturate(color.a);
|
||||
|
||||
fixed dotProduct = dot(localPos.xyz, sunPos);
|
||||
color = lerp(clear, color, dotProduct >= 0);
|
||||
}
|
||||
|
||||
void CalculateSunMoonColorBaked(
|
||||
float4 localPos, float4x4 rotationMatrix,
|
||||
samplerCUBE sunCubemap,
|
||||
out fixed4 color)
|
||||
{
|
||||
localPos = mul(rotationMatrix, float4(localPos.xyz,0));
|
||||
color = texCUBE(sunCubemap, localPos.xyz);
|
||||
}
|
||||
#endif
|
@@ -0,0 +1,69 @@
|
||||
Shader "Hidden/Griffin/CopyTexture"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex ("Texture", 2D) = "white" {}
|
||||
_StartUV ("Start UV", Vector) = (0,0,0,0)
|
||||
_EndUV ("End UV", Vector) = (1,1,1,1)
|
||||
_DefaultColor ("Default Color", Color) = (0,0,0,0)
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" }
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 vertex : SV_POSITION;
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_ST;
|
||||
float4 _StartUV;
|
||||
float4 _EndUV;
|
||||
float4 _DefaultColor;
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
||||
return o;
|
||||
}
|
||||
|
||||
float2 TransformUV(float2 uv)
|
||||
{
|
||||
return lerp(_StartUV, _EndUV, uv);
|
||||
}
|
||||
|
||||
float IsInRange01(float2 uv)
|
||||
{
|
||||
return uv.x>=0 && uv.x<=1 && uv.y>=0 && uv.y<=1;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
float2 transformedUV = TransformUV(i.uv);
|
||||
float4 texColor = tex2D(_MainTex, transformedUV);
|
||||
float inRange = IsInRange01(transformedUV);
|
||||
float4 result = texColor*inRange + _DefaultColor*(1-inRange);
|
||||
return result;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,49 @@
|
||||
Shader "Hidden/Griffin/SolidColor"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Color ("Color", Color) = (1,1,1,1)
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Transparent" }
|
||||
Blend One Zero
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 vertex : SV_POSITION;
|
||||
};
|
||||
|
||||
float4 _Color;
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.uv = v.uv;
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
return _Color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,483 @@
|
||||
Shader "Jupiter/Sky"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[HideInInspector] _SkyColor("Sky Color", Color) = (0.15, 0.4, 0.65, 1)
|
||||
[HideInInspector] _HorizonColor("Horizon Color", Color) = (1, 1, 1, 1)
|
||||
[HideInInspector] _GroundColor("Ground Color", Color) = (0.4, 0.4, 0.4, 1)
|
||||
[HideInInspector] _HorizonThickness("Horizon Thickness", Range(0.0, 1.0)) = 0.3
|
||||
[HideInInspector] _HorizonExponent("Horizon Exponent", Float) = 1.0
|
||||
[HideInInspector] _HorizonStep("Horizon Step", Float) = 25
|
||||
[HideInInspector] _FogColor("Custom Fog Color", Color) = (0, 0, 0, 1)
|
||||
|
||||
[HideInInspector] _StarsStartPosition("Stars Start", Float) = 0.3
|
||||
[HideInInspector] _StarsEndPosition("Stars End", Float) = 1
|
||||
[HideInInspector] _StarsOpacity("Stars Opacity", Float) = 1
|
||||
|
||||
[HideInInspector] _StarsColor0("Stars Color 0", Color) = (1, 1, 1, 1)
|
||||
[HideInInspector] _StarsColor1("Stars Color 1", Color) = (1, 1, 1, 1)
|
||||
[HideInInspector] _StarsColor2("Stars Color 2", Color) = (1, 1, 1, 1)
|
||||
|
||||
[HideInInspector] _StarsDensity0("Stars Density 0", Float) = 1
|
||||
[HideInInspector] _StarsDensity1("Stars Density 1", Float) = 1
|
||||
[HideInInspector] _StarsDensity2("Stars Density 2", Float) = 1
|
||||
|
||||
[HideInInspector] _StarsSize0("Stars Size 0", Float) = 1
|
||||
[HideInInspector] _StarsSize1("Stars Size 1", Float) = 1
|
||||
[HideInInspector] _StarsSize2("Stars Size 2", Float) = 1
|
||||
|
||||
[HideInInspector] _StarsGlow0("Stars Glow 0", Float) = 0
|
||||
[HideInInspector] _StarsGlow1("Stars Glow 1", Float) = 0
|
||||
[HideInInspector] _StarsGlow2("Stars Glow 2", Float) = 0
|
||||
|
||||
[HideInInspector] _StarsTwinkle0("Stars Twinkle 0", Float) = 1
|
||||
[HideInInspector] _StarsTwinkle1("Stars Twinkle 1", Float) = 1
|
||||
[HideInInspector] _StarsTwinkle2("Stars Twinkle 2", Float) = 1
|
||||
|
||||
[HideInInspector] _StarsCubemap("Stars Cubemap", CUBE) = "any" {}
|
||||
[HideInInspector] _StarsTwinkleMap("Stars Twinkle Map", 2D) = "white" {}
|
||||
|
||||
[HideInInspector] _SunTex("Sun Texture", 2D) = "white" {}
|
||||
[HideInInspector] _SunColor("Sun Color", Color) = (1, 1, 1, 1)
|
||||
[HideInInspector] _SunSize("Sun Size", Float) = 0.1
|
||||
[HideInInspector] _SunSoftEdge("Sun Soft Edge", Float) = 0
|
||||
[HideInInspector] _SunGlow("Sun Glow", Float) = 0
|
||||
[HideInInspector] _SunDirection("Sun Direction", Vector) = (-1, -1, -1, 0)
|
||||
[HideInInspector] _SunCubemap("Sun Cubemap", CUBE) = "any" {}
|
||||
[HideInInspector] _SunLightColor("Sun Light Color", Color) = (1,1,1,1)
|
||||
[HideInInspector] _SunLightIntensity("Sun Light Intensity", Float) = 1
|
||||
|
||||
[HideInInspector] _MoonTex("Moon Texture", 2D) = "white" {}
|
||||
[HideInInspector] _MoonColor("Moon Color", Color) = (1, 1, 1, 1)
|
||||
[HideInInspector] _MoonSize("Moon Size", Float) = 0.1
|
||||
[HideInInspector] _MoonSoftEdge("Moon Soft Edge", Float) = 0
|
||||
[HideInInspector] _MoonGlow("Moon Glow", Float) = 0
|
||||
[HideInInspector] _MoonDirection("Moon Direction", Vector) = (1, 1, 1, 0)
|
||||
[HideInInspector] _MoonCubemap("Moon Cubemap", CUBE) = "any" {}
|
||||
[HideInInspector] _MoonLightColor("Moon Light Color", Color) = (1,1,1,1)
|
||||
[HideInInspector] _MoonLightIntensity("Moon Light Intensity", Float) = 1
|
||||
|
||||
[HideInInspector] _HorizonCloudColor("Horizon Cloud Color", Color) = (1, 1, 1, 0.5)
|
||||
[HideInInspector] _HorizonCloudStartPosition("Horizon Cloud Start", Float) = -0.1
|
||||
[HideInInspector] _HorizonCloudEndPosition("Horizon Cloud End", Float) = 0.5
|
||||
[HideInInspector] _HorizonCloudSize("Horizon Cloud Size", Float) = 10
|
||||
[HideInInspector] _HorizonCloudStep("Horizon Cloud Step", Float) = 25
|
||||
[HideInInspector] _HorizonCloudAnimationSpeed("Horizon Cloud Animation Speed", Float) = 1
|
||||
|
||||
[HideInInspector] _OverheadCloudColor("Overhead Cloud Color", Color) = (1, 1, 1, 0.5)
|
||||
[HideInInspector] _OverheadCloudAltitude("Overhead Cloud Altitude", Float) = 1000
|
||||
[HideInInspector] _OverheadCloudSize("Overhead Cloud Size", Float) = 100
|
||||
[HideInInspector] _OverheadCloudStep("Overhead Cloud Step", Float) = 25
|
||||
[HideInInspector] _OverheadCloudAnimationSpeed("Overhead Cloud Animation Speed", Float) = 1
|
||||
[HideInInspector] _OverheadCloudFlowDirectionX("Overhead Cloud Flow X", Float) = 1
|
||||
[HideInInspector] _OverheadCloudFlowDirectionZ("Overhead Cloud Flow X", Float) = 1
|
||||
[HideInInspector] _OverheadCloudRemapMin("Overhead Cloud Remap Min", Float) = 0
|
||||
[HideInInspector] _OverheadCloudRemapMax("Overhead Cloud Remap Max", Float) = 1
|
||||
|
||||
[HideInInspector] _DetailOverlayTintColor("Detail Overlay Color", COLOR) = (1, 1, 1, 0.5)
|
||||
[HideInInspector] _DetailOverlayCubemap("Detail Overlay Cubemap", CUBE) = "any" {}
|
||||
[HideInInspector] _DetailOverlayLayer("Detail Overlay Layer", Float) = 0
|
||||
[HideInInspector] _DetailOverlayRotationSpeed("Detail Overlay Rotation Speed", Float) = 0
|
||||
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "Queue" = "Background" "RenderType" = "Background" "PreviewType" = "Skybox" }
|
||||
Cull Off ZWrite Off
|
||||
LOD 100
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma shader_feature_local STARS
|
||||
#pragma shader_feature_local STARS_LAYER_0
|
||||
#pragma shader_feature_local STARS_LAYER_1
|
||||
#pragma shader_feature_local STARS_LAYER_2
|
||||
#pragma shader_feature_local STARS_BAKED
|
||||
|
||||
#pragma shader_feature_local SUN
|
||||
#pragma shader_feature_local SUN_USE_TEXTURE
|
||||
#pragma shader_feature_local SUN_BAKED
|
||||
|
||||
#pragma shader_feature_local MOON
|
||||
#pragma shader_feature_local MOON_USE_TEXTURE
|
||||
#pragma shader_feature_local MOON_BAKED
|
||||
|
||||
#pragma shader_feature_local HORIZON_CLOUD
|
||||
#pragma shader_feature_local OVERHEAD_CLOUD
|
||||
#pragma shader_feature_local DETAIL_OVERLAY
|
||||
#pragma shader_feature_local DETAIL_OVERLAY_ROTATION
|
||||
#pragma shader_feature_local ALLOW_STEP_EFFECT
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "./CGIncludes/JCommon.cginc"
|
||||
#include "./CGIncludes/JSkyGradient.cginc"
|
||||
#include "./CGIncludes/JStars.cginc"
|
||||
#include "./CGIncludes/JSunMoon.cginc"
|
||||
#include "./CGIncludes/JHorizonCloud.cginc"
|
||||
#include "./CGIncludes/JOverheadCloud.cginc"
|
||||
#include "./CGIncludes/JDetailOverlay.cginc"
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 vertex : SV_POSITION;
|
||||
float4 localPos : TEXCOORD1;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
uniform fixed4 _SkyColor;
|
||||
uniform fixed4 _HorizonColor;
|
||||
uniform fixed4 _GroundColor;
|
||||
uniform fixed _HorizonThickness;
|
||||
uniform fixed _HorizonExponent;
|
||||
uniform fixed _HorizonStep;
|
||||
uniform fixed4 _FogColor;
|
||||
|
||||
#if STARS
|
||||
uniform fixed _StarsOpacity;
|
||||
#if STARS_BAKED
|
||||
uniform samplerCUBE _StarsCubemap;
|
||||
uniform sampler2D _StarsTwinkleMap;
|
||||
#else
|
||||
uniform float _StarsStartPosition;
|
||||
uniform float _StarsEndPosition;
|
||||
|
||||
uniform fixed4 _StarsColor0;
|
||||
uniform fixed4 _StarsColor1;
|
||||
uniform fixed4 _StarsColor2;
|
||||
|
||||
uniform float _StarsDensity0;
|
||||
uniform float _StarsDensity1;
|
||||
uniform float _StarsDensity2;
|
||||
|
||||
uniform float _StarsSize0;
|
||||
uniform float _StarsSize1;
|
||||
uniform float _StarsSize2;
|
||||
|
||||
uniform fixed _StarsGlow0;
|
||||
uniform fixed _StarsGlow1;
|
||||
uniform fixed _StarsGlow2;
|
||||
|
||||
uniform fixed _StarsTwinkle0;
|
||||
uniform fixed _StarsTwinkle1;
|
||||
uniform fixed _StarsTwinkle2;
|
||||
#endif //STARS_BAKED
|
||||
#endif //STARS
|
||||
|
||||
#if SUN
|
||||
#if SUN_BAKED
|
||||
uniform samplerCUBE _SunCubemap;
|
||||
uniform float4x4 _SunRotationMatrix;
|
||||
#else
|
||||
#if SUN_USE_TEXTURE
|
||||
uniform sampler2D _SunTex;
|
||||
uniform float4x4 _PositionToSunUV;
|
||||
#endif //SUN_USE_TEXTURE
|
||||
uniform fixed4 _SunColor;
|
||||
uniform float _SunSize;
|
||||
uniform fixed _SunSoftEdge;
|
||||
uniform fixed _SunGlow;
|
||||
uniform float4 _SunDirection;
|
||||
uniform float4 _SunLightColor;
|
||||
uniform float4 _SunLightIntensity;
|
||||
#endif //SUN_BAKED
|
||||
#endif //SUN
|
||||
|
||||
#if MOON
|
||||
#if MOON_BAKED
|
||||
uniform samplerCUBE _MoonCubemap;
|
||||
uniform float4x4 _MoonRotationMatrix;
|
||||
#else
|
||||
#if MOON_USE_TEXTURE
|
||||
uniform sampler2D _MoonTex;
|
||||
uniform float4x4 _PositionToMoonUV;
|
||||
#endif //MOON_USE_TEXTURE
|
||||
uniform fixed4 _MoonColor;
|
||||
uniform float _MoonSize;
|
||||
uniform fixed _MoonSoftEdge;
|
||||
uniform fixed _MoonGlow;
|
||||
uniform float4 _MoonDirection;
|
||||
uniform float4 _MoonLightColor;
|
||||
uniform float4 _MoonLightIntensity;
|
||||
#endif //MOON_BAKED
|
||||
#endif //MOON
|
||||
|
||||
#if HORIZON_CLOUD
|
||||
uniform fixed4 _HorizonCloudColor;
|
||||
uniform fixed _HorizonCloudStartPosition;
|
||||
uniform fixed _HorizonCloudEndPosition;
|
||||
uniform fixed _HorizonCloudSize;
|
||||
uniform fixed _HorizonCloudStep;
|
||||
uniform fixed _HorizonCloudAnimationSpeed;
|
||||
#endif //HORIZON_CLOUD
|
||||
|
||||
#if OVERHEAD_CLOUD
|
||||
uniform fixed4 _OverheadCloudColor;
|
||||
uniform fixed _OverheadCloudAltitude;
|
||||
uniform fixed _OverheadCloudSize;
|
||||
uniform fixed _OverheadCloudStep;
|
||||
uniform fixed _OverheadCloudAnimationSpeed;
|
||||
uniform fixed _OverheadCloudFlowDirectionX;
|
||||
uniform fixed _OverheadCloudFlowDirectionZ;
|
||||
uniform fixed _OverheadCloudRemapMin;
|
||||
uniform fixed _OverheadCloudRemapMax;
|
||||
#endif //OVERHEAD_CLOUD
|
||||
|
||||
#if DETAIL_OVERLAY
|
||||
uniform fixed4 _DetailOverlayTintColor;
|
||||
uniform samplerCUBE _DetailOverlayCubemap;
|
||||
uniform fixed _DetailOverlayLayer;
|
||||
uniform fixed _DetailOverlayRotationSpeed;
|
||||
#endif
|
||||
|
||||
//uniform float4x4 _SkyTransform;
|
||||
|
||||
v2f vert(appdata v)
|
||||
{
|
||||
v2f o;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.uv = v.uv;
|
||||
o.localPos = v.vertex;
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f i) : SV_Target
|
||||
{
|
||||
float4 localPos = float4(i.localPos.xyz, 1);
|
||||
//localPos = mul(_SkyTransform, localPos);
|
||||
float4 normalizedLocalPos = float4(normalize(localPos.xyz), 1);
|
||||
fixed4 color = fixed4(0,0,0,0);
|
||||
|
||||
fixed4 skyBlendColor;
|
||||
fixed4 horizonBlendColor;
|
||||
CalculateSkyGradientColor(
|
||||
normalizedLocalPos,
|
||||
_SkyColor, _HorizonColor, _GroundColor,
|
||||
_HorizonThickness, _HorizonExponent, _HorizonStep,
|
||||
skyBlendColor, horizonBlendColor);
|
||||
color = BlendOverlay(skyBlendColor, color);
|
||||
|
||||
#if DETAIL_OVERLAY
|
||||
fixed4 detailOverlayColor;
|
||||
#if DETAIL_OVERLAY_ROTATION
|
||||
CalculateDetailOverlayColor(
|
||||
i.localPos,
|
||||
_DetailOverlayCubemap,
|
||||
_DetailOverlayTintColor,
|
||||
_DetailOverlayRotationSpeed,
|
||||
detailOverlayColor);
|
||||
#else
|
||||
CalculateDetailOverlayColor(
|
||||
i.localPos,
|
||||
_DetailOverlayCubemap,
|
||||
_DetailOverlayTintColor,
|
||||
detailOverlayColor);
|
||||
#endif //DETAIL_OVERLAY_ROTATION
|
||||
|
||||
fixed isLayerEqual = _DetailOverlayLayer == 0;
|
||||
fixed4 overlay = detailOverlayColor;
|
||||
overlay.a *= isLayerEqual;
|
||||
color = BlendOverlay(overlay, color);
|
||||
#endif //DETAIL_OVERLAY
|
||||
|
||||
#if STARS
|
||||
fixed4 starsColor;
|
||||
#if STARS_BAKED
|
||||
CalculateStarsColorBaked(
|
||||
normalizedLocalPos,
|
||||
_StarsCubemap,
|
||||
_StarsTwinkleMap,
|
||||
_StarsOpacity,
|
||||
starsColor);
|
||||
#else
|
||||
#if STARS_LAYER_0
|
||||
fixed4 starsColor0;
|
||||
CalculateStarsColor(
|
||||
normalizedLocalPos,
|
||||
_StarsStartPosition, _StarsEndPosition,
|
||||
_StarsColor0, _StarsOpacity,
|
||||
_StarsDensity0,
|
||||
_StarsSize0,
|
||||
_StarsGlow0,
|
||||
_StarsTwinkle0,
|
||||
starsColor0);
|
||||
starsColor = starsColor0;
|
||||
#endif //STARS_LAYER_0
|
||||
|
||||
#if STARS_LAYER_1
|
||||
fixed4 starsColor1;
|
||||
CalculateStarsColor(
|
||||
normalizedLocalPos,
|
||||
_StarsStartPosition, _StarsEndPosition,
|
||||
_StarsColor1, _StarsOpacity,
|
||||
_StarsDensity1,
|
||||
_StarsSize1,
|
||||
_StarsGlow1,
|
||||
_StarsTwinkle1,
|
||||
starsColor1);
|
||||
starsColor = lerp(starsColor, starsColor1, starsColor1.a);
|
||||
#endif //STARS_LAYER_1
|
||||
|
||||
#if STARS_LAYER_2
|
||||
fixed4 starsColor2;
|
||||
CalculateStarsColor(
|
||||
normalizedLocalPos,
|
||||
_StarsStartPosition, _StarsEndPosition,
|
||||
_StarsColor2, _StarsOpacity,
|
||||
_StarsDensity2,
|
||||
_StarsSize2,
|
||||
_StarsGlow2,
|
||||
_StarsTwinkle2,
|
||||
starsColor2);
|
||||
starsColor = lerp(starsColor, starsColor2, starsColor2.a);
|
||||
#endif //STARS_LAYER_2
|
||||
#endif //STARS_BAKED
|
||||
|
||||
color = BlendOverlay(starsColor, color);
|
||||
#endif //STARS
|
||||
|
||||
#if DETAIL_OVERLAY
|
||||
isLayerEqual = _DetailOverlayLayer == 1;
|
||||
overlay = detailOverlayColor;
|
||||
overlay.a *= isLayerEqual;
|
||||
color = BlendOverlay(overlay, color);
|
||||
#endif //DETAIL_OVERLAY
|
||||
|
||||
#if SUN
|
||||
fixed4 sunColor;
|
||||
#if SUN_BAKED
|
||||
CalculateSunMoonColorBaked(
|
||||
normalizedLocalPos, _SunRotationMatrix,
|
||||
_SunCubemap,
|
||||
sunColor);
|
||||
#else
|
||||
#if SUN_USE_TEXTURE
|
||||
CalculateSunMoonColorTextured(
|
||||
normalizedLocalPos,
|
||||
_SunTex, _PositionToSunUV,
|
||||
_SunColor,
|
||||
_SunSize, _SunSoftEdge, _SunGlow,
|
||||
_SunDirection,
|
||||
sunColor);
|
||||
#else
|
||||
CalculateSunMoonColor(
|
||||
normalizedLocalPos,
|
||||
_SunColor,
|
||||
_SunSize, _SunSoftEdge, _SunGlow,
|
||||
_SunDirection,
|
||||
sunColor);
|
||||
#endif //SUN_USE_TEXTURE
|
||||
#endif //SUN_BAKED
|
||||
color = BlendOverlay(sunColor, color);
|
||||
#endif //SUN
|
||||
|
||||
#if DETAIL_OVERLAY
|
||||
isLayerEqual = _DetailOverlayLayer == 2;
|
||||
overlay = detailOverlayColor;
|
||||
overlay.a *= isLayerEqual;
|
||||
color = BlendOverlay(overlay, color);
|
||||
#endif //DETAIL_OVERLAY
|
||||
|
||||
#if MOON
|
||||
fixed4 moonColor;
|
||||
#if MOON_BAKED
|
||||
CalculateSunMoonColorBaked(
|
||||
normalizedLocalPos, _MoonRotationMatrix,
|
||||
_MoonCubemap,
|
||||
moonColor);
|
||||
#else
|
||||
#if MOON_USE_TEXTURE
|
||||
CalculateSunMoonColorTextured(
|
||||
normalizedLocalPos,
|
||||
_MoonTex, _PositionToMoonUV,
|
||||
_MoonColor,
|
||||
_MoonSize, _MoonSoftEdge, _MoonGlow,
|
||||
_MoonDirection,
|
||||
moonColor);
|
||||
#else
|
||||
CalculateSunMoonColor(
|
||||
normalizedLocalPos,
|
||||
_MoonColor,
|
||||
_MoonSize, _MoonSoftEdge, _MoonGlow,
|
||||
_MoonDirection,
|
||||
moonColor);
|
||||
#endif //MOON_USE_TEXTURE
|
||||
#endif //MOON_BAKED
|
||||
color = BlendOverlay(moonColor, color);
|
||||
#endif //MOON
|
||||
|
||||
#if DETAIL_OVERLAY
|
||||
isLayerEqual = _DetailOverlayLayer == 3;
|
||||
overlay = detailOverlayColor;
|
||||
overlay.a *= isLayerEqual;
|
||||
color = BlendOverlay(overlay, color);
|
||||
#endif
|
||||
|
||||
#if HORIZON_CLOUD
|
||||
fixed4 horizonCloudColor;
|
||||
CalculateHorizonCloudColor(
|
||||
normalizedLocalPos,
|
||||
_HorizonCloudColor,
|
||||
_HorizonCloudStartPosition, _HorizonCloudEndPosition,
|
||||
_HorizonCloudSize, _HorizonCloudStep,
|
||||
_HorizonCloudAnimationSpeed,
|
||||
horizonCloudColor);
|
||||
color = BlendOverlay(horizonCloudColor, color);
|
||||
#endif
|
||||
|
||||
#if DETAIL_OVERLAY
|
||||
isLayerEqual = _DetailOverlayLayer == 4;
|
||||
overlay = detailOverlayColor;
|
||||
overlay.a *= isLayerEqual;
|
||||
color = BlendOverlay(overlay, color);
|
||||
#endif
|
||||
|
||||
#if OVERHEAD_CLOUD
|
||||
fixed4 overheadCloudColor;
|
||||
CalculateOverheadCloudColor(
|
||||
normalizedLocalPos,
|
||||
_OverheadCloudColor,
|
||||
_OverheadCloudAltitude,
|
||||
_OverheadCloudSize,
|
||||
_OverheadCloudStep,
|
||||
_OverheadCloudAnimationSpeed,
|
||||
_OverheadCloudFlowDirectionX,
|
||||
_OverheadCloudFlowDirectionZ,
|
||||
_OverheadCloudRemapMin,
|
||||
_OverheadCloudRemapMax,
|
||||
overheadCloudColor);
|
||||
color = BlendOverlay(overheadCloudColor, color);
|
||||
#endif
|
||||
|
||||
#if DETAIL_OVERLAY
|
||||
isLayerEqual = _DetailOverlayLayer == 5;
|
||||
overlay = detailOverlayColor;
|
||||
overlay.a *= isLayerEqual;
|
||||
color = BlendOverlay(overlay, color);
|
||||
#endif
|
||||
|
||||
color = BlendOverlay(horizonBlendColor, color);
|
||||
|
||||
//color = float4(localPos.xyz, 1);
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
Fallback "Unlit/Color"
|
||||
}
|
@@ -0,0 +1,86 @@
|
||||
Shader "Jupiter/SkyShadow"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[HideInInspector] _OverheadCloudColor("Overhead Cloud Color", Color) = (1, 1, 1, 0.5)
|
||||
[HideInInspector] _OverheadCloudAltitude("Overhead Cloud Altitude", Float) = 1000
|
||||
[HideInInspector] _OverheadCloudSize("Overhead Cloud Size", Float) = 100
|
||||
[HideInInspector] _OverheadCloudStep("Overhead Cloud Step", Float) = 25
|
||||
[HideInInspector] _OverheadCloudAnimationSpeed("Overhead Cloud Animation Speed", Float) = 1
|
||||
[HideInInspector] _OverheadCloudFlowDirectionX("Overhead Cloud Flow X", Float) = 1
|
||||
[HideInInspector] _OverheadCloudFlowDirectionZ("Overhead Cloud Flow X", Float) = 1
|
||||
[HideInInspector] _OverheadCloudRemapMin("Overhead Cloud Remap Min", Float) = 0
|
||||
[HideInInspector] _OverheadCloudRemapMax("Overhead Cloud Remap Max", Float) = 1
|
||||
[HideInInspector] _OverheadCloudShadowClipMask("Overhead Cloud Shadow Clip Mask", Float) = 0.1
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 100
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "ShadowCaster"
|
||||
Tags { "LightMode" = "ShadowCaster" }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 2.0
|
||||
#pragma multi_compile_shadowcaster
|
||||
#pragma multi_compile_instancing // allow instanced shadow pass for most of the shaders
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
#pragma shader_feature_local ALLOW_STEP_EFFECT
|
||||
|
||||
#include "./CGIncludes/JCommon.cginc"
|
||||
#include "./CGIncludes/JOverheadCloud.cginc"
|
||||
|
||||
struct v2f {
|
||||
V2F_SHADOW_CASTER;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
float3 localPos : TEXCOORD1;
|
||||
};
|
||||
|
||||
uniform fixed4 _OverheadCloudColor;
|
||||
uniform fixed _OverheadCloudAltitude;
|
||||
uniform fixed _OverheadCloudSize;
|
||||
uniform fixed _OverheadCloudStep;
|
||||
uniform fixed _OverheadCloudAnimationSpeed;
|
||||
uniform fixed _OverheadCloudFlowDirectionX;
|
||||
uniform fixed _OverheadCloudFlowDirectionZ;
|
||||
uniform fixed _OverheadCloudRemapMin;
|
||||
uniform fixed _OverheadCloudRemapMax;
|
||||
uniform fixed _OverheadCloudShadowClipMask;
|
||||
|
||||
v2f vert(appdata_base v)
|
||||
{
|
||||
v2f o;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
TRANSFER_SHADOW_CASTER_NORMALOFFSET(o)
|
||||
o.localPos = v.vertex;
|
||||
return o;
|
||||
}
|
||||
|
||||
float4 frag(v2f i) : SV_Target
|
||||
{
|
||||
float4 localPos = float4(i.localPos.xyz, 1);
|
||||
float4 normalizedLocalPos = float4(normalize(localPos.xyz), 1);
|
||||
fixed4 overheadCloudColor;
|
||||
CalculateOverheadCloudColor(
|
||||
normalizedLocalPos,
|
||||
_OverheadCloudColor,
|
||||
_OverheadCloudAltitude,
|
||||
_OverheadCloudSize, _OverheadCloudStep,
|
||||
_OverheadCloudAnimationSpeed,
|
||||
_OverheadCloudFlowDirectionX, _OverheadCloudFlowDirectionZ,
|
||||
_OverheadCloudRemapMin, _OverheadCloudRemapMax,
|
||||
overheadCloudColor);
|
||||
clip(overheadCloudColor.a - _OverheadCloudShadowClipMask);
|
||||
SHADOW_CASTER_FRAGMENT(i)
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 111 KiB |
Binary file not shown.
After Width: | Height: | Size: 117 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-6972391792725820369
|
||||
--- !u!114 &-3557512663040141829
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 7
|
||||
version: 9
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
@@ -20,19 +20,22 @@ Material:
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: white
|
||||
m_Name: Reflective
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_ValidKeywords:
|
||||
- _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
|
||||
- _SPECULAR_SETUP
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 6
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 2000
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses: []
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -95,6 +98,7 @@ Material:
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
@@ -110,7 +114,7 @@ Material:
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _Glossiness: 0.75
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
@@ -118,14 +122,14 @@ Material:
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _Smoothness: 1
|
||||
- _SmoothnessTextureChannel: 1
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _WorkflowMode: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,306 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &-194747788320905733
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Jupiter/SkyShadow
|
||||
m_Shader: {fileID: 4800000, guid: 561c1777fd66e5d488ef1b85ed82bbaa, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords:
|
||||
- DETAIL_OVERLAY_ROTATION
|
||||
- MOON
|
||||
- STARS_BAKED
|
||||
- STARS_LAYER_0
|
||||
- STARS_LAYER_1
|
||||
- STARS_LAYER_2
|
||||
- SUN
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs: []
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _OverheadCloudAltitude: 1000
|
||||
- _OverheadCloudAnimationSpeed: 50
|
||||
- _OverheadCloudFlowDirectionX: 1
|
||||
- _OverheadCloudFlowDirectionZ: 1
|
||||
- _OverheadCloudRemapMax: 4
|
||||
- _OverheadCloudRemapMin: 0.54
|
||||
- _OverheadCloudShadowClipMask: 0
|
||||
- _OverheadCloudSize: 10
|
||||
- _OverheadCloudStep: 2
|
||||
m_Colors:
|
||||
- _OverheadCloudColor: {r: 1, g: 1, b: 1, a: 0.22709298}
|
||||
m_BuildTextureStacks: []
|
||||
--- !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: fa5278d11d9502245b5cc174a196561b, type: 3}
|
||||
m_Name: SkyProfile-741169173868421736
|
||||
m_EditorClassIdentifier:
|
||||
skyColor: {r: 0.1238506, g: 0.14360116, b: 0.34576786, a: 1}
|
||||
horizonColor: {r: 0.1238506, g: 0.14360116, b: 0.34576786, a: 1}
|
||||
groundColor: {r: 0.1238506, g: 0.14360116, b: 0.34576786, a: 1}
|
||||
horizonThickness: 1
|
||||
horizonExponent: 3.096379
|
||||
horizonStep: 1000
|
||||
fogSyncOption: 2
|
||||
fogColor: {r: 0.8490566, g: 0.69017035, b: 0.6287825, a: 1}
|
||||
enableStars: 0
|
||||
starsStartPosition: 0
|
||||
starsEndPosition: 1
|
||||
starsOpacity: 0.29772222
|
||||
starsLayerCount: 3
|
||||
starsColor0: {r: 0.96470594, g: 0.9450981, b: 0.76470596, a: 1}
|
||||
starsColor1: {r: 1, g: 0.5294118, b: 0.93725497, a: 1}
|
||||
starsColor2: {r: 0, g: 0.92549026, b: 1, a: 1}
|
||||
starsDensity0: 0.4
|
||||
starsDensity1: 0.34
|
||||
starsDensity2: 0.45
|
||||
starsSize0: 0.42
|
||||
starsSize1: 0.53
|
||||
starsSize2: 0.46
|
||||
starsGlow0: 0.01
|
||||
starsGlow1: 0.01
|
||||
starsGlow2: 0.01
|
||||
starsTwinkle0: 5
|
||||
starsTwinkle1: 6
|
||||
starsTwinkle2: 2
|
||||
useBakedStars: 1
|
||||
starsCubemap: {fileID: 0}
|
||||
starsTwinkleMap: {fileID: 0}
|
||||
enableSun: 1
|
||||
sunTexture: {fileID: 0}
|
||||
sunColor: {r: 0.98326683, g: 0.9556562, b: 0.9100987, a: 0}
|
||||
sunSize: 0.07
|
||||
sunSoftEdge: 0.5
|
||||
sunGlow: 0.45
|
||||
useBakedSun: 0
|
||||
sunCubemap: {fileID: 0}
|
||||
sunLightColor: {r: 1, g: 0.99511117, b: 0.8632076, a: 1}
|
||||
sunLightIntensity: 1
|
||||
enableMoon: 1
|
||||
moonTexture: {fileID: 0}
|
||||
moonColor: {r: 1, g: 1, b: 1, a: 0.6295172}
|
||||
moonSize: 0.07
|
||||
moonSoftEdge: 0.22
|
||||
moonGlow: 0.236
|
||||
useBakedMoon: 0
|
||||
moonCubemap: {fileID: 0}
|
||||
moonLightColor: {r: 0.8431373, g: 0.9843138, b: 1, a: 1}
|
||||
moonLightIntensity: 0.046027362
|
||||
customCloudTexture: {fileID: 0}
|
||||
enableHorizonCloud: 0
|
||||
horizonCloudColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
horizonCloudStartPosition: -0.01
|
||||
horizonCloudEndPosition: 0.35
|
||||
horizonCloudSize: 5
|
||||
horizonCloudStep: 25
|
||||
horizonCloudAnimationSpeed: 50
|
||||
enableOverheadCloud: 0
|
||||
overheadCloudColor: {r: 1, g: 1, b: 1, a: 0.22709298}
|
||||
overheadCloudAltitude: 1000
|
||||
overheadCloudSize: 10
|
||||
overheadCloudStep: 2
|
||||
overheadCloudAnimationSpeed: 50
|
||||
overheadCloudFlowDirectionX: 1
|
||||
overheadCloudFlowDirectionZ: 1
|
||||
overheadCloudRemapMin: 0.54
|
||||
overheadCloudRemapMax: 4
|
||||
overheadCloudCastShadow: 0
|
||||
overheadCloudShadowClipMask: 0
|
||||
enableDetailOverlay: 0
|
||||
detailOverlayTintColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
detailOverlayCubeMap: {fileID: 0}
|
||||
detailOverlayLayer: 5
|
||||
detailOverlayRotationSpeed: 1
|
||||
allowStepEffect: 0
|
||||
material: {fileID: 8543305277494947058}
|
||||
shadowMaterial: {fileID: -194747788320905733}
|
||||
--- !u!21 &8543305277494947058
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Jupiter/Sky
|
||||
m_Shader: {fileID: 4800000, guid: 3129e3b90193a0547900ecf4cf4e9864, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- DETAIL_OVERLAY_ROTATION
|
||||
- MOON
|
||||
- STARS_BAKED
|
||||
- STARS_LAYER_0
|
||||
- STARS_LAYER_1
|
||||
- STARS_LAYER_2
|
||||
- SUN
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _DetailOverlayCubemap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MoonCubemap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MoonTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _StarsCubemap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _StarsTwinkleMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SunCubemap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SunTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _DetailOverlayLayer: 5
|
||||
- _DetailOverlayRotationSpeed: 1
|
||||
- _HorizonCloudAnimationSpeed: 50
|
||||
- _HorizonCloudEnd: 0.35
|
||||
- _HorizonCloudEndPosition: 0.35
|
||||
- _HorizonCloudSize: 5
|
||||
- _HorizonCloudStart: -0.01
|
||||
- _HorizonCloudStartPosition: -0.01
|
||||
- _HorizonCloudStep: 25
|
||||
- _HorizonExponent: 4.619862
|
||||
- _HorizonStep: 1000
|
||||
- _HorizonThickness: 1
|
||||
- _MoonGlow: 0.236
|
||||
- _MoonLightIntensity: 0.00008701095
|
||||
- _MoonSize: 0.07
|
||||
- _MoonSoftEdge: 0.22
|
||||
- _OverheadCloudAltitude: 1000
|
||||
- _OverheadCloudAnimationSpeed: 50
|
||||
- _OverheadCloudFlowDirectionX: 1
|
||||
- _OverheadCloudFlowDirectionZ: 1
|
||||
- _OverheadCloudFlowX: 1
|
||||
- _OverheadCloudFlowZ: 1
|
||||
- _OverheadCloudRemapMax: 3.2330332
|
||||
- _OverheadCloudRemapMin: 0.41945106
|
||||
- _OverheadCloudSize: 10
|
||||
- _OverheadCloudStep: 2
|
||||
- _StarsDensity0: 0.4
|
||||
- _StarsDensity1: 0.34
|
||||
- _StarsDensity2: 0.45
|
||||
- _StarsEnd: 1
|
||||
- _StarsEndPosition: 1
|
||||
- _StarsGlow0: 0.01
|
||||
- _StarsGlow1: 0.01
|
||||
- _StarsGlow2: 0.01
|
||||
- _StarsOpacity: 0
|
||||
- _StarsSize0: 0.42
|
||||
- _StarsSize1: 0.53
|
||||
- _StarsSize2: 0.46
|
||||
- _StarsStart: 0
|
||||
- _StarsStartPosition: 0
|
||||
- _StarsTwinkle0: 5
|
||||
- _StarsTwinkle1: 6
|
||||
- _StarsTwinkle2: 2
|
||||
- _SunGlow: 0.45
|
||||
- _SunLightIntensity: 0.81390303
|
||||
- _SunSize: 0.07
|
||||
- _SunSoftEdge: 0.5
|
||||
m_Colors:
|
||||
- _DetailOverlayColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _DetailOverlayTintColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _FogColor: {r: 0.8490566, g: 0.69017035, b: 0.6287825, a: 1}
|
||||
- _GroundColor: {r: 0.464328, g: 0.45621884, b: 0.4719259, a: 1}
|
||||
- _HorizonCloudColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _HorizonColor: {r: 0.88186914, g: 0.92432946, b: 0.879878, a: 1}
|
||||
- _MoonColor: {r: 1, g: 1, b: 1, a: 0}
|
||||
- _MoonDirection: {r: 0.4175989, g: 0.7611087, b: -0.49631158, a: 0}
|
||||
- _MoonLightColor: {r: 0.8431373, g: 0.9843138, b: 1, a: 1}
|
||||
- _OverheadCloudColor: {r: 1, g: 1, b: 1, a: 0.9927014}
|
||||
- _SkyColor: {r: 0.30063137, g: 0.60054743, b: 0.8717994, a: 1}
|
||||
- _StarsColor0: {r: 0.96470594, g: 0.9450981, b: 0.76470596, a: 1}
|
||||
- _StarsColor1: {r: 1, g: 0.5294118, b: 0.93725497, a: 1}
|
||||
- _StarsColor2: {r: 0, g: 0.92549026, b: 1, a: 1}
|
||||
- _SunColor: {r: 0.9716981, g: 0.92374295, b: 0.84386903, a: 1}
|
||||
- _SunDirection: {r: -0.7731429, g: -0.3948735, b: 0.49631146, a: 0}
|
||||
- _SunLightColor: {r: 1, g: 0.99511117, b: 0.8632076, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!21 &8993251732621375409
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Jupiter/SkyShadow
|
||||
m_Shader: {fileID: 4800000, guid: 561c1777fd66e5d488ef1b85ed82bbaa, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- ALLOW_STEP_EFFECT
|
||||
m_InvalidKeywords:
|
||||
- DETAIL_OVERLAY_ROTATION
|
||||
- OVERHEAD_CLOUD
|
||||
- STARS
|
||||
- STARS_LAYER_0
|
||||
- STARS_LAYER_1
|
||||
- STARS_LAYER_2
|
||||
- SUN
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs: []
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _OverheadCloudAltitude: 1000
|
||||
- _OverheadCloudAnimationSpeed: 50
|
||||
- _OverheadCloudFlowDirectionX: 1
|
||||
- _OverheadCloudFlowDirectionZ: 1
|
||||
- _OverheadCloudShadowClipMask: 0
|
||||
- _OverheadCloudSize: 10
|
||||
- _OverheadCloudStep: 2
|
||||
m_Colors:
|
||||
- _OverheadCloudColor: {r: 1, g: 1, b: 1, a: 0.22709298}
|
||||
m_BuildTextureStacks: []
|
@@ -0,0 +1,526 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 336576615334345924, guid: 051a4fec1fcd7f243adf6810386e0f9b,
|
||||
type: 2}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.18958697, g: 0.1971645, b: 0.2726874, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ShowResolutionOverlay: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_UseShadowmask: 1
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &139557186
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 139557188}
|
||||
- component: {fileID: 139557187}
|
||||
m_Layer: 0
|
||||
m_Name: Starry Night Sky
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &139557187
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 139557186}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5c868c49d0ac1174e9b4eb2f351c4624, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
profile: {fileID: 11400000, guid: 051a4fec1fcd7f243adf6810386e0f9b, type: 2}
|
||||
sunLightSource: {fileID: 0}
|
||||
moonLightSource: {fileID: 1198175177}
|
||||
--- !u!4 &139557188
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 139557186}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &843455133
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 843455137}
|
||||
- component: {fileID: 843455136}
|
||||
- component: {fileID: 843455135}
|
||||
- component: {fileID: 843455134}
|
||||
m_Layer: 0
|
||||
m_Name: Plane
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!64 &843455134
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 843455133}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Convex: 0
|
||||
m_CookingOptions: 14
|
||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &843455135
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 843455133}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!33 &843455136
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 843455133}
|
||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!4 &843455137
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 843455133}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 10, y: 10, z: 10}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1190294518
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1190294521}
|
||||
- component: {fileID: 1190294520}
|
||||
- component: {fileID: 1190294519}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &1190294519
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1190294518}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1190294520
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1190294518}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &1190294521
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1190294518}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1198175176
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1198175178}
|
||||
- component: {fileID: 1198175177}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &1198175177
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1198175176}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 9
|
||||
m_Type: 1
|
||||
m_Color: {r: 0.6567283, g: 0.75291616, b: 0.8867924, a: 1}
|
||||
m_Intensity: 0.2
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 2.3510647e-38, z: 0, w: 2.3510647e-38}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &1198175178
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1198175176}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &1778807921
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1778807925}
|
||||
- component: {fileID: 1778807924}
|
||||
- component: {fileID: 1778807923}
|
||||
- component: {fileID: 1778807922}
|
||||
m_Layer: 0
|
||||
m_Name: Sphere
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!135 &1778807922
|
||||
SphereCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1778807921}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.5
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &1778807923
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1778807921}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 9e205b4d9f3c8a44598a066ad2403272, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!33 &1778807924
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1778807921}
|
||||
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!4 &1778807925
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1778807921}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 5, z: 0}
|
||||
m_LocalScale: {x: 10, y: 10, z: 10}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
@@ -0,0 +1,187 @@
|
||||
%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: fa5278d11d9502245b5cc174a196561b, type: 3}
|
||||
m_Name: SkyProfile-951463904131721736
|
||||
m_EditorClassIdentifier:
|
||||
skyColor: {r: 0.10090523, g: 0.06363475, b: 0.20754719, a: 1}
|
||||
horizonColor: {r: 0.38431373, g: 0.48638386, b: 0.6509804, a: 1}
|
||||
groundColor: {r: 0.1981132, g: 0.1981132, b: 0.1981132, a: 1}
|
||||
horizonThickness: 1
|
||||
horizonExponent: 5
|
||||
horizonStep: 1000
|
||||
enableStars: 1
|
||||
starsStartPosition: -0.01
|
||||
starsEndPosition: 1
|
||||
starsOpacity: 1
|
||||
starsLayerCount: 3
|
||||
starsColor0: {r: 0.9254902, g: 0.88081425, b: 0.5432628, a: 1}
|
||||
starsColor1: {r: 1, g: 0.24056602, b: 0.8628801, a: 1}
|
||||
starsColor2: {r: 0, g: 0.8351569, b: 1, a: 1}
|
||||
starsDensity0: 0.4
|
||||
starsDensity1: 0.34
|
||||
starsDensity2: 0.45
|
||||
starsSize0: 0.42
|
||||
starsSize1: 0.53
|
||||
starsSize2: 0.46
|
||||
starsGlow0: 0.01
|
||||
starsGlow1: 0.01
|
||||
starsGlow2: 0.01
|
||||
starsTwinkle0: 5
|
||||
starsTwinkle1: 6
|
||||
starsTwinkle2: 2
|
||||
useBakedStars: 1
|
||||
starsCubemap: {fileID: 8900000, guid: 59c7b8a8456c65d4aa28c47a49e4ea49, type: 2}
|
||||
starsTwinkleMap: {fileID: 2800000, guid: d69d12cf3b1e2b144881667c78b2e4f9, type: 3}
|
||||
enableSun: 0
|
||||
sunTexture: {fileID: 0}
|
||||
sunColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
sunSize: 0
|
||||
sunSoftEdge: 0
|
||||
sunGlow: 0
|
||||
useBakedSun: 0
|
||||
sunCubemap: {fileID: 0}
|
||||
sunLightColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
sunLightIntensity: 0
|
||||
enableMoon: 1
|
||||
moonTexture: {fileID: 0}
|
||||
moonColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
moonSize: 0.07
|
||||
moonSoftEdge: 0.22
|
||||
moonGlow: 0.24
|
||||
useBakedMoon: 1
|
||||
moonCubemap: {fileID: 8900000, guid: ef0c7a1c7205a274c8ae147b1fc68287, type: 2}
|
||||
moonLightColor: {r: 0.6567283, g: 0.75291616, b: 0.8867924, a: 1}
|
||||
moonLightIntensity: 0.2
|
||||
customCloudTexture: {fileID: 0}
|
||||
enableHorizonCloud: 0
|
||||
horizonCloudColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
horizonCloudStartPosition: -0.01
|
||||
horizonCloudEndPosition: 0.35
|
||||
horizonCloudSize: 4.47
|
||||
horizonCloudStep: 25
|
||||
horizonCloudAnimationSpeed: 50
|
||||
enableOverheadCloud: 0
|
||||
overheadCloudColor: {r: 1, g: 1, b: 1, a: 0.09803922}
|
||||
overheadCloudAltitude: 1000
|
||||
overheadCloudSize: 10
|
||||
overheadCloudStep: 25
|
||||
overheadCloudAnimationSpeed: 50
|
||||
overheadCloudFlowDirectionX: 1
|
||||
overheadCloudFlowDirectionZ: 1
|
||||
enableDetailOverlay: 1
|
||||
detailOverlayTintColor: {r: 1, g: 1, b: 1, a: 0.043137256}
|
||||
detailOverlayCubeMap: {fileID: 8900000, guid: f441ff010e8953541b03c7b6cf64f6f9,
|
||||
type: 2}
|
||||
detailOverlayLayer: 0
|
||||
detailOverlayRotationSpeed: 1
|
||||
allowStepEffect: 1
|
||||
material: {fileID: 336576615334345924}
|
||||
--- !u!21 &336576615334345924
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Jupiter/Sky
|
||||
m_Shader: {fileID: 4800000, guid: 3129e3b90193a0547900ecf4cf4e9864, type: 3}
|
||||
m_ShaderKeywords: ALLOW_STEP_EFFECT DETAIL_OVERLAY DETAIL_OVERLAY_ROTATION MOON
|
||||
MOON_BAKED STARS STARS_BAKED STARS_LAYER_0 STARS_LAYER_1 STARS_LAYER_2
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _DetailOverlayCubemap:
|
||||
m_Texture: {fileID: 8900000, guid: f441ff010e8953541b03c7b6cf64f6f9, type: 2}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MoonCubemap:
|
||||
m_Texture: {fileID: 8900000, guid: ef0c7a1c7205a274c8ae147b1fc68287, type: 2}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MoonTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _StarsCubemap:
|
||||
m_Texture: {fileID: 8900000, guid: 59c7b8a8456c65d4aa28c47a49e4ea49, type: 2}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _StarsTwinkleMap:
|
||||
m_Texture: {fileID: 2800000, guid: d69d12cf3b1e2b144881667c78b2e4f9, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SunCubemap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SunTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _DetailOverlayLayer: 0
|
||||
- _DetailOverlayRotationSpeed: 1
|
||||
- _HorizonCloudAnimationSpeed: 50
|
||||
- _HorizonCloudEnd: 0.35
|
||||
- _HorizonCloudSize: 4.47
|
||||
- _HorizonCloudStart: -0.01
|
||||
- _HorizonCloudStep: 25
|
||||
- _HorizonExponent: 5
|
||||
- _HorizonStep: 1000
|
||||
- _HorizonThickness: 1
|
||||
- _MoonGlow: 0.24
|
||||
- _MoonSize: 0.07
|
||||
- _MoonSoftEdge: 0.22
|
||||
- _OverheadCloudAltitude: 1000
|
||||
- _OverheadCloudAnimationSpeed: 50
|
||||
- _OverheadCloudFlowX: 1
|
||||
- _OverheadCloudFlowZ: 1
|
||||
- _OverheadCloudSize: 10
|
||||
- _OverheadCloudStep: 25
|
||||
- _StarsDensity0: 0.4
|
||||
- _StarsDensity1: 0.34
|
||||
- _StarsDensity2: 0.45
|
||||
- _StarsEnd: 1
|
||||
- _StarsGlow0: 0.01
|
||||
- _StarsGlow1: 0.01
|
||||
- _StarsGlow2: 0.01
|
||||
- _StarsOpacity: 1
|
||||
- _StarsSize0: 0.42
|
||||
- _StarsSize1: 0.53
|
||||
- _StarsSize2: 0.46
|
||||
- _StarsStart: -0.01
|
||||
- _StarsTwinkle0: 5
|
||||
- _StarsTwinkle1: 6
|
||||
- _StarsTwinkle2: 2
|
||||
- _SunGlow: 0
|
||||
- _SunSize: 0
|
||||
- _SunSoftEdge: 0
|
||||
m_Colors:
|
||||
- _DetailOverlayColor: {r: 1, g: 1, b: 1, a: 0.043137256}
|
||||
- _GroundColor: {r: 0.1981132, g: 0.1981132, b: 0.1981132, a: 1}
|
||||
- _HorizonCloudColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _HorizonColor: {r: 0.38431373, g: 0.48638386, b: 0.6509804, a: 1}
|
||||
- _MoonColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _MoonDirection: {r: -0.3213938, g: -0.76604444, b: 0.5566705, a: 0}
|
||||
- _OverheadCloudColor: {r: 1, g: 1, b: 1, a: 0.09803922}
|
||||
- _SkyColor: {r: 0.10090523, g: 0.06363475, b: 0.20754719, a: 1}
|
||||
- _StarsColor0: {r: 0.9254902, g: 0.88081425, b: 0.5432628, a: 1}
|
||||
- _StarsColor1: {r: 1, g: 0.24056602, b: 0.8628801, a: 1}
|
||||
- _StarsColor2: {r: 0, g: 0.8351569, b: 1, a: 1}
|
||||
- _SunColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SunDirection: {r: -1, g: -1, b: -1, a: 0}
|
@@ -0,0 +1,568 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 7677781255799719882, guid: d8aced6e1d4470c408ba6018f71fa776,
|
||||
type: 2}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.19030648, g: 0.19789922, b: 0.27351964, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 4890085278179872738, guid: dc0992640ba8e664fb8509a75b83b703,
|
||||
type: 2}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &537191406
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 537191410}
|
||||
- component: {fileID: 537191409}
|
||||
- component: {fileID: 537191408}
|
||||
- component: {fileID: 537191407}
|
||||
m_Layer: 0
|
||||
m_Name: Plane
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!64 &537191407
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 537191406}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 5
|
||||
m_Convex: 0
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &537191408
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 537191406}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!33 &537191409
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 537191406}
|
||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!4 &537191410
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 537191406}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 10, y: 10, z: 10}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &938599905
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 938599909}
|
||||
- component: {fileID: 938599908}
|
||||
- component: {fileID: 938599907}
|
||||
- component: {fileID: 938599906}
|
||||
m_Layer: 0
|
||||
m_Name: Sphere
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!135 &938599906
|
||||
SphereCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 938599905}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Radius: 0.5
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &938599907
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 938599905}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 9e205b4d9f3c8a44598a066ad2403272, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!33 &938599908
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 938599905}
|
||||
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!4 &938599909
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 938599905}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 5, z: 0}
|
||||
m_LocalScale: {x: 10, y: 10, z: 10}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &944450107
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 944450109}
|
||||
- component: {fileID: 944450108}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &944450108
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 944450107}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 0.75, g: 0.90826255, b: 1, a: 0}
|
||||
m_Intensity: 0.15
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &944450109
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 944450107}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &1536825981
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1536825984}
|
||||
- component: {fileID: 1536825983}
|
||||
- component: {fileID: 1536825982}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &1536825982
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1536825981}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1536825983
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1536825981}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &1536825984
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1536825981}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1785085011
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1785085013}
|
||||
- component: {fileID: 1785085012}
|
||||
m_Layer: 0
|
||||
m_Name: Starry Night Sky
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1785085012
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1785085011}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5c868c49d0ac1174e9b4eb2f351c4624, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
profile: {fileID: 11400000, guid: d8aced6e1d4470c408ba6018f71fa776, type: 2}
|
||||
sunLightSource: {fileID: 0}
|
||||
moonLightSource: {fileID: 944450108}
|
||||
--- !u!4 &1785085013
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1785085011}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
@@ -0,0 +1,266 @@
|
||||
%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: fa5278d11d9502245b5cc174a196561b, type: 3}
|
||||
m_Name: SkyProfile-328763143758421736
|
||||
m_EditorClassIdentifier:
|
||||
skyColor: {r: 0.10090523, g: 0.06363475, b: 0.20754719, a: 1}
|
||||
horizonColor: {r: 0.38431373, g: 0.48638386, b: 0.6509804, a: 1}
|
||||
groundColor: {r: 0.1981132, g: 0.1981132, b: 0.1981132, a: 1}
|
||||
horizonThickness: 1
|
||||
horizonExponent: 5
|
||||
horizonStep: 1000
|
||||
fogSyncOption: 0
|
||||
fogColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
enableStars: 1
|
||||
starsStartPosition: -0.01
|
||||
starsEndPosition: 1
|
||||
starsOpacity: 1
|
||||
starsLayerCount: 3
|
||||
starsColor0: {r: 0.9254902, g: 0.88081425, b: 0.5432628, a: 1}
|
||||
starsColor1: {r: 1, g: 0.24056602, b: 0.8628801, a: 1}
|
||||
starsColor2: {r: 0, g: 0.8351569, b: 1, a: 1}
|
||||
starsDensity0: 0.4
|
||||
starsDensity1: 0.34
|
||||
starsDensity2: 0.445
|
||||
starsSize0: 0.521
|
||||
starsSize1: 0.53
|
||||
starsSize2: 0.46
|
||||
starsGlow0: 0.01
|
||||
starsGlow1: 0.01
|
||||
starsGlow2: 0.01
|
||||
starsTwinkle0: 5
|
||||
starsTwinkle1: 6
|
||||
starsTwinkle2: 2
|
||||
useBakedStars: 0
|
||||
starsCubemap: {fileID: 0}
|
||||
starsTwinkleMap: {fileID: 0}
|
||||
enableSun: 0
|
||||
sunTexture: {fileID: 0}
|
||||
sunColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
sunSize: 0
|
||||
sunSoftEdge: 0
|
||||
sunGlow: 0
|
||||
useBakedSun: 0
|
||||
sunCubemap: {fileID: 0}
|
||||
sunLightColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
sunLightIntensity: 0
|
||||
enableMoon: 1
|
||||
moonTexture: {fileID: 0}
|
||||
moonColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
moonSize: 0.07
|
||||
moonSoftEdge: 0.204
|
||||
moonGlow: 0.2
|
||||
useBakedMoon: 0
|
||||
moonCubemap: {fileID: 0}
|
||||
moonLightColor: {r: 0.75, g: 0.90826255, b: 1, a: 0}
|
||||
moonLightIntensity: 0.15
|
||||
customCloudTexture: {fileID: 0}
|
||||
enableHorizonCloud: 0
|
||||
horizonCloudColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
horizonCloudStartPosition: -0.01
|
||||
horizonCloudEndPosition: 0.35
|
||||
horizonCloudSize: 4.47
|
||||
horizonCloudStep: 25
|
||||
horizonCloudAnimationSpeed: 50
|
||||
enableOverheadCloud: 1
|
||||
overheadCloudColor: {r: 1, g: 1, b: 1, a: 0.09803922}
|
||||
overheadCloudAltitude: 1000
|
||||
overheadCloudSize: 10
|
||||
overheadCloudStep: 25
|
||||
overheadCloudAnimationSpeed: 50
|
||||
overheadCloudFlowDirectionX: 1
|
||||
overheadCloudFlowDirectionZ: 1
|
||||
overheadCloudRemapMin: 0
|
||||
overheadCloudRemapMax: 0
|
||||
overheadCloudCastShadow: 0
|
||||
overheadCloudShadowClipMask: 0
|
||||
enableDetailOverlay: 1
|
||||
detailOverlayTintColor: {r: 1, g: 1, b: 1, a: 0.050980393}
|
||||
detailOverlayCubeMap: {fileID: 8900000, guid: f441ff010e8953541b03c7b6cf64f6f9,
|
||||
type: 2}
|
||||
detailOverlayLayer: 0
|
||||
detailOverlayRotationSpeed: 0
|
||||
allowStepEffect: 1
|
||||
material: {fileID: 7677781255799719882}
|
||||
shadowMaterial: {fileID: 7031675463666109058}
|
||||
--- !u!21 &7031675463666109058
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Jupiter/SkyShadow
|
||||
m_Shader: {fileID: 4800000, guid: 561c1777fd66e5d488ef1b85ed82bbaa, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- ALLOW_STEP_EFFECT
|
||||
m_InvalidKeywords:
|
||||
- DETAIL_OVERLAY
|
||||
- MOON
|
||||
- OVERHEAD_CLOUD
|
||||
- STARS
|
||||
- STARS_LAYER_0
|
||||
- STARS_LAYER_1
|
||||
- STARS_LAYER_2
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs: []
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _OverheadCloudAltitude: 1000
|
||||
- _OverheadCloudAnimationSpeed: 50
|
||||
- _OverheadCloudFlowDirectionX: 1
|
||||
- _OverheadCloudFlowDirectionZ: 1
|
||||
- _OverheadCloudRemapMax: 0
|
||||
- _OverheadCloudRemapMin: 0
|
||||
- _OverheadCloudShadowClipMask: 0
|
||||
- _OverheadCloudSize: 10
|
||||
- _OverheadCloudStep: 25
|
||||
m_Colors:
|
||||
- _OverheadCloudColor: {r: 1, g: 1, b: 1, a: 0.09803922}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!21 &7677781255799719882
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Jupiter/Sky
|
||||
m_Shader: {fileID: 4800000, guid: 3129e3b90193a0547900ecf4cf4e9864, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- ALLOW_STEP_EFFECT
|
||||
- DETAIL_OVERLAY
|
||||
- MOON
|
||||
- OVERHEAD_CLOUD
|
||||
- STARS
|
||||
- STARS_LAYER_0
|
||||
- STARS_LAYER_1
|
||||
- STARS_LAYER_2
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _DetailOverlayCubemap:
|
||||
m_Texture: {fileID: 8900000, guid: f441ff010e8953541b03c7b6cf64f6f9, type: 2}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MoonCubemap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MoonTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _StarsCubemap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _StarsTwinkleMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SunCubemap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SunTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _DetailOverlayLayer: 0
|
||||
- _DetailOverlayRotationSpeed: 0
|
||||
- _HorizonCloudAnimationSpeed: 50
|
||||
- _HorizonCloudEnd: 0.35
|
||||
- _HorizonCloudEndPosition: 0.35
|
||||
- _HorizonCloudSize: 4.47
|
||||
- _HorizonCloudStart: -0.01
|
||||
- _HorizonCloudStartPosition: -0.01
|
||||
- _HorizonCloudStep: 25
|
||||
- _HorizonExponent: 5
|
||||
- _HorizonStep: 1000
|
||||
- _HorizonThickness: 1
|
||||
- _MoonGlow: 0.2
|
||||
- _MoonLightIntensity: 0.15
|
||||
- _MoonSize: 0.07
|
||||
- _MoonSoftEdge: 0.204
|
||||
- _OverheadCloudAltitude: 1000
|
||||
- _OverheadCloudAnimationSpeed: 50
|
||||
- _OverheadCloudFlowDirectionX: 1
|
||||
- _OverheadCloudFlowDirectionZ: 1
|
||||
- _OverheadCloudFlowX: 1
|
||||
- _OverheadCloudFlowZ: 1
|
||||
- _OverheadCloudRemapMax: 0
|
||||
- _OverheadCloudRemapMin: 0
|
||||
- _OverheadCloudSize: 10
|
||||
- _OverheadCloudStep: 25
|
||||
- _StarsDensity0: 0.4
|
||||
- _StarsDensity1: 0.34
|
||||
- _StarsDensity2: 0.445
|
||||
- _StarsEnd: 1
|
||||
- _StarsEndPosition: 1
|
||||
- _StarsGlow0: 0.01
|
||||
- _StarsGlow1: 0.01
|
||||
- _StarsGlow2: 0.01
|
||||
- _StarsOpacity: 1
|
||||
- _StarsSize0: 0.521
|
||||
- _StarsSize1: 0.53
|
||||
- _StarsSize2: 0.46
|
||||
- _StarsStart: -0.01
|
||||
- _StarsStartPosition: -0.01
|
||||
- _StarsTwinkle0: 5
|
||||
- _StarsTwinkle1: 6
|
||||
- _StarsTwinkle2: 2
|
||||
- _SunGlow: 0
|
||||
- _SunLightIntensity: 0
|
||||
- _SunSize: 0
|
||||
- _SunSoftEdge: 0
|
||||
m_Colors:
|
||||
- _DetailOverlayColor: {r: 1, g: 1, b: 1, a: 0.047058824}
|
||||
- _DetailOverlayTintColor: {r: 1, g: 1, b: 1, a: 0.050980393}
|
||||
- _FogColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _GroundColor: {r: 0.1981132, g: 0.1981132, b: 0.1981132, a: 1}
|
||||
- _HorizonCloudColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _HorizonColor: {r: 0.38431373, g: 0.48638386, b: 0.6509804, a: 1}
|
||||
- _MoonColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _MoonDirection: {r: -0.3213938, g: -0.76604444, b: 0.5566705, a: 0}
|
||||
- _MoonLightColor: {r: 0.75, g: 0.90826255, b: 1, a: 0}
|
||||
- _OverheadCloudColor: {r: 1, g: 1, b: 1, a: 0.09803922}
|
||||
- _SkyColor: {r: 0.10090523, g: 0.06363475, b: 0.20754719, a: 1}
|
||||
- _StarsColor0: {r: 0.9254902, g: 0.88081425, b: 0.5432628, a: 1}
|
||||
- _StarsColor1: {r: 1, g: 0.24056602, b: 0.8628801, a: 1}
|
||||
- _StarsColor2: {r: 0, g: 0.8351569, b: 1, a: 1}
|
||||
- _SunColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SunDirection: {r: -1, g: -1, b: -1, a: 0}
|
||||
- _SunLightColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
@@ -0,0 +1,63 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!850595691 &4890085278179872738
|
||||
LightingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: StarryNightSettings
|
||||
serializedVersion: 7
|
||||
m_GIWorkflowMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_RealtimeEnvironmentLighting: 1
|
||||
m_BounceScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_UsingShadowmask: 1
|
||||
m_BakeBackend: 1
|
||||
m_LightmapMaxSize: 1024
|
||||
m_LightmapSizeFixed: 0
|
||||
m_BakeResolution: 40
|
||||
m_Padding: 2
|
||||
m_LightmapCompression: 3
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAO: 0
|
||||
m_MixedBakeMode: 2
|
||||
m_LightmapsBakeMode: 1
|
||||
m_FilterMode: 1
|
||||
m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_RealtimeResolution: 2
|
||||
m_ForceWhiteAlbedo: 0
|
||||
m_ForceUpdates: 0
|
||||
m_PVRCulling: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_PVRBounces: 2
|
||||
m_PVRMinBounces: 2
|
||||
m_PVREnvironmentImportanceSampling: 1
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_PVRTiledBaking: 0
|
||||
m_RespectSceneVisibilityWhenBakingGI: 0
|
@@ -26,7 +26,8 @@ RenderSettings:
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_SkyboxMaterial: {fileID: -1034750686407603258, guid: aa78d282081ce6443affabf3d315aaba,
|
||||
type: 2}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
@@ -38,20 +39,20 @@ RenderSettings:
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.18176873, g: 0.22743809, b: 0.30742016, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.27221638, g: 0.35141712, b: 0.48191014, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 1
|
||||
m_GIWorkflowMode: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
@@ -72,21 +73,21 @@ LightmapSettings:
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 0
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 500
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 2
|
||||
m_PVRDenoiserTypeDirect: 0
|
||||
m_PVRDenoiserTypeIndirect: 0
|
||||
m_PVRDenoiserTypeAO: 0
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
@@ -98,7 +99,7 @@ LightmapSettings:
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_UseShadowmask: 0
|
||||
m_UseShadowmask: 1
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
@@ -121,7 +122,7 @@ NavMeshSettings:
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &145015722
|
||||
--- !u!1 &83273983
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -129,25 +130,38 @@ GameObject:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 145015726}
|
||||
- component: {fileID: 145015725}
|
||||
- component: {fileID: 145015724}
|
||||
- component: {fileID: 145015723}
|
||||
- component: {fileID: 145015727}
|
||||
- component: {fileID: 83273987}
|
||||
- component: {fileID: 83273986}
|
||||
- component: {fileID: 83273985}
|
||||
- component: {fileID: 83273984}
|
||||
m_Layer: 0
|
||||
m_Name: Sphere
|
||||
m_Name: Plane
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!23 &145015723
|
||||
m_IsActive: 1
|
||||
--- !u!64 &83273984
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 83273983}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
m_Convex: 0
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &83273985
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 145015722}
|
||||
m_GameObject: {fileID: 83273983}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
@@ -159,7 +173,7 @@ MeshRenderer:
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 9a0c490e149740e5965c8b31251f6bf1, type: 2}
|
||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
@@ -168,7 +182,7 @@ MeshRenderer:
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
@@ -180,55 +194,29 @@ MeshRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!135 &145015724
|
||||
SphereCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 145015722}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.5
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &145015725
|
||||
--- !u!33 &83273986
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 145015722}
|
||||
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!4 &145015726
|
||||
m_GameObject: {fileID: 83273983}
|
||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!4 &83273987
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 145015722}
|
||||
m_GameObject: {fileID: 83273983}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.09156409, y: -0.038, z: -0.03811574}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 10, y: 10, z: 10}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 5
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &145015727
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 145015722}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: edba1cfbc6e44a52803444e01e4fe72b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
speed: 40
|
||||
--- !u!1 &512679041
|
||||
--- !u!1 &92275222
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -236,8 +224,8 @@ GameObject:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 512679043}
|
||||
- component: {fileID: 512679042}
|
||||
- component: {fileID: 92275224}
|
||||
- component: {fileID: 92275223}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
@@ -245,19 +233,19 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &512679042
|
||||
--- !u!108 &92275223
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 512679041}
|
||||
m_GameObject: {fileID: 92275222}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_Intensity: 0
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
@@ -306,21 +294,21 @@ Light:
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &512679043
|
||||
--- !u!4 &92275224
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 512679041}
|
||||
m_LocalRotation: {x: 0.36430037, y: 0.14140831, z: -0.10133494, w: 0.9148881}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_GameObject: {fileID: 92275222}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 44.047, y: 14.908001, z: -6.5820003}
|
||||
--- !u!1 &578891318
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &1001336289
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -328,25 +316,83 @@ GameObject:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 578891322}
|
||||
- component: {fileID: 578891321}
|
||||
- component: {fileID: 578891320}
|
||||
- component: {fileID: 578891319}
|
||||
- component: {fileID: 578891323}
|
||||
- component: {fileID: 1001336291}
|
||||
- component: {fileID: 1001336290}
|
||||
m_Layer: 0
|
||||
m_Name: Cube
|
||||
m_Name: Sunny Day Sky
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!23 &578891319
|
||||
--- !u!114 &1001336290
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1001336289}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5c868c49d0ac1174e9b4eb2f351c4624, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
profile: {fileID: 11400000, guid: aa78d282081ce6443affabf3d315aaba, type: 2}
|
||||
sunLightSource: {fileID: 92275223}
|
||||
moonLightSource: {fileID: 0}
|
||||
--- !u!4 &1001336291
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1001336289}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1215719442
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1215719446}
|
||||
- component: {fileID: 1215719445}
|
||||
- component: {fileID: 1215719444}
|
||||
- component: {fileID: 1215719443}
|
||||
m_Layer: 0
|
||||
m_Name: Sphere
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!135 &1215719443
|
||||
SphereCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1215719442}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.5
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &1215719444
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 578891318}
|
||||
m_GameObject: {fileID: 1215719442}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
@@ -358,7 +404,7 @@ MeshRenderer:
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 9a0c490e149740e5965c8b31251f6bf1, type: 2}
|
||||
- {fileID: 2100000, guid: 9e205b4d9f3c8a44598a066ad2403272, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
@@ -367,7 +413,7 @@ MeshRenderer:
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
@@ -379,85 +425,29 @@ MeshRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!65 &578891320
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 578891318}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &578891321
|
||||
--- !u!33 &1215719445
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 578891318}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!4 &578891322
|
||||
m_GameObject: {fileID: 1215719442}
|
||||
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!4 &1215719446
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 578891318}
|
||||
m_LocalRotation: {x: -0.2093026, y: -0.20915785, z: 0.95216906, w: 0.0762857}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 21.492, y: -27.559002, z: 165.509}
|
||||
--- !u!114 &578891323
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 578891318}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: edba1cfbc6e44a52803444e01e4fe72b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
speed: 40
|
||||
--- !u!1 &593748844
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 593748845}
|
||||
m_Layer: 0
|
||||
m_Name: Pivot
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &593748845
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 593748844}
|
||||
m_GameObject: {fileID: 1215719442}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 1.2191811, y: 0.9897716, z: -6.4827356}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_LocalPosition: {x: 0, y: 5, z: 0}
|
||||
m_LocalScale: {x: 10, y: 10, z: 10}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1227092918
|
||||
--- !u!1 &1350146712
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -465,90 +455,9 @@ GameObject:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1227092919}
|
||||
m_Layer: 0
|
||||
m_Name: Zero
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1227092919
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1227092918}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1247007092
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1247007094}
|
||||
- component: {fileID: 1247007093}
|
||||
m_Layer: 0
|
||||
m_Name: Global Volume
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1247007093
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1247007092}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
isGlobal: 1
|
||||
priority: 0
|
||||
blendDistance: 0
|
||||
weight: 1
|
||||
sharedProfile: {fileID: 11400000, guid: 8789d13b297c4569a0b87503028fa8e1, type: 2}
|
||||
--- !u!4 &1247007094
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1247007092}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.96414673, y: 0.12890083, z: 0.44674012}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2111549245
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2111549250}
|
||||
- component: {fileID: 2111549249}
|
||||
- component: {fileID: 2111549247}
|
||||
- component: {fileID: 2111549246}
|
||||
- component: {fileID: 2111549252}
|
||||
- component: {fileID: 2111549248}
|
||||
- component: {fileID: 1350146715}
|
||||
- component: {fileID: 1350146714}
|
||||
- component: {fileID: 1350146713}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
@@ -556,64 +465,25 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &2111549246
|
||||
--- !u!81 &1350146713
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2111549245}
|
||||
m_GameObject: {fileID: 1350146712}
|
||||
m_Enabled: 1
|
||||
--- !u!124 &2111549247
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2111549245}
|
||||
m_Enabled: 1
|
||||
--- !u!114 &2111549248
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2111549245}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_RenderPostProcessing: 1
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 1
|
||||
m_Dithering: 1
|
||||
m_ClearDepth: 1
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_Version: 2
|
||||
--- !u!20 &2111549249
|
||||
--- !u!20 &1350146714
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2111549245}
|
||||
m_GameObject: {fileID: 1350146712}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 2
|
||||
m_BackGroundColor: {r: 0, g: 0.024813987, b: 0.17647058, a: 0}
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
@@ -628,7 +498,7 @@ Camera:
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 25
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
@@ -646,32 +516,17 @@ Camera:
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &2111549250
|
||||
--- !u!4 &1350146715
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2111549245}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -4.88}
|
||||
m_GameObject: {fileID: 1350146712}
|
||||
m_LocalRotation: {x: -0.0036009734, y: 0.38656926, z: -0.0014904164, w: -0.92225224}
|
||||
m_LocalPosition: {x: 64.74625, y: 15.87354, z: -64.39961}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2111549252
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2111549245}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bd3835579f5445dfb79044ab9bc1d0ab, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
focus: {x: 0, y: 0, z: 0}
|
||||
focusObj: {fileID: 1227092918}
|
||||
showInstWindow: 1
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user