shader-toy icon indicating copy to clipboard operation
shader-toy copied to clipboard

Very high CPU usage compared to Shadertoy

Open ghost opened this issue 4 years ago • 2 comments

On my desktop this is not really a problem but on my laptop with an integrated GPU, the CPU usage goes up to 50%+ on all threads compared to ~15% on the regular Shadertoy website using the same very basic shader code.

I don't know if this is because of a limitation by VSCode or something?

ghost avatar Jul 21 '19 03:07 ghost

I don't know much about how integrated GPUs work, but I would assume that in this context GPU usage equates CPU usage. Correct me if I'm wrong.

I know the extension uses quite a lot of GPU time, depending on the shaders that are used. From my superficial investigation that might be related to THREE.js. The online version of shadertoy does not use the THREE.js framework, but afaik does all the webgl code themselves. But I can't say for sure if it is an issue with how we're using the library or if it is actually doing too much work. It is certainly something work investigating, but probably requires a more involved solution.

Do you have an example of which shaders cause the high usage or does it happen really on any shader?

Malacath-92 avatar Jul 21 '19 10:07 Malacath-92

Is this better in the latest version that uses async I/O?

Malacath-92 avatar Jul 16 '23 19:07 Malacath-92