Hello,
I have been trying to put a texture on a merged element (using three-bvh-csg ADDITION) and for some reason, there are two holes on 2 side of my merge object.
You can see the demo and or code here:
I have been using a shader to fill the hole but this time, the hole wont get fill:
…//revelant part
shader.fragmentShader = shader.fragmentShader.replace(
‘#include <output_fragment>’,
`
#ifdef OPAQUE
gl_FragColor = vec4( outgoingLight, opacity );
#else
gl_FragColor = vec4( outgoingLight, diffuseColor.a ); // Use diffuseColor.a for transparency if applicable
#endif
if (!gl_FrontFacing) {
vec3 backfaceColor = vec3( 0.4, 0.4, 0.4 );
gl_FragColor = vec4( backfaceColor, opacity ); // Ensure opacity is used for backface
}
`
);
Can you guys, see the problem?
Thanks.