Skip to content

resource_local_to_scene causes emission materials to break visuals of MeshInstance3D half the time #83190

Closed
@Wierdox

Description

@Wierdox

Godot version

v4.0.2.stable.official [7a0977c] v4.1.2.stable.official [399c9dc] v4.2.dev6.official [57a6813]

System information

Godot v4.1.2.stable - Windows 10.0.19044 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1660 SUPER (NVIDIA; 31.0.15.3640) - AMD Ryzen 5 5600G with Radeon Graphics (12 Threads)

Issue description

Found issue when animating emission materials, primarily tested with StandardMaterial3D and primitive meshes. ORMMaterial3D seems to be similar if not the same, ShaderMaterial doesn't seem to cause the issue. Issue occurs in all 3 renderers.

Every case so far that I know causes the problem(all have emission enabled, referring to a MeshInstance3D):

  • mesh and material is resource_local_to_scene
  • material_override is resource_local_to_scene
  • material is made unique via code material = material.duplicate()

Effects of issue

  • It's pure white if emission_energy_multiplier is set to 1 or greater.
  • emission_energy_multiplier values near 1 approach a white infused version of the emission color, below that its brightness fades, leading to no effect at 0.
Godot_v4.1.2-stable_win64_9S2gmCHcyt.webm

Steps to reproduce

Download repro, start main.tscn to see the problem, and it will animate emission_energy_multiplier to 0 to show what it looks like compared to normal behavior. Output contains some info.

Minimal reproduction project

bug_reproduction.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions