PDA

View Full Version : Smooth texture-transitions..



jonn
01-19-2001, 11:21 PM
Is there a good way of drawing smooth transitions between textures in openGl? I've seen it done with pre-calculated alpha-images, but isn't that a bit awkward? One thing that comes to mind is if the two textures could be combined gouraud-like - by interpolating between vertices? then the gradient would always go right, unlike with the pre-calculated textures..

is there a way to this in opengl? or anything like it? there's probably not much chance to do it with putpixel/getpixel because of their relative slowness? (in animation..)


jonn

[This message has been edited by jonn (edited 01-20-2001).]

mcraighead
01-20-2001, 12:03 AM
You could use 2 2D textures and use multitexture or multipass to blend between them with a blend factor that varies over time.

You could use a 3D texture and take advantage of trilinear filtering to get smooth blending between 2 layers (set the R texture coordinate to a value between 0.25 and 0.75).

- Matt