HeapsIO / heaps

Heaps : Haxe Game Framework
http://heaps.io
MIT License
3.21k stars 341 forks source link

MeshBatch causes exception in forward rendering #1165

Open 10c8 opened 1 year ago

10c8 commented 1 year ago

Trying to use a MeshBatch to do GPU instancing in forward rendering leads to the following exception on line 276 of heaps/h3d/pass/ShaderManager.hx:

Missing param value h3d.shader.Shadow.Batch_Buffer2

Simply enabling the PBR pipeline like so seemingly fixes the issue:

h3d.mat.MaterialSetup.current = new h3d.mat.PbrMaterialSetup();

Is there a reason why PBR is necessary for instancing, or is that just a bug?

10c8 commented 1 year ago

Note: This is observed in the latest stable version (1.10.0).

ncannasse commented 1 year ago

I think we fixed that on master.