Skip to content

OpenGL: Clearcoat has no effect if BaseMaterial3D roughness is exactly 0 #83223

@Calinou

Description

@Calinou

Godot version

4.2.beta1

System information

Fedora 38, GeForce RTX 4090 (NVIDIA 535.104.05)

Issue description

When using the Compatibility rendering method, Clearcoat has no effect if BaseMaterial3D roughness is exactly 0:

Screenshot_20231013_012642 webp

However, it works if roughness is set to 0.01 or 1.0:

Roughness 0.01 Roughness 1.0
Screenshot_20231013_012628 webp Screenshot_20231013_012638 webp

This issue only occurs in Compatibility, not Forward+ or Mobile. I noticed it while working on a solution for #69327.

Steps to reproduce

  • Add a MeshInstance3D and DirectionalLight3D (so that clearcoat can be seen).
  • Assign a BaseMaterial3D to the MeshInstance3D, with Roughness set to exactly 0.0 and enable Clearcoat.

Minimal reproduction project

Clearcoat_Test_2.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions