VulkanMod

VulkanMod

357k Downloads

Shaders cannot be compiled

Jack253-png opened this issue · 7 comments

commented

I am building a MMD model(a type of high-precision model) renderer, when I am writing shaders for resolving performance issues, I found it cannot be compiled on vulkan renderer and there aren't any error logs available. I cannot prevent crashing using NEC mod, because after the shader null pointer exception is a native exception.
loader source: https://github.com/PrimogemStudio/Advanced-Framework
the shader is at src/resources/assets/advancedfmkshaders/core/
refrences are at src/main/java/com/primogemstudio/advancedfmk/mmd/renderer/Renderer.kt
image
(idea debugger, the model has 68604 vertices, throws NullPointerException)
hs_err_pid10184.log
And it causes the native exception and the whole JVM program crashes.

commented
commented
commented
commented

MB i was completely mistaken (Deleted my prior comment as its incorrect: I didn't read the crash log properly)
Ignore what i said about glPolygon(): its N/A as its related to notenoughcrashes
Which is completely unrelated to the actually relevant issue w/ Advanced-Framework

If you are referring to the Rendersystem.GetShader() NullPointer Exception, then this is a known VulkanMod bug;
(ignore the below if thats not your issue)

Minecraft lacks an effective method of getting the name of the required Shader
As Minecraft doesn't have a way of providing the shader name, VulkanMod can't determine the correct shader+Pipeline to load
hence the NPE's when attempting to call Rendersystem.GetShader()

commented

In short, I can look into fixing this Rendersystem.GetShader() NPE if its helpful
So external mods can load the correct shader they need properly

(Was planning on doing this anyway as it effects mod compat w/ other mods as well
(e.g. Botania also has the Rendersystem.GetShader() NPE))

commented

it sometimes prints the complie error and it pointed out at this line
image
but it also contains in the minecraft core shader -> rendertype_entity_cutout, and this shader can be complied

commented

Has this issue been solved by 5f7132b?