Set uniform double in shader

Hello all

I’m using a fragment shader to compute fractals, so I’d like to use doubles in the shader. However the PShader.set() method for setting shader uniforms only supports float. Can anyone suggest how I can set a double? My fractals are getting blocky too quickly! :slight_smile:

Thanks,
Toby

Hi, thank you for your reply. I’m not sure how to proceed. Are you suggesting I open an issue on GutHub?

If that’s the case, I will. I would welcome any ideas for a workaround too.

Thanks,
Toby

Yes! if you look up inside the PShader class you won’t find any mention of double there:

But I believe it’s feasible for the devs to add double functionality for PShader.

Thanks for clarifying. I’ll open an issue. Having looked at the code, adding double seems straightforward technically.

cheers!
Toby