3 ms·
You can get some IDE support with a simple preprocessor macro[1]. It's a crutch, but at least you don't need to stuff the shader into multiple "strings" or hav
by phoboslab 4y ago
You can get some IDE support with a simple preprocessor macro[1].
It's a crutch, but at least you don't need to stuff the shader into multiple "strings" or have string continuations (\) at the end of every line. Plus you get some syntax highlighting from the embedding language. I.e. the shader is highlighted as C code, which for the most part seems to be close enough.
[1] https://github.com/phoboslab/pl_mpeg/blob/master/pl_mpeg_player.c#L102-L131 https://github.com/phoboslab/pl_mpeg/blob/master/pl_mpeg_pla...
- trinovantes 4y agoThat's pretty clever Thanks, I'll remember to use that in my future shaders