Additive composition & D3DXVec3Project()
Hi,
I've just added some lens flares to my game, but Ihave 2 problems:
1. The effects seem to be rendered as multiplied with framebuffer and I would like it to add. How do I do it?
2. I use D3DXVec3Project() to get flare location in screen-space. But the location is projected in both directions, so I have two flares oposing each other. What do I have to do to project from one direction only?
Thanks
Bartiss
Have you got a screenshot?
I believe this simply boils down to you setting a different texture for the one that you don't want to be visible, typically one that is completely transparent.
Dave
I believe this simply boils down to you setting a different texture for the one that you don't want to be visible, typically one that is completely transparent.
Dave
Quote:Original post by bartissYour D3DRS_SRCBLEND and D3DRS_DESTBLEND render states control this part. Changing them both to D3DBLEND_ONE should give you additive blending. Check out the various D3DBLEND enumerations - try them and see which one you like [smile]
1. The effects seem to be rendered as multiplied with framebuffer and I would like it to add. How do I do it?
hth
Jack
Which part of question did you answer? (1 or 2)
I don't have any screenshots here (at work :) ) Taking a screenshot of two opposing sunflares would be quite a challenge ;)
But I don't know if you got me right. I am not changing textures (and I don't want to)
I want an additive render and I am not using any shaders (yes, I know, I'll learn to use them next week ;-) ) so I need some old-fashioned SetRenderState() :)
I don't have any screenshots here (at work :) ) Taking a screenshot of two opposing sunflares would be quite a challenge ;)
But I don't know if you got me right. I am not changing textures (and I don't want to)
I want an additive render and I am not using any shaders (yes, I know, I'll learn to use them next week ;-) ) so I need some old-fashioned SetRenderState() :)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement