Skip to content

Commit

Permalink
Merge pull request #289 from GothicVRProject/feature/sky-revamped
Browse files Browse the repository at this point in the history
Feature/sky revamped
  • Loading branch information
JucanAndreiDaniel authored Jan 14, 2024
2 parents 6fd522d + c3c5393 commit ff107e2
Show file tree
Hide file tree
Showing 20 changed files with 749 additions and 20 deletions.
1 change: 1 addition & 0 deletions Assets/GothicVR/Editor/Scripts/Tools/FeatureFlagTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class FeatureFlagTool : EditorWindow
new (nameof(FeatureFlags.vobItemsDynamicAttach), typeof(bool), true),

// Ints
new (nameof(FeatureFlags.TimeMultiplier), typeof(float), 1),
new (nameof(FeatureFlags.startHour), typeof(int), 8), // Official start time of G1 - new game
new (nameof(FeatureFlags.startMinute), typeof(int), 0), // Official start time of G1 - new game

Expand Down
75 changes: 71 additions & 4 deletions Assets/GothicVR/Resources/Materials/GothicSky.mat
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,28 @@ Material:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: GothicSky
m_Shader: {fileID: 108, guid: 0000000000000000f000000000000000, type: 0}
m_Shader: {fileID: 4800000, guid: 93b46fd80ab75b048aedcb5df3194872, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords:
- _MAPPING_LATITUDE_LONGITUDE_LAYOUT
- _MIRRORONBACK_ON
- _SUNDISK_HIGH_QUALITY
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_LockedProperties: _FogCutoff
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BackTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
Expand All @@ -45,10 +50,22 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DownTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FrontTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _LeftTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
Expand All @@ -65,10 +82,38 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _RightTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Sky1:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Sky2:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Sky3:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Sky4:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Tex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _UpTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
Expand All @@ -83,8 +128,14 @@ Material:
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Alpha1: 1
- _Alpha2: 1
- _Alpha3: 1
- _Alpha4: 1
- _AlphaClip: 0
- _AlphaTestToggle: 0
- _AlphaToMask: 0
- _AtmosphereThickness: 1
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
Expand All @@ -96,35 +147,51 @@ Material:
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _Emission: 0
- _EnvironmentReflections: 1
- _Exposure: 1
- _FogCutoff: 0.3
- _GlossMapScale: 0
- _GlossSource: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _ImageType: 1
- _Layout: 0
- _Layout: 1
- _Mapping: 1
- _Metallic: 0
- _MirrorOnBack: 1
- _NormalMapToggle: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Rotation: 0
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecGlossMapToggle: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _SunDisk: 2
- _SunSize: 0.04
- _SunSizeConvergence: 5
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color2: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _FogColor: {r: 1, g: 1, b: 1, a: 0}
- _FogColor2: {r: 1, g: 1, b: 1, a: 0}
- _GroundColor: {r: 0.36899996, g: 0.34899998, b: 0.34099993, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
- _Vector1: {r: 0, g: 0, b: 0, a: 0}
- _Vector2: {r: 0.9, g: 1.1, b: 0, a: 0}
- _Vector3: {r: 0, g: 0, b: 0, a: 0}
- _Vector4: {r: 0.9, g: 1.1, b: 0, a: 0}
m_BuildTextureStacks: []
--- !u!114 &2550804037692824493
MonoBehaviour:
Expand Down
66 changes: 66 additions & 0 deletions Assets/GothicVR/Resources/worldLightingSettings.lighting
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
%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: worldLightingSettings
serializedVersion: 6
m_GIWorkflowMode: 1
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_RealtimeEnvironmentLighting: 1
m_BounceScale: 1
m_AlbedoBoost: 1
m_IndirectOutputScale: 1
m_UsingShadowmask: 1
m_BakeBackend: 2
m_LightmapMaxSize: 1024
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_FinalGather: 0
m_FinalGatherRayCount: 256
m_FinalGatherFiltering: 1
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_NumRaysToShootPerTexel: -1
m_RespectSceneVisibilityWhenBakingGI: 0
8 changes: 8 additions & 0 deletions Assets/GothicVR/Resources/worldLightingSettings.lighting.meta

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

14 changes: 14 additions & 0 deletions Assets/GothicVR/Scenes/Bootstrap.unity
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ MonoBehaviour:
createWayPointMeshes: 0
createWaypointEdgeMeshes: 0
enableDayTime: 1
TimeMultiplier: 1
sunMovementPerformanceValue: 1
startHour: 8
startMinute: 0
Expand Down Expand Up @@ -1612,6 +1613,7 @@ GameObject:
- component: {fileID: 1896514225}
- component: {fileID: 1896514223}
- component: {fileID: 1896514226}
- component: {fileID: 1896514228}
m_Layer: 0
m_Name: Managers
m_TagString: Untagged
Expand Down Expand Up @@ -1770,6 +1772,18 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d8a5433ca9664e58a7e90654db1d382c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1896514228
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1896514212}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 46e9095c72bc48bfb33591c93b3dc5f5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &2044949334
GameObject:
m_ObjectHideFlags: 0
Expand Down
22 changes: 13 additions & 9 deletions Assets/GothicVR/Scenes/Worlds/world.zen.unity
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ OcclusionCullingSettings:
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_Fog: 1
m_FogColor: {r: 0, g: 0, b: 0, a: 1}
m_FogMode: 1
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_LinearFogStart: 250
m_LinearFogEnd: 500
m_AmbientSkyColor: {r: 0, g: 0, b: 0, 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_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_SkyboxMaterial: {fileID: 2100000, guid: 39ac659c922b5b1489714aacd9b952e9, type: 2}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
Expand Down Expand Up @@ -98,7 +98,7 @@ LightmapSettings:
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_LightingSettings: {fileID: 0}
m_LightingSettings: {fileID: 4890085278179872738, guid: 8e19a4dfc17c45c4881fc82791748c12, type: 2}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
Expand All @@ -123,3 +123,7 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1660057539 &9223372036854775807
SceneRoots:
m_ObjectHideFlags: 0
m_Roots: []
3 changes: 0 additions & 3 deletions Assets/GothicVR/Scripts/Creator/WorldCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,6 @@ private static void WorldLoaded()
teleportationArea.interactionManager = interactionManager;
}

// TODO - For some reason the referenced skybox in scene is reset to default once game starts.
// We therefore need to reset it now again.
RenderSettings.skybox = TextureManager.I.skyMaterial;
}

#if UNITY_EDITOR
Expand Down
14 changes: 14 additions & 0 deletions Assets/GothicVR/Scripts/Data/SkyLayerData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using UnityEngine;

namespace GVR.Data
{
public class SkyLayerData
{
public Texture2D[] texBox;
public Texture2D tex;
public string texName = "";
public float texAlpha;
public float texScale = 1;
public Vector2 texSpeed = new(0.9f, 1.1f);
}
}
3 changes: 3 additions & 0 deletions Assets/GothicVR/Scripts/Data/SkyLayerData.cs.meta

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

Loading

0 comments on commit ff107e2

Please sign in to comment.