Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Shader Instance Problem

Author
Message
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 9th Jan 2015 22:37 Edited at: 15th Jan 2015 17:43
Hello,

I have a 3D Desintegrate shader wich discard's pixles over time.
you can find my shader in your Project folder User Demos/Demo Labyrinth/media/shader/DesintegrateLight.ps (AGKv2 only)
In my demo I desintegrate all boxes at once.

Now my problem is that I want to desintegrate selected boxes.
But "SetShaderConstantByName()" is per shader not per object, so if I select one and then select another, while the old box isn't done, the old box will do it again.
I tried to draw one object in it's current state and move it to the next position where I draw it again (DrawObject()), but I had no sucess.

I could load hundreds of shaders but that might break something.

With that in mind, please help me


That image only shows the effect.. what you can't the is that I "selected" two boxes but only one gets rendered
It's the last one in the for loop for the draw process, so the real object ... maybe im doing it wrong and you can draw objects in its current state


Using AppGameKit V2 Tier1

Attachments

Login to view attachments
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 10th Jan 2015 13:47 Edited at: 10th Jan 2015 13:55
OK I got it...

My prevous attempt was right.
You can draw objects in its current state while affected by a shader.

If you have the same problem...
I had to do it in this way and no other order:


Login to post a reply

Server time is: 2024-03-28 17:31:16
Your offset time is: 2024-03-28 17:31:16