3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

three.js(r104)でシェーダーエラーのログが出ない!!

Posted at

概要

three.js(r104)からTHREE.WebGLRenderer.debug.checkShaderErrorsというプロパティが追加され、デフォルトがfalseに設定されているためシェーダーのコンパイルエラーのログが出なくなりました。

変なシェーダー書いてもWebGLからのwarningしか出ません。
image.png

エラーが見たい!

THREE.WebGLRenderer.debug.checkShaderErrorstrueにするだけです。

let renderer = new THREE.WebGLRenderer({
    canvas: document.getElementById('canvas')
});

this.renderer.debug.checkShaderErrors = true;

image.png

でました。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?