Sign in to follow this  
andrew111

OpenGL (nvm solved)Question about D3dxEffect and multiple passes

Recommended Posts

Sorry after thinking about it more, I figured out how it works. .............. Hi, I mainly have experience in OpenGL and little experience with Direct3D, but I've taken interest in the D3DXEffects, and I was looking at a tutorial where they mention that you can render the multiple passes within an effect like so: (totally pseudo code..)
//render object1 with effect1
for i = 0 to effect1.passNum
    effect1.beginPass(i)
    object1.drawGeom()
    effect1.endPass(i)


...
...

//render objectN with effectN
for i = 0 to effectn.passNum
    effectN.beginPass(i)
    objectN.drawGeom()
    effectN.endPass(i)

I am a bit newbie at this, but if I were to do something similar in OpenGL, I'd render all the objects' first passes onto the backbuffer, and then the subsequent passes onto a texture and then from there blended on top of the backbuffer (with depth testing off). So I don't understand how Direct3D with its D3DXEffects is doing it like the code I showed above. Or have I totally misunderstood what Direct3D is doing? Sorry if I wasn't very clear, or if this has been asked before. Thanks. [Edited by - andrew111 on March 11, 2010 9:08:02 AM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this