You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ambient Occlusion (N8AO) not working on React Native #339
Hello, I have a problem using N8AO in my React Native project.
Describe the bug :
The N8AO ambient occlusion effect is not functioning properly when using react-postprocessing in a React Native environment. The effect appears to rendering incorrectly and completly freezing the canvas.
import { EffectComposer, N8AO, ToneMapping } from "@react-three/postprocessing";
<EffectComposer>
<N8AO />
</EffectComposer>
Expected behavior :
The N8AO effect should render ambient occlusion shadows properly, enhancing the depth perception of 3D objects in the scene.
Additional Information
I have tested this on web and it's working fine.
I tried to test this with all most recent versions in a new projet and it's not working too but this time because of an error message throwed. Error: Exception in HostFunction: EXGL: renderbufferStorageMultisample() isn't implemented yet!, js engine: hermes
I've tried using SSAO and GTAO too, but they don't work either.
Steps to Reproduce :
Create a React Native project with @react-three/fiber
Install react-postprocessing
Add N8AO effect to EffectComposer
Observe that ambient occlusion is not visible
Would appreciate any guidance or workarounds for implementing ambient occlusion in React Native environments.
Old thread, but it's still open and worth closing out properly: this isn't a bug in N8AO (or SSAO/GTAO) - it's EffectComposer's default multisampling setting.
EffectComposer defaults to multisampling={8}. On WebGL2 that means creating a multisampled render target, which requires gl.renderbufferStorageMultisample. expo-gl reports as a WebGL2 context but doesn't actually implement that method - so instead of silently not multisampling, it throws, and the exception takes the whole app down. Nothing specific to N8AO is involved; any effect running through the composer's default pipeline hits the same crash, which is why SSAO/GTAO break for you too.
Confirmed with a repro: N8AO on Android emulator, same expo-gl/RN stack as this issue. multisampling={8} → crash on first frame. multisampling={0} → renders fine, AO visible at contact points, every time.
Also tested with other effects - same result.
Activity
yannis-winzana commentedon Sep 18, 2025
any idea on this ?
cubevis commentedon Jan 1, 2026
Same issue
kvvasuu commentedon Jul 30, 2026
Old thread, but it's still open and worth closing out properly: this isn't a bug in
N8AO(or SSAO/GTAO) - it'sEffectComposer's default multisampling setting.EffectComposerdefaults tomultisampling={8}. On WebGL2 that means creating a multisampled render target, which requiresgl.renderbufferStorageMultisample.expo-glreports as a WebGL2 context but doesn't actually implement that method - so instead of silently not multisampling, it throws, and the exception takes the whole app down. Nothing specific to N8AO is involved; any effect running through the composer's default pipeline hits the same crash, which is why SSAO/GTAO break for you too.Fix: set
multisampling={0}on the composer.Confirmed with a repro: N8AO on Android emulator, same expo-gl/RN stack as this issue.
multisampling={8}→ crash on first frame.multisampling={0}→ renders fine, AO visible at contact points, every time.Also tested with other effects - same result.