The <FXAAPass />
component will create a WebGL FXAAPass (using a ShaderPass object), acting as a wrapper for the curtains.js FXAAPass class.
import ReactDOM from 'react-dom';
import React from 'react';
import {FXAAPass} from 'react-curtains';
function BasicFXAAPass() {
return (
<FXAAPass />
);
}
You can refer to both the FXAAPass curtains.js class and ShaderPass component documentations.
Most of the time tho, you'll just add the <FXAAPass />
component without any props and let it automatically add anti-aliasing to your scene.
Each time the <FXAAPass />
component will unmount, the corresponding WebGL shaderpass and its associated render target element will be automatically disposed.