Hi.
I have a very strange problem with WebGLRenderer.
I am using WebGLRenderer with WEBGL2 context, because I am using UNIFORMBLOCKS. I found a version that included this feature added by @Mugen87, I am not sure if the issue can be related to this.
The version of threejs I am using is here:
https://yume.human-interactive.org/examples/ubo/three.js
I am using Instancing and Uniform Block in order to use WEBGL2 advantages.
Unfortunatelly, I have not found this feature in the latest version of three.js (GITHUB)
I have 2 problems:
One is related to model visualization
Here 2 screnshots showing the problem when I rotate the camera with OrbitControls:
In the following picture yo can see the problem:
You can see that the geometry there is a geometry that shouldn’t be shown because is behind the object shown in the first picture.
The second problem is related to the Axis Scene I am showing at the left top corner. With the official THREE.JS version I was able to put this Scene fully transparent just by setting alplha:true in the WebGLRenderer initialization, but with this version it seems it has a problem related with the UniformBlocks modification.
When I set alpha to true, I get this error:
WebGL: INVALID_ENUM: getParameter: invalid parameter name
The error is related to one of the new functions in this version of three.js:
function WebGLUniformBlocks( gl, info ) {
var buffers = {};
var updateList = {};
var allocatedBindingPoints = [];
**var maxBindingPoints = gl.getParameter( 35375 ); // binding points are global whereas block indices are per shader program**
function bind( uniformBlock, program ) {
// bind shader specific block index to global block point
var blockIndex = gl.getUniformBlockIndex( program, uniformBlock.name );
gl.uniformBlockBinding( program, blockIndex, uniformBlock.__bindingPointIndex );
}
Would it be possible to have a fixed version of three.js including alpha correction or having a three.js version in GITHUB including this feature (UniformBlock).
Many thanks in advanced.