Skip to content

Depth: depth test is wrong when enable logarithmic depth #30203

@Lafeu-p

Description

@Lafeu-p

Description

When I set depthTest = true and depthWrite = false, depth testing still works as expected.
When I use WebGLRenderer or WebGPURenderer (without enabling logarithmic depth), everything works fine. However, the issue arises after I enable logarithmic depth.
The image below is the expected result.
image
wrong depth
image
The green sphere in the foreground should be occluded by the red sphere below it.

This issue has affected many visual effects in my scene, and I sincerely hope it can be resolved.

Reproduction steps

emoty

Code

// code goes here

Live example

jsfiddle example

Screenshots

No response

Version

171

Device

Desktop

Browser

Chrome

OS

MacOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions