mirror of
https://github.com/DeMuenu/MoonlightVRC.git
synced 2026-05-06 10:22:20 +00:00
Fix Gemini stuff
This commit is contained in:
@@ -85,7 +85,7 @@ public static class LightUpdaterPreview
|
|||||||
|
|
||||||
static void PushFromBehaviour(LightUpdater src)
|
static void PushFromBehaviour(LightUpdater src)
|
||||||
{
|
{
|
||||||
int max = Mathf.Max(1, src.maxLights);
|
int max = Mathf.Max(1, LightUpdater.maxLights);
|
||||||
EnsureArrays(src, max);
|
EnsureArrays(src, max);
|
||||||
|
|
||||||
var c = _cache[src];
|
var c = _cache[src];
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// Assets/Lighting/Scripts/LightUpdater.Editor.cs
|
// Assets/Lighting/Scripts/LightUpdater.Editor.cs
|
||||||
#if UNITY_EDITOR
|
#if !COMPILER_UDONSHARP && UNITY_EDITOR
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public partial class LightUpdater
|
public partial class LightUpdater
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ public partial class LightUpdater : UdonSharpBehaviour
|
|||||||
[Tooltip("float array: shadow map index (0=none, 1-4=shadow map index)")]
|
[Tooltip("float array: shadow map index (0=none, 1-4=shadow map index)")]
|
||||||
public string shadowMapIndexProperty = "_Udon_ShadowMapIndex";
|
public string shadowMapIndexProperty = "_Udon_ShadowMapIndex";
|
||||||
|
|
||||||
[Header("Max Lights (advanced users)")]
|
[Header("Max Lighetts (advanced users)")]
|
||||||
[Tooltip("Hard cap / array size. 80 = default cap")]
|
[Tooltip("Hard cap / array size. 80 = default cap")]
|
||||||
public int maxLights = 80;
|
public const int maxLights = 80;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ public partial class LightUpdater : UdonSharpBehaviour
|
|||||||
private float[] _ShadowMapArray;
|
private float[] _ShadowMapArray;
|
||||||
private bool _ShadowMap_isDirty = false;
|
private bool _ShadowMap_isDirty = false;
|
||||||
|
|
||||||
private LightdataStorage[] _sceneLights;
|
private LightdataStorage[] _sceneLights = new LightdataStorage[maxLights];
|
||||||
private int _sceneLightCount = 0;
|
private int _sceneLightCount = 0;
|
||||||
|
|
||||||
private VRCPlayerApi[] _players;
|
private VRCPlayerApi[] _players;
|
||||||
@@ -85,14 +85,12 @@ public partial class LightUpdater : UdonSharpBehaviour
|
|||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
if (maxLights < 1) maxLights = 1;
|
|
||||||
|
|
||||||
_positions = new Vector4[maxLights];
|
_positions = new Vector4[maxLights];
|
||||||
_lightColors = new Vector4[maxLights];
|
_lightColors = new Vector4[maxLights];
|
||||||
_directions = new Vector4[maxLights];
|
_directions = new Vector4[maxLights];
|
||||||
_TypeArray = new float[maxLights];
|
_TypeArray = new float[maxLights];
|
||||||
_ShadowMapArray = new float[maxLights];
|
_ShadowMapArray = new float[maxLights];
|
||||||
_sceneLights = new LightdataStorage[maxLights];
|
|
||||||
|
|
||||||
_players = new VRCPlayerApi[maxLights];
|
_players = new VRCPlayerApi[maxLights];
|
||||||
|
|
||||||
|
|||||||
7
Shader/Includes/Moonlight.hlsl.meta
Normal file
7
Shader/Includes/Moonlight.hlsl.meta
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1193ddffee5ac344ea57d621ec8150f6
|
||||||
|
ShaderIncludeImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Reference in New Issue
Block a user