Int UBO for Material Plugin

I get a different error with engine.disableUniformBuffers = false:

Error: Precisions of uniform block ‘Material’ member ‘Material.revealersCount’ differ between VERTEX and FRAGMENT shaders.

So I try to changed revealersCount to float and it worked.

Tip: you should register plugin before setting the material, the ground material is not using the plugin now.

Worked PG(I guess): https://playground.babylonjs.com/#3576XC#4

Edit: the error I meet is the same as CustomMaterial Error: Precisions of uniform "..." differ between VERTEX and FRAGMENT shaders, but there is nowhere in material plugin to declare highp int before uniform block Material is decalred, so it seems change int to float is the only way?

2 Likes