Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shaders cannot be compiled #364

Open
Jack253-png opened this issue Jan 15, 2024 · 6 comments · May be fixed by #370
Open

Shaders cannot be compiled #364

Jack253-png opened this issue Jan 15, 2024 · 6 comments · May be fixed by #370

Comments

@Jack253-png
Copy link

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.

@Jack253-png
Copy link
Author

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

@Jack253-png
Copy link
Author

Jack253-png commented Jan 16, 2024 via email

@Jack253-png
Copy link
Author

Jack253-png commented Jan 16, 2024 via email

@Jack253-png
Copy link
Author

Jack253-png commented Jan 16, 2024 via email

@thr3343
Copy link
Contributor

thr3343 commented Jan 16, 2024

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()

@thr3343
Copy link
Contributor

thr3343 commented Jan 16, 2024

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))

@Jack253-png Jack253-png linked a pull request Feb 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants