raytk
raytk copied to clipboard
Code filtering
Currently operators use a lot of macros to switch between sections of code.
Doing more modification of the code in the TD/CPU realm might improve compile times, and maybe debugging, by reducing the amount of code that gets sent to the GPU.
The codeSwitcher, etc components are effectively doing this already.
It could be done in opDefinition, in the same phase that injects op names.
There will be some more complex cases where macros will still be necessary though. But for simple things it could work.
Might make sense to have some specialized syntax for common cases that can be easily parsed. Ideally still using syntactically valid GLSL, so either comment-based or maybe pragmas?
Apparently this doesn't actually improve compile performance.
https://forum.derivative.ca/t/shader-recompile-freezing-with-raytk/213699
Going to undo this since it doesn't have much benefit for performance.