postprocessing icon indicating copy to clipboard operation
postprocessing copied to clipboard

Depth on Chrome-Mac ruined after update.

Open Mateo150 opened this issue 3 years ago • 5 comments

Description of the bug

I was working with v6.26.3 and working perfectly, I update recently to the latest version v6.28.4 and noticed than in Chrome on Mac renders incrrectly. Like its buffering improperly.

To Reproduce

Very simple code.

const renderPass = new RenderPass(scene, camera)

    const fxaaEffect = new FXAAEffect()
    // fxaaEffect.subpixelQuality = 0.1


    const ePass = new EffectPass( 
        camera,
        fxaaEffect,
    )

    composer = new EffectComposer(renderer, {
        frameBufferType: THREE.HalfFloatType
    })
    composer.addPass( renderPass )
    composer.addPass( ePass )

Expected behavior

Render as the previous version.

Screenshots

As it should look. image

How currently looks. image

Library versions used

  • Three: "^0.132.2"
  • Post Processing: "^6.28.4"

Desktop

  • OS: Mac
  • Browser: Chrome
  • Graphics hardware: NA

Mateo150 avatar Aug 16 '22 20:08 Mateo150

This looks like a strange depth buffer issue, but I don't recall any recent changes that could have caused this. Are you sure that this problem does not occur with v6.26.3? Did the installed version of three change during the update?

vanruesc avatar Aug 16 '22 21:08 vanruesc

I've reviewed the changelog and find this.

The first update was this one image After this image Finally, this. image

I'm absolutely sure than with Three v0.133.1 and Post v6.23.1 (initial) it works fine. In one of those updates this issue appears. Why do you think is this happening now?

Mateo150 avatar Aug 18 '22 16:08 Mateo150

  1. Are there any errors or warnings in the console?
  2. Does this problem only occur on Mac?
  3. Are you using a custom mesh material?
  4. Does the issue occur when you only use a RenderPass? If so, does it still occur if you render the scene with renderer.render(scene, camera);?
  5. Why did you downgrade three from r133 to r132? Does the issue occur with [email protected] + [email protected]?
  6. Can you try updating three to r142 (or r143 with pp 6.28.5)?

vanruesc avatar Aug 18 '22 20:08 vanruesc

Hi again! Sorry for the delay, I was testing... and I found than the bug is related to the FXAAEffect. image

Answering.

  1. Any errors.
  2. Yes, only in Mac and only in Chrome, Safari on Mac runs fine.
  3. Nope.

The version doesnt affect the result. As I say before... this is related to FXAA.

Mateo150 avatar Aug 25 '22 18:08 Mateo150

Hey, thanks for investigating. This will be hard to debug because I don't own a Mac.

Please check if this sandbox fails on your Mac: https://codesandbox.io/s/pensive-rain-jogpxy?file=/src/App.js and if it fails, try uncommenting the lines (76, 77, 78). This replaces the FXAA shader with a simple pass-through shader. If that fixes it, try uncommenting line 80 and if it still fails, we'll need to narrow it down further.

vanruesc avatar Aug 25 '22 21:08 vanruesc

The sandbox I posted above works as expected on macOS Monterey with Chrome 106 via browserstack.

I'm closing this issue because I'm unable to reproduce it. Feel free to reopen if you have a working reproduction of the bug that can be tested on a specific system.

vanruesc avatar Oct 17 '22 12:10 vanruesc