first commit

This commit is contained in:
nemutas
2022-05-17 19:30:09 +09:00
commit d4c857b88e
32 changed files with 5315 additions and 0 deletions
@@ -0,0 +1,20 @@
import { FXAAShader } from 'three-stdlib';
import { Size } from '@react-three/fiber';
import { BaseShader } from './Base';
export class FXAA extends BaseShader {
constructor() {
super(FXAAShader)
}
protected _initController = () => {}
update = (size: Size) => {
// validate pass
const pass = this.validatedPass()
if (!pass) return
// update uniforms
pass.uniforms.resolution.value.set(1 / size.width, 1 / size.height)
}
}