Skip to content

Conversation

@wyc001122
Copy link
Contributor

Description

This PR fixes a rendering issue where black squares appear at the world center when using Line2 objects with GTAOPass.

Problem:
When Line2 objects are present in a scene that uses GTAOPass for ambient occlusion, black artifacts (squares) appear at the world center during rendering.

Root Cause:
The GTAOPass's _overrideVisibility() method was not excluding Line2 objects from AO calculation. While Points and Line objects were already properly excluded, Line2 objects were inadvertently included in the ambient occlusion rendering pass, causing rendering artifacts.

Solution:
Added || object.isLine2 condition to the visibility override check in GTAOPass._overrideVisibility(). This ensures Line2 objects are treated consistently with other line-based objects (Points and Line) and are excluded from AO calculations.

Changes:

  • Modified examples/jsm/postprocessing/GTAOPass.js line 660 to include Line2 objects in the visibility override condition
  • Line2 objects now follow the same rendering behavior as Points and Line objects in GTAO passes

@Mugen87 Mugen87 merged commit f2e958a into mrdoob:dev Jul 15, 2025
8 checks passed
@Mugen87 Mugen87 added this to the r179 milestone Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants