threepipe
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

SSAAPlugin.md 1.4KB

123456789101112131415161718192021222324252627282930313233
  1. ---
  2. prev:
  3. text: 'ProgressivePlugin'
  4. link: './ProgressivePlugin'
  5. next:
  6. text: 'DepthBufferPlugin'
  7. link: './DepthBufferPlugin'
  8. ---
  9. # SSAAPlugin
  10. [//]: # (todo: image)
  11. [Example](https://threepipe.org/examples/#ssaa-plugin/) —
  12. [Source Code](https://github.com/repalash/threepipe/blob/master/src/plugins/pipeline/SSAAPlugin.ts) —
  13. [API Reference](https://threepipe.org/docs/classes/SSAAPlugin.html)
  14. SSAA Plugin adds support for [Super Sampling Anti-Aliasing](https://en.wikipedia.org/wiki/Supersampling) to the viewer. Simply add the plugin to the viewer to use it.
  15. It jitters the camera view offset over multiple frames, which are then blended by the [ProgressivePlugin](#progressiveplugin) to create a higher quality image. This is useful for reducing aliasing artifacts in the scene.
  16. By default, the pipeline only renders once per request animation frame. So we don't get any anti-aliasing while moving. For that, either use the TAA(Temporal Anti-aliasing) plugin or for the case of simple scenes - render multiple times per frame which can be done by setting `plugin.rendersPerFrame` or `viewer.rendersPerFrame`. Check out the [example](https://threepipe.org/examples/#ssaa-plugin/) to see the effect on frame rate.
  17. ```typescript
  18. const ssaa = viewer.addPluginSync(new SSAAPlugin())
  19. ssaa.enabled = true // toggle jittering(if you want to set custom view offset)
  20. ssaa.rendersPerFrame = 4 // render 4 times per frame (max 32 is useful)
  21. ```