Jump to content

Why my plugin do not render correctly?


Recommended Posts

I downloaded the Vandermotten framework, but i changed my mind, and then modified the source, so it don`t use it.

I made the config dialog, token parameters, and made them update, everything is good except one thing: The render loop do not change the image! Can somebody tell me why, here is the source:

Effect1.zip

Logo-1.gif

The Asmageddon is coming.

You better prepare... or you won`t survive

Link to post
Share on other sites
I downloaded the Vandermotten framework, but i changed my mind, and then modified the source, so it don`t use it.

I made the config dialog, token parameters, and made them update, everything is good except one thing: The render loop do not change the image! Can somebody tell me why

It is working, but the code is apparently not changing the pixels that you are writing out. Try this...

At the end of your render function, change this:

     
    T = srcArgs.Surface.GetBilinearSampleWrapped(vx, vy);
    dstArgs.Surface[x, y] = T;

To this:

     
    T = srcArgs.Surface.GetBilinearSampleWrapped(vx, vy);
    T = ColorBgra.Black;
    dstArgs.Surface[x, y] = T;

All that is doing is turning every pixel to black. As you can see, it works fine... every pixel is turning back... so, in your code, "T" is getting written to the canvas, but apparently it is not being changed at all (or not enough to notice) by your code.

I briefly reviewed you code, and it appears to be fine in terms of a working effect... I think your effect code is just not doing what you expect.

I'd like to know if this helped or if you are still having troubles.

Total hack.

Link to post
Share on other sites

You need this in the EffectPluginConfigToken.cs

        protected EffectPluginConfigToken(EffectPluginConfigToken copyMe)
           : base(copyMe)
       {
           // this.variable = copyMe.variable;
         this.Distance = copyMe.Distance;
         this.Angle = copyMe.Angle;
         this.Smoothing = copyMe.Smoothing;
         this.EffectMap = copyMe.EffectMap;
         this.other = copyMe.other;
         this.stretch = copyMe.stretch;
       }

Link to post
Share on other sites
You need this in the EffectPluginConfigToken.cs

        protected EffectPluginConfigToken(EffectPluginConfigToken copyMe)
           : base(copyMe)
       {
           // this.variable = copyMe.variable;
         this.Distance = copyMe.Distance;
         this.Angle = copyMe.Angle;
         this.Smoothing = copyMe.Smoothing;
         this.EffectMap = copyMe.EffectMap;
         this.other = copyMe.other;
         this.stretch = copyMe.stretch;
       }

Good catch.

Total hack.

Link to post
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...