PDA

View Full Version : Fake shadow



Blue_dup1
02-23-2006, 10:54 AM
Hi guys,

I have a simple landscape and i want to add a fake shadows for some objects on it.

Basically, i have an alpha texture with a big dot on it, and i need to blend this over terrain, and cover eventually all small obejcts under shadow, any trick to do that?

TIA

dorbie
02-23-2006, 11:33 AM
Use multitexture with GL_MODULATE, place the dot on the second texture unit, set up texgen appropriately and hope you don't use that texture unit for anything else.

The alternative is to do another pass (with source * destination color in the blendfunc.

Blue_dup1
02-23-2006, 11:38 AM
okay, but this force me to render some parts of terrain again, right?

dorbie
02-23-2006, 11:56 AM
Not if you use multitexture when you draw everything.

Blue_dup1
02-23-2006, 12:05 PM
Ok, maybe i havent explain corectly what i need.

I want to be able to move this shadow over terrain and cover everything was rendered.

A similar effect is a fake light circle over scene.

I have no idea how this thing is called.