[SOLVED] Increase Material Diffuse Map Offset not working

Hi @PolVegaTPM,

We added support for rotation to augment the texture offset & tiling and in the process changed the format of the shader uniform. Instead of a one vec4 with [tiling.x, tiling.y, offset.x, offset.y], we now have a 3x2 texture matrix stored as two vec3’s.

We are in discussions to change the internal format again, because it has become difficult to override. In any case, to fix this now you can set tiling & offset as follows:
‘texture_diffuseMapTransform0’: [tiling.x, 0, offset.x]
‘texture_diffuseMapTransform1’: [0, tiling.y, offset.y]

Sorry for the trouble!

2 Likes

Thanks for the answer @slimbuck,

With this change it works now fine again.

Please, update this post in case you change again this method.

@PolVegaTPM please see this thread about this change Material parameter uniform names have changed since 1.46.0 - #2 by Leonidas

Unfortunately, as it’s private API and uniforms, it’s subject to change without formal notice since it doesn’t change/break public API.

If it does change, it’s likely to be in the release version as part of an 1.X.0 release with notes on material refactor (If you can subscribe to the engine repo releases)

If it’s possible, swap to using a cloned material and use the material’s offset/tiling properties to be future proof as they are public API

It will break batching but the performance cost should be negligible.

Setting uniforms on meshInstance breaks batching already.

2 Likes