Jump to content

Sample Effect Plugins for Paint.NET 5.0 (with source code)


Recommended Posts

I've created some samples to show how to write effects using the new GPU plugin system in PDN 5.0.

 

Download: PDNv5EffectSamples.2023.01.07.zip

To install, extract the ZIP to your effect plugin folder. Do not move the files outside of their folder.

GitHub repository (source code)

 

Here's what's included. Some of these are genuinely fun, others are strictly for showing how to code certain things:

 

Bandlimited Synthesis -- This was ported from a ShaderToy shader written in GLSL.

image.png

Channel Blur -- This lets you select which channels are affected by a Gaussian Blur effect. This sample is mostly to show how to combine existing Direct2D effects in your own plugin.

image.png

Drop Shadow -- This is mostly just a coding example. The app has a built-in Drop Shadow effect of its own now.

 

Gaussian Bokeh -- This is another example on how to combine two built-in effects: Direct2D's Gaussian Blur, and Paint.NET's Bokeh blur. There's a slider to cross-fade between the two results.

 

Hue Rotate -- This is another example on how to write a simple Direct2D-based GPU plugin. There is both a simple and advanced implementation, the latter illustrating a method for writing a GPU plugin that has improved performance.

 

Night Circuit Shader -- This is a very complicated effect ported from a Shader Toy shader written in GLSL.

image.png

Outlined Text with Shadow -- This is an example of how to use Direct2D and DirectWrite together.

image.png

Polarized Mandelleaves -- This is a really fun one to play with. It combines a ShaderToy shader ported from GLSL and Polar Inversion.

image.png

Rainbow -- A simple tutorial on how to draw a rainbow in Direct2D using a linear gradient brush.

image.png

Random Noise -- Shows how to generate random numbers on the GPU.

 

image.png

Ripple -- An example of how to write a distortion effect using SampleMapRenderer and multisample sub-pixel antialiasing.

image.png

Shadow Around Selection -- An example of how to render outside of the active selection.

image.png

Square Blur -- An example of how to write an effect plugin that uses a custom pixel shader and a transform mapper.

image.png

Wavey Transform -- An example of how to write a distortion effect using SampleMapRenderer and multisample subpixel antialiasing.

image.png

Zone Plate Shader -- An example of how to write an output-only (aka "Render") pixel shader effect. Implementation based on code by Clinton Ingram @saucecontrol. A "zone plate" is often used for testing systems (physical or digital) and image processing algorithms to see how they eliminate, preserve, or introduce aliasing artifacts.

image.png

  • Like 2

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

I'll be updating these over the next few weeks, especially to include comments that better describe what's going on in the code.

 

Feel free to post questions here, or file an issue on the GitHub repository.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

I'm really hoping that more "around selection" plugins could be made, like "outline around selection", or just any outline plugin can be updated to include the "outside selection" function. This will help me with editing pixel art or make it easier to edit photos in some cases.

I'm also thinking that a stamp tool or content aware stamp tool (which is in photoshop already) can be made.
It's just some ideas I thought of, nothing too serious.

Edited by Setnour6
Stamp tool already exists and I forgot about it
  • Like 1
Link to comment
Share on other sites

4 hours ago, Setnour6 said:

I'm really hoping that more "around selection" plugins could be made, like "outline around selection", or just any outline plugin can be updated to include the "outside selection" function. This will help me with editing pixel art or make it easier to edit photos in some cases.


I already include this in my plugin pack.  Download here: https://forums.getpaint.net/BoltBaitPluginPack

 

After install, look at Effects > Selection > Outline Selection...

 

image.png

 

  • Like 1

Click to play:
j.pngs.pngd.pnga.pngp.png
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

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.

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.

×
×
  • Create New...