4 ms·
PS: also if shader functions could be directly defined as 'regular functions' in CPU-side source code (and behind a special function pointer type), there would
by flohofwoe 4y ago
PS: also if shader functions could be directly defined as 'regular functions' in CPU-side source code (and behind a special function pointer type), there would be no need for string literal shenanigans like this:
https://github.com/floooh/sokol-samples/blob/3f10c1a0620cec9f1f96fd54e22b05e64534bab9/d3d11/triangle-d3d11.c#L40-L67 https://github.com/floooh/sokol-samples/blob/3f10c1a0620cec9...
(and shader compilation would happen during the regular build and would also generate regular compiler errors - with current toolchains that's only possible with a lot of build system magic)