question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SSAARenderPass affects color and contrast when increasing the sampleLevel

See original GitHub issue

Describe the bug

SSAARenderPass will affect color on dark materials. I suppose it should only do antialiasing. Using the gammaCorrection as well, increases the effect drastically. The problem seems to be the sampleLevel property. When set to 1, it is not noticable, but when increasing the value, pretty fast contrast increases as well

To Reproduce https://jsfiddle.net/em3crz91/2/

  SSAA = new THREE.SSAARenderPass(scene, camera, 0x000000, 0);
  SSAA.sampleLevel = 4;

Expected behavior

Should not affect any color or material. Its for antialiasing only

  • Device: Desktop
  • OS: Windows, MacOS
  • Browser: Chrome, Firefox, Safari
  • Three.js version: r122

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
Mugen87commented, Nov 23, 2020

This precision related issue is caused by render target’s default texture type . You can mitigate it by strictly using THREE.FloatType. Check out the difference here:

https://jsfiddle.net/wh9kojde/

This issue was also discussed at the forum: https://discourse.threejs.org/t/effect-composer-gamma-output-difference/12039

1reaction
gianosedutocommented, May 12, 2022

This precision related issue is caused by render target’s default texture type . You can mitigate it by strictly using THREE.FloatType. Check out the difference here:

https://jsfiddle.net/wh9kojde/

This issue was also discussed at the forum: https://discourse.threejs.org/t/effect-composer-gamma-output-difference/12039

The solution in the fiddle present the same problem I am experiencing right now with SSAARenderPass: it makes all the scene white if active, even with low sample value. I don’t understand why and how to fix it, the example seems to be working, am I missing something?

I redefined a renderTarget with type: FloatType but nothing changed.

Edit: this problem appears only from version r139. In r138 SSAARenderPass works fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSAARenderPass makes my scene all white (after r138)
The problem I have is the same reported here: SSAARenderPass affects color and contrast when increasing the sampleLevel · Issue #20681 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found