Max number of material constants is still 4 (DEF-3745) (SOLVED)


#1

According to Defold 1.2.142 release notes materials should be able to work with more constants.

  • DEF-3605 - Changed: Higher max number (16) of material constants for model/sprite/label.

But I get this message when I try to use more than 4 fragment constants in a material for a model:

ERROR:RENDER: Out of per object constant slots, max 4, when setting constant 'point3'

#2

Hmm, @Mathias_Westerdahl: I took a look at the code and PR and we increased a bunch of max counts for label, model and sprite components to 16, but from what I can tell this error message stems from EnableRenderObjectConstant() in render.cpp where the limit is still 4. Is DEF-3605 misinterpreted or did we actually miss one place where we should have increased the max limit?


#3

It indeed seems like we missed something. Added DEF-3745 for this, should be in the next release on monday.


#4

Released in 1.2.146