Skip to content

Instantly share code, notes, and snippets.

View ektogamat's full-sized avatar
👋

Anderson Mancini ektogamat

👋
View GitHub Profile
@ektogamat
ektogamat / UltimateLensFlare.jsx
Last active November 8, 2023 21:43
Ultimate Lens Flare Source Code
// Created by Anderson Mancini 2023
// React Three Fiber Ultimate LensFlare
// To be used Effect together with react-three/postprocessing
import { Uniform, Color, Vector3 } from 'three'
import { BlendFunction, Effect } from 'postprocessing'
import { wrapEffect } from './util.tsx'
import { useRef, useMemo, useEffect } from 'react'
import { useFrame, useThree } from '@react-three/fiber'
import { useTexture } from '@react-three/drei'
// Created by Anderson Mancini 2023
// React Three Fiber AutoFocus Component to be used
// as an extension for default Depth Of Field from react-three/postprocessing
// HOW TO USE?
// import AutoFocusDOF from './AutoFocusDOF'
//
// And add this component inside the EffectsComposer...
//...
// <EffectComposer>