Hey, thanks for testing, yaustar. I made a minimal example now, recreating somewhat the game scene in the video.
Because I load my models as raw data I had to add procedural mesh support to playcanvas-latest.js It’s just like 15 lines of code around line 22978.
} else if (typeof newValue == "function") {
// get new mesh from callback
var mesh = newValue.bind(this)();
// and instantiate it
var system = this.system;
var gd = system.app.graphicsDevice;
var node = new pc.GraphNode;
var model = new pc.Model;
model.graph = node;
model.meshInstances = [new pc.MeshInstance(node, mesh, data.material)];
if (system._inTools) {
model.generateWireframe();
}
this.model = model;
this.asset = null;
} else {
IIRC I had layer problems using the procedural mesh examples I found in this forum, so I added the procedural code in library, which integrates nicely with the {.... layers: worldLayer.id], ...}.
For testing, you can call test() to load the crowbar model and normalTest() to set a normalMap, which causes the bug.
I really need working procedural meshes, but it seems my implementation does something not quite right… would be epic if somebody could find the bug and then add the correct procedural code to playcanvas upstream aswell.
Looks like you’re on an old version of the engine. The latest version doesn’t require tangents. If it finds the mesh doesn’t have tangents, it generates them in the fragment shader.