Defold 1.6.3 BETA

An issue reported for beta: 1.6.3 beta - `Could not find '@render' socket` error in a new empty project · Issue #8316 · defold/defold · GitHub

1 Like

One more fix added into this beta

3 Likes

This is also fixed.

3 Likes

The order of texture samplers in the editor seems to have changed. Before it inherited from the material but now it looks like it’s in alphabetic order. Is this intended? Initially my materials work after opening the project in v. 1.6.3 because the order of the textures in the model file is kept. But after adding new models the order of the textures in the .model follows alphabetical order, which might differ from the order in the material.

I guess one workaround is to keep my samplers in alphabetical order inside the material but that was not needed before.

With the recent changes, the ordering of the samplers in the .model file should matter no more, as we now added a sampler name, that we can use to look up the sampler location at runtime.
Prior to this, the model’s textures were required to be in same order as the material samplers, making it much harder to do changes to a material.

Are you seeing any issues due to this?

1 Like

That sounds great! I still can’t get it to work though. I have an example project here that is not working for me on 1.6.3 beta.

test-samplers.zip (7.4 KB)

In this project there are two cubes that only differ when it comes to the order of the textures in the .model file. The only sampler used in the shader is tex0, but it seems to always pick the first texture in the model – one cube is brown and one is green even though both should be green. Note that both cubes are green in the editor.

I shouldn’t have to use this trick to include all samplers and multiplying the result by a very small number as described here https://forum.defold.com/t/defold-pbr-extension-alpha-testing/73729/21 now that the samplers are bound by name right?

1 Like

Is this the initial step to add more functionality to cover what on desktop is currently handled by DefOS?

1 Like

Yes, I would like to remove the old glfw completely and move the other non-desktop platforms outside of the GLFW infrastructure. The current plan is to migrate all desktop platforms to the newest GLFW library version and then look at adding new API functions one by one to cover some of the new functionality from GLFW into Defold. Eventually DefOS shouldn’t be needed. I have started with OSX yesterday, but there’s some more decoupling needed to move forward.

7 Likes

I’ll take a look after lunch.
Curious though, how can you have multiple textures on a model if the material only has one sampler? :thinking:

2 Likes

Thanks! Oh, maybe I was a bit unclear. The material uses two samplers, but I’m only using one of them in the shader.

Maybe then the other is “simplified” by the compiler and you get only one… Just a guess. Ciao!

1 Like

Perhaps. But I also tried using both samplers in the shader and the “trick” I linked above to force the compiler not to optimize. It still rendered the wrong texture.

1 Like

Looking at the compiled files, it seems there’s a bug somewhere, triggering some old backwards compatibility code (that is order dependent).

I’ll add an issue tracking this, shouldn’t be too hard to track down.

Ticket:

5 Likes

Returning to 1.6.2 after using 1.6.3 BETA for a while I get this error when building:

Works okay on 1.6.3 BETA

1 Like

That feature isn’t available on beta, you must be using an alpha version of defold. In this case you will have to remove the ids manually

1 Like

There is an upcoming PR for beta for the model/material/texture issue.
Can’t guarantuee when it will arrive exactly, as the team is having a bit of a holiday break.

6 Likes

We’ve just merged a fix for the model multi materials to the beta branch, and it should be available as soon as it has built on the servers (normally within an hour).

Our plan is to do release the release on monday, so I’s be grateful if you did some more testing on this fix.

5 Likes

Hi @S_R !
Would it be possible for you to share that repro project with us?

It works when running the latest 1.6.3 beta, both in the test project and in my main project. Importing from 1.6.2, adding new models in 1.6.3 and reordering the textures in the .model file – everything is working properly. Thanks!

2 Likes

Hi! sorry, i was absorbed by routine
here it is
Platformer game.zip (746.6 KB)

1 Like