Stencil Buffer

Blitz3D Forums/Blitz3D Programming/Stencil Buffer

Neochrome(Posted 2007) [#1]
Can Stencil buffers work for making Lights? as in a torch light?

i want to attempt to get this to work on a BSP map tho? i dont might multiple renders, this game is aimed at HIGH end machines


bytecode77(Posted 2007) [#2]
of course. where a normal stencil shadow system makes area dark, YOUR stencil shadow system makes areas bright! but would that look good? i have to try!


Neochrome(Posted 2007) [#3]
Could you make a demo using this?
and in a bsp level?


bytecode77(Posted 2007) [#4]
thats why we dont use BSP levels or MD2 meshes. they are not flexible to do those things...

imagine my shadow system
now imagine, that the shadows are not black anymore, but white. that is all!

instead, for light conies i would go for texture projection...


Gabriel(Posted 2007) [#5]
imagine my shadow system
now imagine, that the shadows are not black anymore, but white. that is all!

Wouldn't that mean that you would only get light when something came between the light source and the target? Surely you're only casting shadows when something obstructs the light, so you would want to do the opposite for a light beam?


bytecode77(Posted 2007) [#6]
yes. that means: no sun-rays or something like that!
of course you can modify the stencil rendering proccess, so it would look proper