I have a shader with two textures that works in game but that is not visible in the editor. Is this a known issue?
AFAIK yes, Editor has a different render pipeline using old OpenGL version. So it can’t handle complex shaders very well.
It is better when using new shader pipeline.
Thanks @selimanac !!!
However I would not say it is complex One texture for albedo and one texture for emission. Nothing too fancy.
Moreover, just now I tried the same material on two components with different pngs as textures and I get a systematic crash.
I don’t understand your suggestion to use the new shader pipeline… Isn’t the editor render pipeline more different from the ingame pipeline with the new shader?
Can you paste the error or the shader?
Thanks @jhonny.goransson !!!
Do you mean the crash log?
Here are the vertex and fragment shaders and the material:
model_shaders_material.zip (1.7 KB)
And here is the crash log as a txt file (I was not able to find it in the project folder… sorry).
crash_log.txt (57.6 KB)
I migrated the shader in the new pipeline (#version 140) with no luck; components not visible in the editor, crash in runtime
Strange, yes there is no visibility on Editor but I do not have crash… I’m using latest alpha(1.9.4).
Do you have anymore info that might help us?
Thanks!
It works also for me in runtime if I use any number of gameobjects with model components using the same pair of base_color/emissive pngs. But it crashes if I use two gameobjects with components using different pngs. Moreover in the renderscript I am setting the fragment uniform light_position_power for all the components at once since it is common. And, as said above, this is working fine if I use only a pair of textures. I hope my description makes sense…
Thanks @Mathias_Westerdahl !
I posted above the crash report from the mac. It seems quite detailed to me, but I am not an expert.
I can also share my entire project in DM if you prefer.
It was just unclear if the last comment was a new crash.
@Mathias_Westerdahl sorry, my english is not that good (as usual…)
The shaders and the crash log I posted are for the old pipeline. Then I migrated the shaders to the new pipeline but nothing changed. Moreover for the new pipeline I don’t get the mac crash report; only the crash log of Defold.
I hope now it is a bit clearer.
Could you share the project with me? I think this might be addressed with the instancing work we have been working on. The crash is happening in dmRig::WriteSingleVertexDataByAttributes
which has now been completely rewritten.
Hey Jhonny, thank you so much! I will send it to you!