I would like to use Rive in my game. I just added the rive extension dependency, but the game now crashes with the following error:
[mvk-error] VK_ERROR_INITIALIZATION_FAILED: Render pipeline compile failed (Error code 2):
Link failed: The type of fragment input user(locn2) does not match the type of the corresponding vertex shader output.
ERROR:GRAPHICS: Vulkan Error (…/src/vulkan/graphics_vulkan.cpp:1615) VK_ERROR_INITIALIZATION_FAILED
Assertion failed: (0), function GetOrCreatePipeline, file graphics_vulkan.cpp, line 1615.
I am using a Mac, with Defold 1.9.6 and https://github.com/defold/extension-rive/archive/main.zip. I have also set OpenGL Version Hint to “Highest version available”.
Any help?
Did you also set the Rive renderer in the game.project > bootstrap > render?
No, I just added the Rive extension. I have no Rive contents, just my game as before.
Also, the Rive defold sample project works fine.
You have issues with your shaders, they are not compatible with metal/vulkan. The error says that the input and output doesn’t match. So check that your varyings are correct
2 Likes
Thansk @jhonny.goransson
I forced the use of Vulkan with an appmanifest and I get the same error without the Rive extension. I will try and find these mismatches in my shaders and report them here.
@jhonny.goransson
I am now able to run the game with Vulkan BUT:
-
There was no mismatch in my shaders. I have just reordered the varyings in each .vp and .fp pair so that they are defined in the same order. (!)
-
My models are not showing anymore in the game… Note that some of them were already not showing in the editor.
What should I do?
Can you share the project or the shaders with me? I have no idea why it wouldn’t work
2 Likes
@jhonny.goransson Many many thanks!
I will prepare a minimal project with only a shader and a model and send it to you.
2 Likes