Daemon icon indicating copy to clipboard operation
Daemon copied to clipboard

Shaders with non-empty macros throw off #insert line numbers

Open VReaperV opened this issue 1 year ago • 2 comments

https://github.com/DaemonEngine/Daemon/blob/0407cd81ae90fa7e1430f786a8b7f856552f311d/src/engine/renderer/gl_shader.cpp#L1037 receives the shader without any macros set, so #insert gets incorrect line count if any macros are set.

VReaperV avatar Oct 03 '24 17:10 VReaperV

A quick and dirty fix would be to add 3 commented out lines for every disabled macro, and then just add 3 lines to the count for #insert.

VReaperV avatar Oct 03 '24 17:10 VReaperV

@illwieckz Any thoughts on the above? Maybe another approach?

VReaperV avatar Oct 04 '24 11:10 VReaperV