X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_game.pas;h=1d95bda6e40339c5e2a11b94d0dcddd04e1ae93c;hb=51fce0c702def28ce29efd0299c63536b42ebaeb;hp=6a26b044dc0aed035326e0e24f0fd61009f8b426;hpb=5e0a71e1d35a9037be80c8912060a913d0e98b18;p=d2df-sdl.git diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 6a26b04..1d95bda 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -2750,17 +2750,17 @@ begin (* * light rendering: (INVALID!) * glStencilFunc(GL_EQUAL, 0, $ff); - * clear depth buffer - * renderAmbientQuad() * for each light: + * glClear(GL_STENCIL_BUFFER_BIT); * glStencilOp(GL_KEEP, GL_KEEP, GL_INCR); * draw shadow volume into stencil buffer * glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); // modify color buffer * glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); // don't modify stencil buffer * turn off blending - * draw quad with light alpha + * draw color-less quad with light alpha (WARNING! don't touch color!) * glEnable(GL_BLEND); - * gl.glBlendFunc(GL_DST_ALPHA, GL_ONE); + * glBlendFunc(GL_DST_ALPHA, GL_ONE); + * draw all geometry up to and including walls (with alpha-testing, probably) -- this does lighting *) wassc := (glIsEnabled(GL_SCISSOR_TEST) <> 0);