From: Gerrit V. <vo...@vo...> - 2013-05-14 06:16:34
|
Hi, On Mon, 2013-05-13 at 12:12 -0500, Carsten Neumann wrote: > Hello Stefan, > > On 05/13/2013 11:21 AM, Wagner, Stefan wrote: > > I extended the HDRStage with a custom gBuffer (position, normal) which I > > use for SSAO (I know overkill, but I need the gBuffer for other things > > as well). > > > > This works fine if I use this stage only but I’m running into problems > > if I try to combine this stage with the ShadowStage. My custom gBuffer > > gets cleared as soon as I enable the ShadowStage. > > > > I tried to enable combineblend and also attached a DepthClearBackground > > to the viewport, but that didn’t helped. Does anybody knows why? > > > > My layout is the following: > > > > ShadowStage -> CustomHDRStage -> VisitRenderTree > > my guess would be that the buffer gets cleared when generating the > shadow maps - for which ideally you'd want the HDRStage to be a no-op. > However, the HDRStage does not really have a good (any?) way of knowing > that it is being visited as part of a pass that renders shadow maps, so > I'm not sure what to suggest :( ok, I'm looking into it right now as Christoph still has the same problem. For the case with only shadow and hdr stage the setup should actually be the other way round, e.g. HDRStage -> ShadowStage -> Scene as the HDR stage is a simple postprocessor. I would expect it to run last in all cases. I'm nearly done so that the shadow stage respects the target buffer format set by a parent stage. I hope to commit this later today (latest tomorrow). Once this is done I will add our SSAO implementation and see how this best fits into it. Let me run some basic tests with this setup first so I get all the implication of the g-buffer part. I'll get back to you as soon as I have a little bit more information. kind regards gerrit |