Copy link to clipboard
Copied
Hi. I'm quite new to Photoshop scriping.
What I want to do is kind of image processing. Making custom blur or custom tone mapping by using my custom formula. Normally, I do this kind of works not in photoshop, but our team need this in Photoshop.
Firstly, Is there any way to apply HLSL or GLSL to image in photoshop?
I found the scripting in photoshop, looks like it can sample color from pixel, and then set color to pixel. but this is quite slow for use it. Are there any way to make faster? the native photoshop filter is quite fast. How did they do for it?
1 Correct answer
Hey, it's possible to apply shaders code using the Photoshop Shader Plugin which may be found on its itch.io page: https://hellmapper.itch.io/photoshop-shader-plugin
Explore related tutorials & articles
Copy link to clipboard
Copied
As far as I know, the script cannot access the pixels of the image directly. If you stay within the scripting language of Photoshop, that is, a very long and inefficient way of working with pixels is to read each pixel through the colorSampler tool, process the resulting array, then assign a color to each pixel through make selection & fill. It is really very long and inefficient.
A more effective option is to save the image to disk and transfer its processing to an external script / program, and then upload the result to Photoshop.
Copy link to clipboard
Copied
And I suppose a proper Filter plugin programmed in C++ should also be more efficient than a Scripting-approach.
Copy link to clipboard
Copied
Ok. It seems like that option is more effective. I'm gonna try that. Thanks!
Copy link to clipboard
Copied
Hey, it's possible to apply shaders code using the Photoshop Shader Plugin which may be found on its itch.io page: https://hellmapper.itch.io/photoshop-shader-plugin

