The Light Probe Proxy Volume component offers the possibility to use higher resolution lighting for large non-static GameObjects.

Inheritance: Behaviour
Ejemplo n.º 1
0
 static public int get_sizeCustom(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.LightProbeProxyVolume self = (UnityEngine.LightProbeProxyVolume)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.sizeCustom);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Ejemplo n.º 2
0
 static public int set_refreshMode(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.LightProbeProxyVolume             self = (UnityEngine.LightProbeProxyVolume)checkSelf(l);
         UnityEngine.LightProbeProxyVolume.RefreshMode v;
         v = (UnityEngine.LightProbeProxyVolume.RefreshMode)LuaDLL.luaL_checkinteger(l, 2);
         self.refreshMode = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Ejemplo n.º 3
0
 static public int Update(IntPtr l)
 {
     try {
         UnityEngine.LightProbeProxyVolume self = (UnityEngine.LightProbeProxyVolume)checkSelf(l);
         self.Update();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 4
0
 static public int get_originCustom(IntPtr l)
 {
     try {
         UnityEngine.LightProbeProxyVolume self = (UnityEngine.LightProbeProxyVolume)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.originCustom);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 5
0
 static public int get_refreshMode(IntPtr l)
 {
     try {
         UnityEngine.LightProbeProxyVolume self = (UnityEngine.LightProbeProxyVolume)checkSelf(l);
         pushValue(l, true);
         pushEnum(l, (int)self.refreshMode);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 6
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.LightProbeProxyVolume o;
         o = new UnityEngine.LightProbeProxyVolume();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 7
0
 static public int set_probeDensity(IntPtr l)
 {
     try {
         UnityEngine.LightProbeProxyVolume self = (UnityEngine.LightProbeProxyVolume)checkSelf(l);
         float v;
         checkType(l, 2, out v);
         self.probeDensity = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 8
0
 static public int set_gridResolutionZ(IntPtr l)
 {
     try {
         UnityEngine.LightProbeProxyVolume self = (UnityEngine.LightProbeProxyVolume)checkSelf(l);
         int v;
         checkType(l, 2, out v);
         self.gridResolutionZ = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 9
0
 static public int set_refreshMode(IntPtr l)
 {
     try {
         UnityEngine.LightProbeProxyVolume             self = (UnityEngine.LightProbeProxyVolume)checkSelf(l);
         UnityEngine.LightProbeProxyVolume.RefreshMode v;
         checkEnum(l, 2, out v);
         self.refreshMode = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 10
0
 static public int set_originCustom(IntPtr l)
 {
     try {
         UnityEngine.LightProbeProxyVolume self = (UnityEngine.LightProbeProxyVolume)checkSelf(l);
         UnityEngine.Vector3 v;
         checkType(l, 2, out v);
         self.originCustom = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Write the specified value using the writer.
 /// </summary>
 /// <param name="value">Value.</param>
 /// <param name="writer">Writer.</param>
 public override void Write(object value, ISaveGameWriter writer)
 {
     UnityEngine.LightProbeProxyVolume lightProbeProxyVolume = (UnityEngine.LightProbeProxyVolume)value;
     writer.WriteProperty("sizeCustom", lightProbeProxyVolume.sizeCustom);
     writer.WriteProperty("originCustom", lightProbeProxyVolume.originCustom);
     writer.WriteProperty("boundingBoxMode", lightProbeProxyVolume.boundingBoxMode);
     writer.WriteProperty("resolutionMode", lightProbeProxyVolume.resolutionMode);
     writer.WriteProperty("probePositionMode", lightProbeProxyVolume.probePositionMode);
     writer.WriteProperty("refreshMode", lightProbeProxyVolume.refreshMode);
     writer.WriteProperty("probeDensity", lightProbeProxyVolume.probeDensity);
     writer.WriteProperty("gridResolutionX", lightProbeProxyVolume.gridResolutionX);
     writer.WriteProperty("gridResolutionY", lightProbeProxyVolume.gridResolutionY);
     writer.WriteProperty("gridResolutionZ", lightProbeProxyVolume.gridResolutionZ);
     writer.WriteProperty("enabled", lightProbeProxyVolume.enabled);
     writer.WriteProperty("tag", lightProbeProxyVolume.tag);
     writer.WriteProperty("name", lightProbeProxyVolume.name);
     writer.WriteProperty("hideFlags", lightProbeProxyVolume.hideFlags);
 }
Ejemplo n.º 12
0
 extern private static void Internal_DrawMesh(Mesh mesh, int submeshIndex, Matrix4x4 matrix, Material material, int layer, Camera camera, MaterialPropertyBlock properties, ShadowCastingMode castShadows, bool receiveShadows, Transform probeAnchor, LightProbeUsage lightProbeUsage, LightProbeProxyVolume lightProbeProxyVolume);
Ejemplo n.º 13
0
        public static void DrawMeshInstancedIndirect(Mesh mesh, int submeshIndex, Material material, Bounds bounds, ComputeBuffer bufferWithArgs, [uei.DefaultValue("0")] int argsOffset, [uei.DefaultValue("null")] MaterialPropertyBlock properties, [uei.DefaultValue("ShadowCastingMode.On")] ShadowCastingMode castShadows, [uei.DefaultValue("true")] bool receiveShadows, [uei.DefaultValue("0")] int layer, [uei.DefaultValue("null")] Camera camera, [uei.DefaultValue("LightProbeUsage.BlendProbes")] LightProbeUsage lightProbeUsage, [uei.DefaultValue("null")] LightProbeProxyVolume lightProbeProxyVolume)
        {
            if (!SystemInfo.supportsInstancing)
            {
                throw new InvalidOperationException("Instancing is not supported.");
            }
            else if (mesh == null)
            {
                throw new ArgumentNullException("mesh");
            }
            else if (submeshIndex < 0 || submeshIndex >= mesh.subMeshCount)
            {
                throw new ArgumentOutOfRangeException("submeshIndex", "submeshIndex out of range.");
            }
            else if (material == null)
            {
                throw new ArgumentNullException("material");
            }
            else if (bufferWithArgs == null)
            {
                throw new ArgumentNullException("bufferWithArgs");
            }
            if (lightProbeUsage == LightProbeUsage.UseProxyVolume && lightProbeProxyVolume == null)
            {
                throw new ArgumentException("Argument lightProbeProxyVolume must not be null if lightProbeUsage is set to UseProxyVolume.", "lightProbeProxyVolume");
            }

            Internal_DrawMeshInstancedIndirect(mesh, submeshIndex, material, bounds, bufferWithArgs, argsOffset, properties, castShadows, receiveShadows, layer, camera, lightProbeUsage, lightProbeProxyVolume);
        }
Ejemplo n.º 14
0
        public static void DrawMeshInstanced(Mesh mesh, int submeshIndex, Material material, List <Matrix4x4> matrices, [uei.DefaultValue("null")] MaterialPropertyBlock properties, [uei.DefaultValue("ShadowCastingMode.On")] ShadowCastingMode castShadows, [uei.DefaultValue("true")] bool receiveShadows, [uei.DefaultValue("0")] int layer, [uei.DefaultValue("null")] Camera camera, [uei.DefaultValue("LightProbeUsage.BlendProbes")] LightProbeUsage lightProbeUsage, [uei.DefaultValue("null")] LightProbeProxyVolume lightProbeProxyVolume)
        {
            if (matrices == null)
            {
                throw new ArgumentNullException("matrices");
            }

            DrawMeshInstanced(mesh, submeshIndex, material, NoAllocHelpers.ExtractArrayFromListT(matrices), matrices.Count, properties, castShadows, receiveShadows, layer, camera, lightProbeUsage, lightProbeProxyVolume);
        }
Ejemplo n.º 15
0
        public static void DrawMeshInstanced(Mesh mesh, int submeshIndex, Material material, Matrix4x4[] matrices, [uei.DefaultValue("matrices.Length")] int count, [uei.DefaultValue("null")] MaterialPropertyBlock properties, [uei.DefaultValue("ShadowCastingMode.On")] ShadowCastingMode castShadows, [uei.DefaultValue("true")] bool receiveShadows, [uei.DefaultValue("0")] int layer, [uei.DefaultValue("null")] Camera camera, [uei.DefaultValue("LightProbeUsage.BlendProbes")] LightProbeUsage lightProbeUsage, [uei.DefaultValue("null")] LightProbeProxyVolume lightProbeProxyVolume)
        {
            if (!SystemInfo.supportsInstancing)
            {
                throw new InvalidOperationException("Instancing is not supported.");
            }
            else if (mesh == null)
            {
                throw new ArgumentNullException("mesh");
            }
            else if (submeshIndex < 0 || submeshIndex >= mesh.subMeshCount)
            {
                throw new ArgumentOutOfRangeException("submeshIndex", "submeshIndex out of range.");
            }
            else if (material == null)
            {
                throw new ArgumentNullException("material");
            }
            else if (!material.enableInstancing)
            {
                throw new InvalidOperationException("Material needs to enable instancing for use with DrawMeshInstanced.");
            }
            else if (matrices == null)
            {
                throw new ArgumentNullException("matrices");
            }
            else if (count < 0 || count > Mathf.Min(kMaxDrawMeshInstanceCount, matrices.Length))
            {
                throw new ArgumentOutOfRangeException("count", String.Format("Count must be in the range of 0 to {0}.", Mathf.Min(kMaxDrawMeshInstanceCount, matrices.Length)));
            }
            else if (lightProbeUsage == LightProbeUsage.UseProxyVolume && lightProbeProxyVolume == null)
            {
                throw new ArgumentException("Argument lightProbeProxyVolume must not be null if lightProbeUsage is set to UseProxyVolume.", "lightProbeProxyVolume");
            }

            if (count > 0)
            {
                Internal_DrawMeshInstanced(mesh, submeshIndex, material, matrices, count, properties, castShadows, receiveShadows, layer, camera, lightProbeUsage, lightProbeProxyVolume);
            }
        }
Ejemplo n.º 16
0
 public static void DrawMesh(Mesh mesh, Matrix4x4 matrix, Material material, int layer, Camera camera, int submeshIndex, MaterialPropertyBlock properties, ShadowCastingMode castShadows, bool receiveShadows, Transform probeAnchor, LightProbeUsage lightProbeUsage, [uei.DefaultValue("null")] LightProbeProxyVolume lightProbeProxyVolume)
 {
     if (lightProbeUsage == LightProbeUsage.UseProxyVolume && lightProbeProxyVolume == null)
     {
         throw new ArgumentException("Argument lightProbeProxyVolume must not be null if lightProbeUsage is set to UseProxyVolume.", "lightProbeProxyVolume");
     }
     Internal_DrawMesh(mesh, submeshIndex, matrix, material, layer, camera, properties, castShadows, receiveShadows, probeAnchor, lightProbeUsage, lightProbeProxyVolume);
 }
Ejemplo n.º 17
0
        public static void DrawMeshInstancedProcedural(Mesh mesh, int submeshIndex, Material material, Bounds bounds, int count, MaterialPropertyBlock properties = null, ShadowCastingMode castShadows = ShadowCastingMode.On, bool receiveShadows = true, int layer = 0, Camera camera = null, LightProbeUsage lightProbeUsage = LightProbeUsage.BlendProbes, LightProbeProxyVolume lightProbeProxyVolume = null)
        {
            if (!SystemInfo.supportsInstancing)
            {
                throw new InvalidOperationException("Instancing is not supported.");
            }
            else if (mesh == null)
            {
                throw new ArgumentNullException("mesh");
            }
            else if (submeshIndex < 0 || submeshIndex >= mesh.subMeshCount)
            {
                throw new ArgumentOutOfRangeException("submeshIndex", "submeshIndex out of range.");
            }
            else if (material == null)
            {
                throw new ArgumentNullException("material");
            }
            else if (count <= 0)
            {
                throw new ArgumentOutOfRangeException("count");
            }
            else if (lightProbeUsage == LightProbeUsage.UseProxyVolume && lightProbeProxyVolume == null)
            {
                throw new ArgumentException("Argument lightProbeProxyVolume must not be null if lightProbeUsage is set to UseProxyVolume.", "lightProbeProxyVolume");
            }

            if (count > 0)
            {
                Internal_DrawMeshInstancedProcedural(mesh, submeshIndex, material, bounds, count, properties, castShadows, receiveShadows, layer, camera, lightProbeUsage, lightProbeProxyVolume);
            }
        }
Ejemplo n.º 18
0
 /// <summary>
 /// Read the data using the reader.
 /// </summary>
 /// <param name="reader">Reader.</param>
 public override object Read(ISaveGameReader reader)
 {
     UnityEngine.LightProbeProxyVolume lightProbeProxyVolume = SaveGameType.CreateComponent <UnityEngine.LightProbeProxyVolume> ();
     ReadInto(lightProbeProxyVolume, reader);
     return(lightProbeProxyVolume);
 }
Ejemplo n.º 19
0
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.LightProbeProxyVolume lightProbeProxyVolume = (UnityEngine.LightProbeProxyVolume)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "sizeCustom":
                    lightProbeProxyVolume.sizeCustom = reader.ReadProperty <UnityEngine.Vector3> ();
                    break;

                case "originCustom":
                    lightProbeProxyVolume.originCustom = reader.ReadProperty <UnityEngine.Vector3> ();
                    break;

                case "boundingBoxMode":
                    lightProbeProxyVolume.boundingBoxMode = reader.ReadProperty <UnityEngine.LightProbeProxyVolume.BoundingBoxMode> ();
                    break;

                case "resolutionMode":
                    lightProbeProxyVolume.resolutionMode = reader.ReadProperty <UnityEngine.LightProbeProxyVolume.ResolutionMode> ();
                    break;

                case "probePositionMode":
                    lightProbeProxyVolume.probePositionMode = reader.ReadProperty <UnityEngine.LightProbeProxyVolume.ProbePositionMode> ();
                    break;

                case "refreshMode":
                    lightProbeProxyVolume.refreshMode = reader.ReadProperty <UnityEngine.LightProbeProxyVolume.RefreshMode> ();
                    break;

                case "probeDensity":
                    lightProbeProxyVolume.probeDensity = reader.ReadProperty <System.Single> ();
                    break;

                case "gridResolutionX":
                    lightProbeProxyVolume.gridResolutionX = reader.ReadProperty <System.Int32> ();
                    break;

                case "gridResolutionY":
                    lightProbeProxyVolume.gridResolutionY = reader.ReadProperty <System.Int32> ();
                    break;

                case "gridResolutionZ":
                    lightProbeProxyVolume.gridResolutionZ = reader.ReadProperty <System.Int32> ();
                    break;

                case "enabled":
                    lightProbeProxyVolume.enabled = reader.ReadProperty <System.Boolean> ();
                    break;

                case "tag":
                    lightProbeProxyVolume.tag = reader.ReadProperty <System.String> ();
                    break;

                case "name":
                    lightProbeProxyVolume.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    lightProbeProxyVolume.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
Ejemplo n.º 20
0
 extern private static void Internal_DrawMeshInstanced(Mesh mesh, int submeshIndex, Material material, Matrix4x4[] matrices, int count, MaterialPropertyBlock properties, ShadowCastingMode castShadows, bool receiveShadows, int layer, Camera camera, LightProbeUsage lightProbeUsage, LightProbeProxyVolume lightProbeProxyVolume);
 private static void RenderBoxGizmo(LightProbeProxyVolume probeProxyVolume, GizmoType gizmoType)
 {
     if ((s_LastInteractedEditor != null) && (s_LastInteractedEditor.sceneViewEditing && (EditMode.editMode == EditMode.SceneViewEditMode.LightProbeProxyVolumeBox)))
     {
         Color color = Gizmos.color;
         Gizmos.color = kGizmoLightProbeProxyVolumeColor;
         Vector3 originCustom = probeProxyVolume.originCustom;
         Matrix4x4 matrix = Gizmos.matrix;
         Gizmos.matrix = probeProxyVolume.transform.localToWorldMatrix;
         Gizmos.DrawCube(originCustom, (Vector3) (-1f * probeProxyVolume.sizeCustom));
         Gizmos.matrix = matrix;
         Gizmos.color = color;
     }
 }
Ejemplo n.º 22
0
 extern private static void Internal_DrawMeshInstancedIndirect(Mesh mesh, int submeshIndex, Material material, Bounds bounds, ComputeBuffer bufferWithArgs, int argsOffset, MaterialPropertyBlock properties, ShadowCastingMode castShadows, bool receiveShadows, int layer, Camera camera, LightProbeUsage lightProbeUsage, LightProbeProxyVolume lightProbeProxyVolume);
Ejemplo n.º 23
0
        }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  // 0x000000018096BCD0-0x000000018096BDF0

        public static void DrawMesh(Mesh mesh, Matrix4x4 matrix, Material material, int layer, Camera camera, int submeshIndex, MaterialPropertyBlock properties, ShadowCastingMode castShadows, bool receiveShadows, Transform probeAnchor, LightProbeUsage lightProbeUsage, [DefaultValue] /* 0x00000001800F6CB0-0x00000001800F6CE0 */ LightProbeProxyVolume lightProbeProxyVolume)
        {
        }                                                                                                                                                                                                                                                                                                                                                                                        // 0x000000018096C380-0x000000018096C570