Jump to content

Using custom colors in the Clouds effect


Recommended Posts

I noticed the 'Clouds' effect is hard-coded to use the Primary and Secondary colors, but if it's invoked from another effect (like CodeLab), those colors default to Black and White.

 

Here's an easy solution you can use in CodeLab:

using (EffectEnvironmentParameters envirParameters = new EffectEnvironmentParameters(ColorBgra.Red, ColorBgra.Blue, 0, EnvironmentParameters.GetSelection(src.Bounds), src))
    cloudsEffect.EnvironmentParameters = envirParameters;

 

or if you have the setup in OnSetRenderInfo:

using (EffectEnvironmentParameters envirParameters = new EffectEnvironmentParameters(ColorBgra.Red, ColorBgra.Blue, 0, EnvironmentParameters.GetSelection(srcArgs.Bounds), srcArgs.Surface))
    cloudsEffect.EnvironmentParameters = envirParameters;

 

Brush width is set to 0 simply because the Clouds effect doesn't use it, so it doesn't matter.

  • Upvote 4

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

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...