I recently encountered an issue with one of my components after updating Three.js from version 0.148. The component works as expected in version 0.148, but after updating to the latest version, I noticed a bug.
import { Effects } from "@react-three/drei";
import { extend, Object3DNode } from "@react-three/fiber";
import { UnrealBloomPass } from "three-stdlib";
extend({ UnrealBloomPass });
declare global {
namespace JSX {
interface IntrinsicElements {
unrealBloomPass: Object3DNode<UnrealBloomPass, typeof UnrealBloomPass>;
}
}
}
const PostProgress: React.FC = () => {
return (
<Effects disableGamma>
<unrealBloomPass threshold={1} strength={5} radius={1} />
</Effects>
);
};
export default PostProgress;
Error in console:
FRAGMENT
ERROR: 0:160: 'vUv' : undeclared identifier
ERROR: 0:160: 'texture' : no matching overloaded function found
ERROR: 0:160: 'rgb' : field selection requires structure, vector, or interface block on left hand side
ERROR: 0:160: '=' : dimension mismatch
ERROR: 0:160: '=' : cannot convert from 'highp float' to 'highp 3-component vector of float'
ERROR: 0:160: 'vUv' : undeclared identifier
ERROR: 0:160: 'vUv' : undeclared identifier
155: return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
156: } // validatedvarying vec2 vUv;
157: uniform sampler2D colorTexture;
158: uniform vec2 texSize;uniform vec2 direction;
//...many many glsl
Now, I keep using version 0.148 and everything goes OK
I would appreciate any suggestions, workarounds, or insights into what might be causing this issue. Thank you in advance for your help!