raytk icon indicating copy to clipboard operation
raytk copied to clipboard

Code filtering

Open t3kt opened this issue 4 years ago • 2 comments

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?

t3kt avatar Oct 27 '21 06:10 t3kt

Apparently this doesn't actually improve compile performance.

https://forum.derivative.ca/t/shader-recompile-freezing-with-raytk/213699

t3kt avatar Nov 13 '21 23:11 t3kt

Going to undo this since it doesn't have much benefit for performance.

t3kt avatar Sep 24 '22 00:09 t3kt