-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* unity update * new water shader added for local * update noise preview button * Water mesh collider removed * Post processing changes * Under water mesh changes
- Loading branch information
Showing
20 changed files
with
433 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using System; | ||
using CodeBlaze.Vloxy.Demo.Utils; | ||
using CodeBlaze.Vloxy.Engine.Data; | ||
using UnityEngine; | ||
using UnityEngine.Rendering; | ||
|
||
namespace CodeBlaze.Vloxy.Demo.Managers { | ||
|
||
public enum PostProcessingMode { | ||
MAIN, | ||
UNDERWATER | ||
} | ||
|
||
public class PostProcessingManager : SingletonBehaviour<PostProcessingManager> { | ||
|
||
[SerializeField] private VolumeProfile _main; | ||
[SerializeField] private VolumeProfile _underwater; | ||
|
||
private Volume _volume; | ||
|
||
public PostProcessingMode Mode { get; private set; } | ||
|
||
private void Start() { | ||
_volume = GetComponent<Volume>(); | ||
|
||
SetProfileMain(); | ||
} | ||
|
||
public void UpdateMode(Block block) { | ||
switch (block) { | ||
case Block.WATER: | ||
if (Mode != PostProcessingMode.UNDERWATER) SetProfileUnderwater(); | ||
break; | ||
default: | ||
if (Mode != PostProcessingMode.MAIN) SetProfileMain(); | ||
break; | ||
} | ||
} | ||
|
||
private void SetProfileMain() { | ||
_volume.profile = _main; | ||
|
||
var drawDistance = WorldAPI.Current.World.Settings.Chunk.DrawDistance; | ||
|
||
RenderSettings.fogMode = FogMode.Linear; | ||
RenderSettings.fogEndDistance = drawDistance * 32 - 16; | ||
|
||
Mode = PostProcessingMode.MAIN; | ||
} | ||
|
||
private void SetProfileUnderwater() { | ||
_volume.profile = _underwater; | ||
|
||
var drawDistance = WorldAPI.Current.World.Settings.Chunk.DrawDistance; | ||
|
||
RenderSettings.fogMode = FogMode.Linear; | ||
RenderSettings.fogEndDistance = Mathf.Max(64, drawDistance * 32 - 128); | ||
|
||
Mode = PostProcessingMode.UNDERWATER; | ||
} | ||
|
||
} | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &-6692942426037315030 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 3 | ||
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: 5485954d14dfb9a4c8ead8edb0ded5b1, type: 3} | ||
m_Name: LiftGammaGain | ||
m_EditorClassIdentifier: | ||
active: 1 | ||
lift: | ||
m_OverrideState: 1 | ||
m_Value: {x: 0, y: 0.7071836, z: 1, w: 0} | ||
gamma: | ||
m_OverrideState: 1 | ||
m_Value: {x: 0, y: 0.82316446, z: 1, w: 0} | ||
gain: | ||
m_OverrideState: 1 | ||
m_Value: {x: 0, y: 0.7773938, z: 1, w: 0} | ||
--- !u!114 &-6644755081694344559 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 3 | ||
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: 899c54efeace73346a0a16faa3afe726, type: 3} | ||
m_Name: Vignette | ||
m_EditorClassIdentifier: | ||
active: 1 | ||
color: | ||
m_OverrideState: 1 | ||
m_Value: {r: 0, g: 0, b: 0, a: 1} | ||
center: | ||
m_OverrideState: 1 | ||
m_Value: {x: 0.5, y: 0.5} | ||
intensity: | ||
m_OverrideState: 1 | ||
m_Value: 0.4 | ||
smoothness: | ||
m_OverrideState: 1 | ||
m_Value: 0.1 | ||
rounded: | ||
m_OverrideState: 1 | ||
m_Value: 0 | ||
--- !u!114 &-942842996603021615 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 3 | ||
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: 29fa0085f50d5e54f8144f766051a691, type: 3} | ||
m_Name: FilmGrain | ||
m_EditorClassIdentifier: | ||
active: 1 | ||
type: | ||
m_OverrideState: 1 | ||
m_Value: 0 | ||
intensity: | ||
m_OverrideState: 1 | ||
m_Value: 0.1 | ||
response: | ||
m_OverrideState: 1 | ||
m_Value: 0.8 | ||
texture: | ||
m_OverrideState: 1 | ||
m_Value: {fileID: 0} | ||
--- !u!114 &-905501839028520348 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 3 | ||
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: 66f335fb1ffd8684294ad653bf1c7564, type: 3} | ||
m_Name: ColorAdjustments | ||
m_EditorClassIdentifier: | ||
active: 1 | ||
postExposure: | ||
m_OverrideState: 0 | ||
m_Value: 0 | ||
contrast: | ||
m_OverrideState: 0 | ||
m_Value: -3.1 | ||
colorFilter: | ||
m_OverrideState: 0 | ||
m_Value: {r: 1, g: 1, b: 1, a: 1} | ||
hueShift: | ||
m_OverrideState: 1 | ||
m_Value: 26 | ||
saturation: | ||
m_OverrideState: 1 | ||
m_Value: 100 | ||
--- !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: d7fd9488000d3734a9e00ee676215985, type: 3} | ||
m_Name: Underwater | ||
m_EditorClassIdentifier: | ||
components: | ||
- {fileID: 3870444541769218594} | ||
- {fileID: -6644755081694344559} | ||
- {fileID: -942842996603021615} | ||
- {fileID: -6692942426037315030} | ||
- {fileID: -905501839028520348} | ||
--- !u!114 &3870444541769218594 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 3 | ||
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: 97c23e3b12dc18c42a140437e53d3951, type: 3} | ||
m_Name: Tonemapping | ||
m_EditorClassIdentifier: | ||
active: 1 | ||
mode: | ||
m_OverrideState: 1 | ||
m_Value: 2 | ||
neutralHDRRangeReductionMode: | ||
m_OverrideState: 0 | ||
m_Value: 2 | ||
acesPreset: | ||
m_OverrideState: 0 | ||
m_Value: 3 | ||
hueShiftAmount: | ||
m_OverrideState: 0 | ||
m_Value: 0 | ||
detectPaperWhite: | ||
m_OverrideState: 0 | ||
m_Value: 0 | ||
paperWhite: | ||
m_OverrideState: 0 | ||
m_Value: 300 | ||
detectBrightnessLimits: | ||
m_OverrideState: 0 | ||
m_Value: 1 | ||
minNits: | ||
m_OverrideState: 0 | ||
m_Value: 0.005 | ||
maxNits: | ||
m_OverrideState: 0 | ||
m_Value: 1000 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.