Astrabit-ST / ModShot-Core

A fork of mkxp, forked for OneShot, forked for OneShot mods, (not to be confused with the ModShot server)
https://nowaffles.com
GNU General Public License v2.0
19 stars 9 forks source link

Easy shaders #59

Open Speak2Erase opened 2 years ago

Speak2Erase commented 2 years ago
Speak2Erase commented 2 years ago
Speak2Erase commented 2 years ago
Speak2Erase commented 2 years ago
Eblo commented 1 year ago

Hello! I found a bug and also have a potential fix that I have in my own fork. Shader linking seems to fail, but only on certain machines.

Between testing 4 different machines, it looks like shader linking fails when running a machine with integrated graphics. The default mkxp shaders seem to work fine, but compiling custom shaders through this setup would throw "Shader linking failed with", except the log would be completely empty.

Some stackoverflow-ing later, I found that the specific issue of empty shader logs comes when you try to link a fragment shader without a vertex shader https://stackoverflow.com/questions/21555186/glsl-shader-linking-fail-but-no-log

I implemented an admittedly lazy fix of assuming the vertex shader is always handled after the fragment shader. This is good enough for me, but you may or may not want to do something more robust. Here is my own fix for reference. Let me know if you can't access it: https://github.com/Eblo/mkxp-eulogy/commit/c5874182694300e9c97ec66d397b779aa543e627

Speak2Erase commented 1 year ago

Thank you! I'm no longer maintaining ModShot but I'll see what I can do.