threepipe
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

SSAAPlugin.md 1.4KB

před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
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 antialiasing 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. ```