On Mon, 2005-06-20 at 18:53 +0200, Harald JOHNSEN wrote:
> Ampere K. Hardraade wrote:
> 
> >Finally, is there a potential for this technique of generating shadow to be 
> >used on generating the effects of spot lights (eg. landing light, taxi 
> >light, 
> >logo light, etc.)?
> >  
> >
> You are a genius, forget my previous reply.
> We can't lighten pixels from the framebuffer because of the low 
> precision (8 bits) but we can of course darken them.
> Algo (works better at full night) :
> 1) render the scene and all non emissive geometry with a 'day' ambient term
> 2) render all lights (or emissive geometry) and update the stencil 
> buffer ( stencil := 1)
> 3) render a quad on screen to darken everything where stencil == 0
> 
> with 1 & 3 the scenery goes dark/black as usual
> with 2 the scenery in light stay illuminated
> Its quasi free, simple, support a million (fake) spot light ;)

Oh does that sound like a bad hack. What happens to objects that have
specular highlights? Would the illumination be as if the sun were
shining rather than the spotlight? Lighting is important, but this
doesn't seem like it's physically correct at all. OTOH, fake lighting is
better than no lighting ;-)

Paul



_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to