pmndrs / drei-vanilla

🍦 drei-inspired helpers for threejs
https://pmndrs.github.io/drei-vanilla/
MIT License
470 stars 18 forks source link

Shader code compilation issue on android browsers only #71

Closed Abuzar-Thanvi closed 2 months ago

Abuzar-Thanvi commented 2 months ago

Problem description:

THIS OCCURS ONLY ON ANDROID BROWSERS

Note: This issue can be reproduced on : https://vis-prime.github.io/explore-vanilla-drei/?scene=Cloud

The shader code for clouds class (drei-vanilla/src/core/Cloud.ts) is causing an error due to a conflict in names for shader attributes in the CloudMaterialMaker function

Below is the complete error message

_three.module.js:20131 THREE.WebGLProgram: Shader Error 0 - VALIDATE_STATUS false

Material Name: Material Type: MeshLambertMaterial

Program Info Log: Name conflicts between an uniform and an attribute: opacity_

Suggested solution:

Just rename the repeated attribute and all its used instances and it'll be fixed

vis-prime commented 2 months ago

Confirmed

Screenshot 2024-08-28 235938

Happens on the react version too https://drei.pmnd.rs/?path=/story/staging-cloud--cloud-st