deathcap / voxel-texture-shader

custom shader for texturing voxels in voxeljs (for three.js-based voxel-engine, no longer needed with voxel-engine-stackgl)
MIT License
8 stars 1 forks source link

three.js r66 gl.getProgramInfoLog() WARNING: Could not find vertex shader attribute 'position' to match BindAttributeLocation request. #10

Open deathcap opened 10 years ago

deathcap commented 10 years ago

Works with three.js 0.58.10, but updating to 0.66.2 logs this error:

gl.getProgramInfoLog() WARNING: Could not find vertex shader attribute 'position' to match BindAttributeLocation request.

but it is only a warning, and the textures render as usual. Debugging confirms this warning is coming from the voxel-texture-shader program, which is built up from THREE.ShaderChunks for lighting.

possibly relevant: https://github.com/mrdoob/three.js/commit/b7950e02a39e8565fa95c6e186dbbe87c16cf21c WebGLRenderer: Giving ‘position’ attribute index 0 by default.

deathcap commented 10 years ago

Known three.js issue (see https://github.com/mrdoob/three.js/issues/4364), fortunately just a warning. Tried to workaround it by defining 'attribute vec3 position;' in my vertex shader (fails: redefinition of 'position'), a dummy attribute, index0AttributeName: undefined (defaults to 'position'), '', 'ignore', attributes: { ignore: { type: "f", value: [] } }, fails to find attribute. Ignoring this warning for now.