I get the following warning in the browser console
THREE.WebGLProgram: Program Info Log: WARNING: Output of vertex shader 'worldStart' not read by fragment shader
WARNING: Output of vertex shader 'webgl_c1d305a95b2ffdd9' not read by fragment shader
WARNING: Output of vertex shader 'webgl_574c5c41cd2da6c7' not read by fragment shader
It seems to come from using /examples/jsm/lines/LineMaterial.js
with three/examples/jsm/lines/LineSegments2.js
here:
const material = new LineMaterial({
vertexColors: true,
toneMapped: false,
linewidth: lineWidth,
transparent: true,
});
material.resolution.set(width, height);
super(geometry, material);
and here:
const lineMaterial = new LineMaterial({
linewidth: lineWidth,
transparent: true,
depthWrite: !this.transparent,
depthTest: !this.transparent,
clipIntersection: false
});
if (Array.isArray(color)) {
var colors = color
.map((c) => [
new THREE.Color(c).toArray(),
new THREE.Color(c).toArray()
])
.flat()
.flat();
lineGeometry.setColors(colors);
lineMaterial.vertexColors = "VertexColors";
} else {
lineMaterial.color = new THREE.Color(
This file has been truncated. show original
The warning can be “reproduced” with CadQuery Viewer
Can this be ignored or does anybody have a hint how to get rid of it?
Thanks!
1 Like
Can you please try to reproduce the warning with the official wide lines demo? three.js webgl - lines - fat
No need to reproduce, it happens without changes in the demo:
I use the latest version of Chrome on a Mac
I can reproduce. Let me file a PR to fix the warning.
mrdoob:dev
← Mugen87:dev17
opened 09:08AM - 25 Oct 21 UTC
Related issue: https://discourse.threejs.org/t/warning-output-of-vertex-shader-w… orldstart-not-read-by-fragment-shader/31125
**Description**
Depending on how `LineMaterial` is configured, the following warnings can occur:
> THREE.WebGLProgram: Program Info Log: WARNING: Output of vertex shader 'worldStart' not read by fragment shader
> THREE.WebGLProgram: Program Info Log: WARNING: Output of vertex shader 'vUv' not read by fragment shader
The PR fixes these warnings by introducing some `#ifdef` statements so varying are only defined if they are actually required.
2 Likes