Re: [Algorithms] Deferred shadow mask generation
Brought to you by:
vexxed72
From: Francis B. <fra...@ub...> - 2007-04-05 15:52:24
|
Are you also blurring the Shadow collector texture afterwards to get = smoother looking shadows? If so, how do you avoid the typical "halo" = effect when using such a technique? ________________________________ From: gda...@li... = [mailto:gda...@li...] On Behalf Of = Wolfgang Engel Sent: Thursday, April 05, 2007 11:42 AM To: 'Game Development Algorithms' Subject: Re: [Algorithms] Deferred shadow mask generation <<<=20 Now render all gathered Shadowmap in a preprocess (Deferred Shadowing) = -> Shadow collector Render each Shadowmap collected from the viewer point of view and = store the shadow factor in a screen-sized texture Render Cascaded Shadowmap (Put the 4 light space matrix in constant = register and select the right light projection to use via compare/dot = product) And store the shadow factor... <<<=20 You can render the four maps into the shadow collector in one pass. You just fetch the shadow collector then as a screen-space texture for = each object ... e.g. you use the vpos register in the pixel shader or = calculate the screen space position in the vertex shader. =20 So overall five render passes: four to create the shadow maps, one into = the shadow collector and the one in the shadow collector is also the Z = pre-pass. =20 <<<=20 When you said to store shadow factor in r, g or b channel, you mean that = the different shadow factor must not be blend together and should be = left separated Until they are use for lighting calculation ? So in the above = description, spot light should be render in r channel and cascaded in g, = then at lighting do two texture fetch ? <<<=20 You might want to use different colors for different shadows. Cloud = shadows should be more faint and the shadows casted by objects on the = ground stronger.=20 =20 Z pre-pass: you have to render like this anyway, why not just use the = shadow collector pass for this :-) =20 - Wolfgang =20 =20 =20 From: gda...@li... = [mailto:gda...@li...] On Behalf Of = Lagarde S=E9bastien Sent: Thursday, April 05, 2007 1:26 AM To: 'Game Development Algorithms' Subject: Re: [Algorithms] Deferred shadow mask generation =20 Alright, I have checked your article and the paper mentioned (PSSM), = thanks for the pointer. =20 So If I have well understood: =20 In a first time you render all the shadowmap for your game: Render Shadowmap for projected ligt Render Shadowmap for omni light with cubemap or multiple frustum Etc... Render Cascaded Shadowmap for the sun light (with day and light cycle = managed): Here for the directional light representing the Sun you render 4 Shadowmap for each 4 frustum slice transformed in light = space in one texture (aka texture atlas) =20 Now render all gathered Shadowmap in a preprocess (Deferred Shadowing) = -> Shadow collector Render each Shadowmap collected from the viewer point of view and = store the shadow factor in a screen-sized texture Render Cascaded Shadowmap (Put the 4 light space matrix in constant = register and select the right light projection to use via compare/dot = product) And store the shadow factor... =20 When you said to store shadow factor in r, g or b channel, you mean that = the different shadow factor must not be blend together and should be = left separated Until they are use for lighting calculation ? So in the above = description, spot light should be render in r channel and cascaded in g, = then at lighting do two texture fetch ? And I not understand why shadow collector is the z-prepass, don't you = need to do a z-prepass before to render in the shadow collector, You can save a lot of compare and texture fetch or I missed something ? =20 Thanks for your help. =20 Lagarde S=E9bastien Software engineer Neko entertainment =20 =20 ________________________________ De : gda...@li... = [mailto:gda...@li...] De la part de = Wolfgang Engel Envoy=E9 : mercredi 4 avril 2007 14:34 =C0 : 'Game Development Algorithms' Objet : Re: [Algorithms] Deferred shadow mask generation =20 Oh and the shadow collector pass is the Z pre-pass ... =20 From: gda...@li... = [mailto:gda...@li...] On Behalf Of = Lagarde S=E9bastien Sent: Wednesday, April 04, 2007 4:55 AM To: gda...@li... Subject: [Algorithms] Deferred shadow mask generation =20 Hello,=20 I heard that the Crytech engine2 use a specific technique they call = "deferred shadow mask generation" for blend all shadow buffer in one = shadow buffer Then practice a "smart blur" on it to get soft shadows. This mask is then reuse later to render shadow in the scene. =20 Anyone heard about a similar technique like this or have some = information on how to gather many shadow buffer in one ? =20 Thank you. =20 Lagarde S=E9bastien Software engineer Neko entertainment =20 =20 |