Jump to content
You must now use your email address to sign in [click for more info] ×

GLSL shader as live filter


Recommended Posts

Just come to my mind. Might be a little crazy though, but it might not be that hard to implement, and there's absolutely a lot of usage if implemented.

 

The idea is simple, allowing user to write their own live filter in GLSL. Something like this:

//haven't coded GLSL some time so this is more of a pseudo code
unity texture2D source; //the source image
unity vec2 sourceSize; //the rastered size of the source image in px
unity struct{
  //user-defineable sliders, document driven
  
  /**
  	* @name Slider A
   * @description The Slider A
  	* @minValue 0
   * @maxValue 100
  	*/
  float sliderA;
  
  /**
  	* @name Slider A
   * @description The Slider A
  	* @minValue 0
   * @maxValue 100
  	*/
  float sliderB;
} settings;

in vec2 pos; //the normalized position/coordination of the current fragment, aka pixel
out vec4 color; //the result this filter should produce

//the above part should be auto-generated, with the settings being generated using a GUI interface, even though user can type those in themselves

//below is a dummy filter that simply outputs whatever the source image is
main(){
  vec4 currentColor = texture(source,pos);
  return currentColor;
}

Which would already be GPU-friendly (since it's basically a fragment shader) and thus GPU acceleration can be automatically used. Also, by default this is 32-bit image editing ready.

 

I don't see many people would want to write their own filters, but those who want to could benefit from this, and other people can use their code without knowing how to write one, which means that Affinity Photo can have potentially unlimited amount of live filters.

 

There could be more features, for example side-chaining other images as secondary sources, but that would only be in the roadmap if this one is in first, thus not in the topic of this suggestion.

Link to comment
Share on other sites

  • 1 year later...
  • 3 years later...

I recently began to search if any graphic editor has this capability and couldn't find any. This seems like a potential for a huge win that would provide for immense capabilities far beyond the current procedural texture generator and equations. You could go crazy with custom live effects and it would be incredibly fast.

Seems it would also be a significant competitive advantage as there are no other image editors that has this feature.

Maybe there is some hope that it could be done by plugin/script integration that they are currently building.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.