PDA

View Full Version : Blending



MrShoe
12-05-2001, 11:14 PM
Im trying to get my terrain engine to have 2 terrian types, grass and snow, with grass at lower levels and snow up top.. So im thinking to draw the terrain twice with the two dif textures and then blend them together. I have a function that generaytes alpha values for the tarrain grids. Now what blending function should i use, which order should i draw the terrain, and should i have depth testing enabled. Coz ive been trying to get it to work, but it either only draws one terrain and the other is hidden, or it works, but it is REALLY bright and majority of stuff is pure white...

rIO
12-06-2001, 05:30 AM
The blending function depends on your textures and it's your choice, there isn't a perfect blend func for terrain rendering of course http://www.opengl.org/discussion_boards/ubb/biggrin.gif

Probably the best solution is to use SRC_ALPHA,ONE_MINUS_SRC_ALPHA