PDA

View Full Version : Creating a transition with a dynamic texture/mask


wima
09-28-2005, 03:27 AM
Hello

I want to create a transition from one texture to another texture. Like in a video editing software (e.g. Microsoft Movie Maker). I use a texture as the mask. At each render step I have to change this mask. At each render step I create a bitmap or I change the existing bitmap/mask. Then I create a new texture from this bitmap. This es very slow. How can I do a transition when I don't want to use pixel shaders oder direct show editing services?

Thank you
wima

kusma
09-28-2005, 05:45 AM
pixelshaders would really be the way to go here, but if you have to use fixed function, look into GL_ARB_texture_env_crossbar if you're using opengl, or D3DTOP_LERP if you're using d3d.

wima
09-28-2005, 05:49 AM
I'm using (managed) DirectX. I know the lerp function. My problem is fast generation of the texture/mask, not the (alpha-)blending.

Goz
09-28-2005, 07:03 AM
Keep 2 textures for editing. You then edit in a fashion like follows

Setup Mask in TextureA
--> Next frame
Render using Mask in Texture A
Edit Texture B
--> Next frame
Render using Mask in Texture B
Edit Texture A

and so on ... Not sure how well that will work but should remove many of the pipeline stalls :)