IrisShaders / Iris

A modern shaders mod for Minecraft compatible with existing OptiFine shader packs
https://irisshaders.dev
GNU Lesser General Public License v3.0
3.31k stars 624 forks source link

Parse errors thrown by glsl-transformer should include program names #1702

Open gri573 opened 1 year ago

gri573 commented 1 year ago

Is your feature request related to a problem? Please describe. Since glsl-transformer is in iris, debugging shaders has become more difficult due to syntax errors being caught by glsl-transformer, which doesn't include program names in its error messages. this is annyoing when working on files that are included by multiple programs. example error message: [18:34:14] [Render thread/ERROR]: Failed to create shader rendering pipeline, disabling shaders! org.antlr.v4.runtime.misc.ParseCancellationException: line 1529:0 no viable alternative at input 'sldakfnge\nvec3'

Describe the solution you'd like error messages thrown my glsl-transformer should contain the name of the program in which they occurred. the example error message shown above could be changed to something like

[18:34:14] [Render thread/ERROR]: Failed to create shader rendering pipeline, disabling shaders! org.antlr.v4.runtime.misc.ParseCancellationException: program "gbuffers_basic.fsh" line 1529:0 no viable alternative at input 'sldakfnge\nvec3'

Describe alternatives you've considered I considered booting up optifine every time I get an error like that, but that's tedious

douira commented 1 year ago

Good idea, this would be useful.