
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
@react-three/postprocessing
Advanced tools
postprocessing wrapper for React and @react-three/fiber
react-postprocessing
is a
postprocessing wrapper for
@react-three/fiber. This is not
(yet) meant for complex orchestration of effects, but can save you
hundreds of LOC for a
straight forward effects-chain.
npm install @react-three/postprocessing
These demos are real, you can click them! They contain the full code, too. 📦
From https://github.com/pmndrs/postprocessing
This library provides an EffectPass which automatically organizes and merges any given combination of effects. This minimizes the amount of render operations and makes it possible to combine many effects without the performance penalties of traditional pass chaining. Additionally, every effect can choose its own blend function.
All fullscreen render operations also use a single triangle that fills the screen. Compared to using a quad, this approach harmonizes with modern GPU rasterization patterns and eliminates unnecessary fragment calculations along the screen diagonal. This is especially beneficial for GPGPU passes and effects that use complex fragment shaders.
Postprocessing also supports gamma correction out of the box, as well as WebGL2 MSAA (multi sample anti aliasing), which is react-postprocessing's default, you get high performance crisp results w/o jagged edges.
Here's an example combining a couple of effects (live demo).
import React from 'react'
import { Bloom, DepthOfField, EffectComposer, Noise, Vignette } from '@react-three/postprocessing'
import { Canvas } from '@react-three/fiber'
function App() {
return (
<Canvas>
{/* Your regular scene contents go here, like always ... */}
<EffectComposer>
<DepthOfField focusDistance={0} focalLength={0.02} bokehScale={2} height={480} />
<Bloom luminanceThreshold={0} luminanceSmoothing={0.9} height={300} />
<Noise opacity={0.02} />
<Vignette eskil={false} offset={0.1} darkness={1.1} />
</EffectComposer>
</Canvas>
)
}
FAQs
postprocessing wrapper for React and @react-three/fiber
The npm package @react-three/postprocessing receives a total of 0 weekly downloads. As such, @react-three/postprocessing popularity was classified as not popular.
We found that @react-three/postprocessing demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.