mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-16 14:23:02 +00:00
Disable lights for objects with baked lighting
Don't apply lighting to objects when they have a lightmap texture and the light is set to BAKE_ALL. This prevents applying the same direct light twice on the same object and makes setting up scenes with mixed lighting much easier.
This commit is contained in:
@@ -2152,6 +2152,17 @@
|
||||
Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [member OmniLight.omni_shadow_mode].
|
||||
</description>
|
||||
</method>
|
||||
<method name="light_set_bake_mode">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="light" type="RID">
|
||||
</argument>
|
||||
<argument index="1" name="bake_mode" type="int" enum="VisualServer.LightBakeMode">
|
||||
</argument>
|
||||
<description>
|
||||
Sets the bake mode for this light, see [enum LightBakeMode] for options. The bake mode affects how the light will be baked in [BakedLightmap]s and [GIProbe]s.
|
||||
</description>
|
||||
</method>
|
||||
<method name="light_set_color">
|
||||
<return type="void">
|
||||
</return>
|
||||
@@ -2250,7 +2261,7 @@
|
||||
<argument index="1" name="enabled" type="bool">
|
||||
</argument>
|
||||
<description>
|
||||
Sets whether GI probes capture light information from this light.
|
||||
Sets whether GI probes capture light information from this light. [i]Deprecated method.[/i] Use [method light_set_bake_mode] instead. This method is only kept for compatibility reasons and calls [method light_set_bake_mode] internally, setting the bake mode to [constant LIGHT_BAKE_DISABLED] or [constant LIGHT_BAKE_INDIRECT] depending on the given parameter.
|
||||
</description>
|
||||
</method>
|
||||
<method name="lightmap_capture_create">
|
||||
@@ -4517,6 +4528,12 @@
|
||||
<constant name="LIGHT_PARAM_MAX" value="15" enum="LightParam">
|
||||
Represents the size of the [enum LightParam] enum.
|
||||
</constant>
|
||||
<constant name="LIGHT_BAKE_DISABLED" value="0" enum="LightBakeMode">
|
||||
</constant>
|
||||
<constant name="LIGHT_BAKE_INDIRECT" value="1" enum="LightBakeMode">
|
||||
</constant>
|
||||
<constant name="LIGHT_BAKE_ALL" value="2" enum="LightBakeMode">
|
||||
</constant>
|
||||
<constant name="LIGHT_OMNI_SHADOW_DUAL_PARABOLOID" value="0" enum="LightOmniShadowMode">
|
||||
Use a dual paraboloid shadow map for omni lights.
|
||||
</constant>
|
||||
|
||||
Reference in New Issue
Block a user