Skip to content

Ambient Occlusion (N8AO) not working on React Native #339

@yannis-winzana

Description

@yannis-winzana

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.

Environment :
"@react-three/postprocessing": "^2.19.1"
"react": "18.2.0",
"react-native": "0.74.5",
"@react-three/fiber": "^8.18.0"
"expo": "^51.0.0",
"expo-gl": "~14.0.2",
"three": "^0.168.0"
Platform: iOS
Device: iPad 3

Example code :

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.

Thanking you in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions