Skip to content

Commit

Permalink
feat: Rendering/sky box v2 sun moon and stars (#207)
Browse files Browse the repository at this point in the history
* Calibration of SkyBox sun coord, addition of BSC5 stars
* Compute vs Pixel shader star rendering.
* Create an utility to hot reload compute shaders
* TimeOfDay - Skybox
* Arrange SkyBox according to the architecture
* Move to the separate plugin
* Move logic to the system
* Jobify math ops

---------

Co-authored-by: Geoff Birch <[email protected]>
  • Loading branch information
mikhail-dcl and GBirch33 authored Jan 8, 2024
1 parent 4ba1d69 commit 15075d8
Show file tree
Hide file tree
Showing 90 changed files with 3,258 additions and 1,230 deletions.
44 changes: 4 additions & 40 deletions Explorer/Assets/DCL/InfiniteFloor/Floor.mat
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,14 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _AlphaTextureArr:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseMap:
m_Texture: {fileID: 2800000, guid: adac04f1d8e4f7d4ba258226a05fcddf, type: 3}
m_Scale: {x: 400, y: 400}
m_Offset: {x: 0, y: 0}
- _BaseMapArr:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMapArr:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
Expand All @@ -76,10 +64,6 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMapArr:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FresnelMatCap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
Expand All @@ -104,10 +88,6 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMapArr:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
Expand All @@ -132,15 +112,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints:
- _AlphaTextureArr_ID: -1
- _BaseMapArr_ID: -1
- _BumpMapArr_ID: -1
- _EmissionMapArr_ID: -1
- _MetallicGlossMapArr_ID: -1
- _OcclusionMapArr_ID: -1
- _lastAvatarVertCount: -1
- _lastWearableVertCount: -1
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
Expand All @@ -155,10 +127,6 @@ Material:
- _Cutoff: 0
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DiffuseRampInnerMax: 1
- _DiffuseRampInnerMin: 0
- _DiffuseRampOuterMax: 1
- _DiffuseRampOuterMin: 0
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EmissiveMapUVs: 0
Expand All @@ -181,23 +149,19 @@ Material:
- _Smoothness: 0.322
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SpecularRampInnerMax: 1
- _SpecularRampInnerMin: 0
- _SpecularRampOuterMax: 1
- _SpecularRampOuterMin: 0
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _Thickness: 0.00261
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BackgroundColor: {r: 0, g: 0, b: 0, a: 1}
- _BackgroundColor: {r: 0.7647059, g: 0.654902, b: 0.68100697, a: 0.36078432}
- _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}
- _MainColor: {r: 0, g: 0, b: 0, a: 1}
- _MainColor: {r: 0.5, g: 1, b: 1, a: 1}
- _PlaneClipping: {r: -2.1474836e+9, g: 2.1474836e+9, b: -2.1474836e+9, a: 2.1474836e+9}
- _SecondaryColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_BuildTextureStacks: []
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public static DebugUtilitiesContainer Create(DebugViewsCatalog viewsCatalog)
{ typeof(DebugFloatFieldDef), new DebugElementBase<DebugFloatFieldElement, DebugFloatFieldDef>.Factory(viewsCatalog.FloatField) },
{ typeof(DebugHintDef), new DebugElementBase<DebugHintElement, DebugHintDef>.Factory(viewsCatalog.Hint) },
{ typeof(DebugIntFieldDef), new DebugElementBase<DebugIntFieldElement, DebugIntFieldDef>.Factory(viewsCatalog.IntField) },
{ typeof(DebugIntSliderDef), new DebugElementBase<DebugIntSliderElement, DebugIntSliderDef>.Factory(viewsCatalog.IntSlider) },
{ typeof(DebugVector2IntFieldDef), new DebugElementBase<DebugVector2IntFieldElement, DebugVector2IntFieldDef>.Factory(viewsCatalog.Vector2IntField) },
{ typeof(DebugLongMarkerDef), new DebugElementBase<DebugLongMarkerElement, DebugLongMarkerDef>.Factory(viewsCatalog.LongMarker) },
{ typeof(DebugSetOnlyLabelDef), new DebugElementBase<DebugSetOnlyLabelElement, DebugSetOnlyLabelDef>.Factory(viewsCatalog.SetOnlyLabel) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public class DebugViewsCatalog
[field: SerializeField]
public VisualTreeAsset IntField { get; private set; }

[field: SerializeField]
public VisualTreeAsset IntSlider { get; private set; }

[field: SerializeField]
public VisualTreeAsset FloatField { get; private set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using DCL.DebugUtilities.UIBindings;

namespace DCL.DebugUtilities
{
public class DebugIntSliderDef : DebugIntFieldDef
{
public readonly int Min;
public readonly int Max;

public DebugIntSliderDef(ElementBinding<int> binding, int min, int max) : base(binding)
{
Min = min;
Max = max;
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
<DCL.DebugUtilities.Views.DebugIntSliderElement style="align-self: stretch;">
<ui:SliderInt picking-mode="Ignore" value="38" high-value="100" inverted="false" show-input-field="true" />
</DCL.DebugUtilities.Views.DebugIntSliderElement>
</ui:UXML>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using UnityEngine.UIElements;

namespace DCL.DebugUtilities.Views
{
public class DebugIntSliderElement : DebugElementBase<DebugIntSliderElement, DebugIntSliderDef>
{
public new class UxmlFactory : UxmlFactory<DebugIntSliderElement, UxmlTraits> { }

protected override void ConnectBindings()
{
SliderInt sliderInt = this.Q<SliderInt>();

sliderInt.lowValue = definition.Min;
sliderInt.highValue = definition.Max;

definition.Binding.Connect(sliderInt);
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Explorer/Assets/DCL/PluginSystem/DCL.Plugins.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@
"GUID:5ab29fa8ae5769b49ab29e390caca7a4",
"GUID:e56a0d6a94c144c784012e63b6043100",
"GUID:91cf8206af184dac8e30eb46747e9939",
"GUID:28964ef7dc9441b6b8671b61a8106690"
"GUID:28964ef7dc9441b6b8671b61a8106690",
"GUID:571dc9f8bded0034f98595106462e3d0",
"GUID:15fc0a57446b3144c949da3e2b9737a9"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand Down
Loading

0 comments on commit 15075d8

Please sign in to comment.