Shadertoy in Dcompute?

Nicholas Wilson iamthewilsonator at hotmail.com
Thu Aug 22 04:32:11 UTC 2019


On Thursday, 22 August 2019 at 00:57:26 UTC, Bert wrote:
> How hard would it be to do something like Shadertoy in Dcompute 
> and would it be any faster?
>
> I don't like the basics of Shadertoy, lots of nonsense to do 
> basic stuff. E.g., to work with complex numbers one must 
> essentially do everything manually.
>
> Would there be any benefit using Dcompute(last time I tried it 
> I couldn't get it to work).

DCompute is primarily for compute at the moment, and not 
graphics. It targets OpenCL and CUDA, not 
OpenGL/WebGL/Vulkan/DirectX. Thats not to say that you can't use 
it for computational graphics but you wouldn't be utilising the 
specialised hardware for the rendering pipeline, so it would 
probably be slower.

If you want to have a crack at it, I'd take a look at how to do 
graphics with OpenCL or CUDA and adapt what you can. I haven't 
tested OpenCL/OpenGL interop at all (with or without DCompute) 
but it is a thing.


More information about the Digitalmars-d-learn mailing list