Post not yet marked as solved
Post marked as unsolved with 9 replies, 497 views
Hi,
Am new to FxPlug development, and interested in turning a Rust command line image generating app, to either a generator or filter.
Have been fiddling with creating different example filters, getting to know Swift, and have tested several working color filters... So far, these have been rather basic, e.g. using the FxBrightness template, adding custom code to edit pixel values 1:1 from source.
Am trying to dive in a little deeper, and am finding figuring out the next steps a little overwhelming, challenging... First example:
In my CL app, one of the result options evaluates a new pixel output value based on the absolute pixel position in an image. That means using the X and Y position of a pixel to determine what value to generate and render. However, in my tests so far, have been unable to figure out how to get the current image pixel position for use in the fragment shader in metal, as have only managed to get the tiled image’s position, and not the image’s absolute position. This results in seeing a rendered image with 4x the same tiled output images within it, rather than a single image with the desired output. How can I access the absolute image pixel position, and not the absolute tile’s position in the fragment shader in metal (since the image framework is depreciated in favor of tiled images)?
In other words, if am looking at my HD output in Motion, and where the cursor points to a pixel at position x: 200, y: 200, am trying to get that value for use in metal, and not the value of the tiled image which returns something like x: -280, y: -70. Any ideas?
Thank you for your suggestions.
Note: Am not a professional developer, more an experienced digital artist, trying to make tools others may find interesting to use...