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.

Dark GDK / How to pass a vector array to a shader?

Author
Message
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 13th May 2010 00:20
Hey,
I'm trying to figure this out. Unfortunatly there is no command for this in DarkGDK.

So, here is what I have so far:



I thought that would do it, but I get an unhandled exception pointing to the line with 'D3DXHANDLE hParam = (...)'!
What could be wrong here?
I don't use DirectX stuff often so I'm stuck right now...
Has anybody experience with this?

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 13th May 2010 00:58
Ok, I have this fixed.

There was a problem with the model that the effect was applied to.
Somehow my described method above doesn't seem to work with loaded objects (from .x-files).
But it works with DarkGDK primitives. The good thing is that when you pass the array to a shader effect, the change becomes effective on all objects that use the same effect!
So you can just create a temporary cube, apply the effect to it and make your changes.

Hope this helps someone.

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.

Login to post a reply

Server time is: 2024-11-19 23:45:04
Your offset time is: 2024-11-19 23:45:04