Sign in to follow this  
TomaszFurca

HighlightLayer - Cannot add an uniform after UBO has been created

Recommended Posts

When I add Highlight layer to my mesh, then i got error: " Cannot add an uniform after UBO has been created"

PG with error: https://www.babylonjs-playground.com/#TUNZFH#17 -> when you click run next time, then console do not generate errors. When I remove mesh "leatherHelm" then I can open PG without error https://www.babylonjs-playground.com/#TUNZFH#19.

Share this post


Link to post
Share on other sites

I also get this warning for https://www.babylonjs-playground.com/#TUNZFH#17

 [.WebGL-0x7fca6486e400]GL ERROR :GL_INVALID_OPERATION : glDrawElements: uniform buffers : buffer or buffer range at index 0 not large enough

and for the next https://www.babylonjs-playground.com/#TUNZFH#19 this warning-

[.WebGL-0x7f9f8684be00]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering

On debugging, I found this is happening at in the Mesh.render function(https://github.com/BabylonJS/Babylon.js/blob/e00c2c01cee67363f295a9c996c491a9e213981b/src/Mesh/babylon.mesh.ts#L1603) for "leatherHelm"

 if (this._effectiveMaterial._storeEffectOnSubMeshes) {
                this._effectiveMaterial.bindForSubMesh(world, this, subMesh);
            }

// location is undefined but buffer has some value in UniformBuffer class
var location = this._uniformLocations[uniformName];

 

Not sure if this helpful or not :) 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.