fenomas / noa

Experimental voxel game engine.
MIT License
612 stars 87 forks source link

Latest version of babylon throws an error on setting a block on chrome #50

Closed terrac closed 6 years ago

terrac commented 6 years ago

Cannot add an uniform after UBO has been created.

This doesn't have any impact as far as I can see, but it seems like something to be aware of.

terrac commented 6 years ago

This seems to happen on an intermittent basis. The latest version of babylon being 3.2

terrac commented 6 years ago

It specifically comes from textured blocks

.Offscreen-For-WebGL-0000025FF9182100]RENDER WARNING: texture bound to texture unit 22 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.

fenomas commented 6 years ago

Thanks for the report - this is definitely the kind of thing I want to fix, but I haven't been following babylon.js changes recently.

With that said, I'm not getting errors like this either in the 3.2 release, or with the current preview (3.3.0 alpha), either with the demo apps or with my own content.

Can you update if you find a way to reproduce this reliably in the test app? (/docs/test)

terrac commented 6 years ago

It looks like I managed to fix it via not doing alpha textures on blocks and not registering block id #1.

Not sure exactly why though.

Vinc3r commented 6 years ago

I have this bug too (but unfortunatly doesn't know how to reproduce it). Today I have it when trying to change the materials on an object:

var myPBRMaterial = new BABYLON.PBRMaterial("myPBRMaterial", scene);
var myMesh = scene.getMeshByName("myMesh"));
myMesh.material.subMaterials[0] = myPBRMaterial;

Note that the default material is a standard one, and I use a babylon file exported from Blender (2.79b, last version of exporter, BJS v3.3.0-alpha.12).

But a few days ago this was happen when using a spheremap in a reflection channel of a standard material (not assigning in javascript, but already in the .babylon file).

Tested on Chrome, Chrome Canary, Firefox. On Edge & IE it seems to work.

Vinc3r commented 6 years ago

erf sorry I totally doesn't seen that I'm not on the babylonjs github... sorry to be miles away :-D

valentinbdv commented 5 years ago

Same thing for me, wanted to try the new babylonjs version 3.3.0 but it throws me that error. Only happen with some specific model exported from blender so might be related to that.