Here is how I configure the ShaderMaterial
const showSTMaterialConfig =
{
uniforms: {},
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
flat shading.
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.