Jump to content

HighlightLayer - Cannot add an uniform after UBO has been created


TomaszFurca
 Share

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.

Link to comment
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 :) 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...