Sign in to follow this  
kRogue

shadow maps and resolution.

Recommended Posts

kRogue    100
Hi all, as I consider implementing shadows via shadow mapping, one importnat question comes up: at what resolution do people advise for the (projective) texture associated to a light? I want to avoid the visual artifacts of "block-like" shadows... and I imagine this can get worse if an occulder is very near the light source.... also, another question: for those that have been playing with implenting shadows, what is you preferred technique? my thoughts are as follows: shadow mapping: 1) relativaly easy to implement, adds one extra rendering pass per light (but at possibly) lower resolution. For that pass, one chooses the possible occuluders by incluing them in the rendering from the light point of view. Downside: low resolution of texture of shadow maps gives very blocky shadows... shadow volumes via stencil: 1) adds an extra two geometry passes per light per possible light occuluder... each pass at same resolution of one rendering... possible murder on fill rate becuase of lots of stencil buffer manipulations.... One question: is there a way to do these "extra" shadow rendering passes at a _lower_ resolution.. my thinking is that one renders the full scene at full resoultion (without shadows) and then when we have to do the shadow business, I want to render at a much lower resolution... I am not too sure on how to do this nicely.. one way (I think) is as follows: Render all stuff (ie color, special effects, shaders of all geometries)at full resolution. Then do glCopyTexImage2D on the depth buffer and color buffer. do glClear. the draw the depth texture to the depth buffer to a _subscreen_ of the whold mess... ie. draw a quad, that covers only part of the screen. Then do the stencil shadow stuff on only this area of the screen, at the end of it, copy the color buffer of the zone one drew into a texture via glCopyTextImage2D, then blend that texture over the whole scene... my worries are that a) minor mismatching as the textures get rescaled and b) what kind of filtering should one use for drawing the depth texture to the screen (at lower resolution) and what kind of filtering one should use when drwing the "shadow" quad to the screen.. any thoughts?? Best Regards

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this