yoonsikp / pycubelut

Tool for Applying Adobe Cube LUTs to Images
MIT License
89 stars 18 forks source link

what is the clamp in shader.py in gpu branch #6

Open luoww1992 opened 3 years ago

luoww1992 commented 3 years ago

what is the func:clamp in shader.py ? how to import it? i can't find it

yoonsikp commented 3 years ago

Unfortunately the GPU branch is quite buggy. It's actually an issue with pygpu. I've tried updating it a few months ago to the latest version, but I still ran into crashes. This is the issue I created:

https://github.com/pygfx/wgpu-py/issues/129

I think pyshader is responsible for replacing the clamp with its own implementation. You can find the function definition here:

https://github.com/pygfx/pyshader/blob/master/pyshader/stdlib.py