question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OutlinePass v0.144.0 not working

See original GitHub issue

OutlinePass throws an error

I’ve been pulling my hair out trying to figure out why OutlinePass was not working. Downgrading from 0.144.0 to 0.143.0 seems to fix it.

I followed the example in examples/webgl_postprocessing_outline.html exactly but it would not work. I kept getting this error:

three.module.js:18762 THREE.WebGLProgram: Shader Error 0 - VALIDATE_STATUS false

Program Info Log: Vertex shader is not compiled.
�
VERTEX

ERROR: 0:156: 'worldPosition' : undeclared identifier
ERROR: 0:156: '=' : dimension mismatch
ERROR: 0:156: 'assign' : cannot convert from 'highp 4X4 matrix of float' to 'out highp 4-component vector of float'
�

  151: 	#endif
  152: 	worldPosition = modelMatrix * worldPosition;
  153: #endif
  154: 
  155: 					vPosition = mvPosition;
> 156: 					projTexCoord = textureMatrix * worldPosition;
  157: 
  158: 				}

To Reproduce

Steps to reproduce the behavior:

  1. npm install three
  2. follow outline example from github.com/mrdoob/three.js/blob/dev/examples/webgl_postprocessing_outline.html
  3. OutlinePass shouldn’t work and the aforementioned error should be in console.

Code

github.com/mrdoob/three.js/blob/dev/examples/webgl_postprocessing_outline.html

Screenshots

Screen Shot 2022-09-08 at 7 17 11 AM

Platform:

  • Device: [Desktop]
  • OS: [MacOS]
  • Browser: [Chrome]
  • Three.js version: [dev, r0.144.0]

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
isimonsmcommented, Sep 12, 2022

@jedhelmers Yes, it still casts a shadow, unfortunately. Though I assume that the directional light casting a shadow is the reason it fixes the issue in the first place. Thanks for the suggestion though!

1reaction
zhouchengshicommented, Sep 9, 2022

The following code must be added to work properly:

    renderer.shadowMap.enabled = true;
    const light = new THREE.DirectionalLight( 0xddffdd, 0.6 );
    light.castShadow = true;
    scene.add(light);
Read more comments on GitHub >

github_iconTop Results From Across the Web

OutlinePass doesn't work with renderToScreen #10144 - GitHub
Description of the problem OutlinePass doesn't work when setting renderToScreen to true. Instead of rendering the outlines, ...
Read more >
Three.js: Not able to combine background pass with outline pass
I want to render a mesh into a background scene so I can customize the background with more powerful shaders (gradient, special effects,...
Read more >
three-outlinepass - npm
Start using three-outlinepass in your project by running `npm i ... There are 6 other projects in the npm registry using three-outlinepass.
Read more >
ThreeJS OutlinePass error on Vertex shader not compiled
Trying to replicate ThreeJS outline postprocessing example, but I'm facing an error on some uncompiled Vertex shader.
Read more >
OutlinePass does not show correctly - Questions - three.js forum
Dear All, This is my code below, but the outline didn't show correctly~~~~ The outline only show if the no overlapping part between...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found