Here is how I configure the ShaderMaterial
const showSTMaterialConfig =
vertexShader: document.getElementById( ‘show_st_vert’ ).textContent,
fragmentShader: document.getElementById( ‘show_st_frag’ ).textContent,
showSTMaterial = new THREE.ShaderMaterial(showSTMaterialConfig);
Below is a frame. The spheres use the showST shader and the grey cylinders are use standard
When I rotate/zoom/pan the rendering is VERY choppy. With lots of z-buffer chatter as it can’t
seem to figure out depth values. When I use ShaderMaterial without any parameters it renders
fine with the default red color.
Can someone help me understand what is going on here? Thanks.
Here is video of the noticable “z fighting”. Ugh. Ugly.
Again, just to be clear. All I am doing is drawing the s-t (u-v) values. I have not set any uniforms. This is a super simple shader. If I remove any configuration to the ShaderMaterial. It looks fine. No z fighting.