Showing posts with label transparency. Show all posts
Showing posts with label transparency. Show all posts

Saturday, 20 November 2010

Water! Again!

I've been off discovering the joys of Bitbucket, but after some friendly discussion of various crazy rendering schemes I decided to do a litle shader work with respect to water rendering. The spare channels of the blur mask render target now store distortion and detail values, which are applied during the blur pass to add a bit more detail back into the freshly-blurred areas.

Looking a bit better than it was, I think, especially when the water is moving.



Yeah, the distortion values have a definite tendency to smear downwards, which is very visible in the image taken from a low camera angle. I'll work on that. Still, it's nice to have lit water that doesn't look too smeary.

Wednesday, 20 October 2010

Further Transparency

Particle systems using the new translucency-faking also work now.

So what do they do well?

  • Completely order independent
  • Lit (with fully deferred light sources)
  • Shadowed
  • One rendering method for all translucent objects

And what do they do badly?

  • Look like arse when the camera is inside the smoke volume
  • Perform like arse when the camera is near the smoke volume (fill rate bound? Yick!)
  • Hideous sharp edges to blurred regions
  • Blur is more obvious than transparent areas with low alpha
  • Alpha quantisation very visible at low alpha
Ugh. I'm not sure I like the balance of pro/con there.





A block of smoke using the technique. No approximated scattering yet, so light sources look a bit strange at present.

Monday, 18 October 2010

Status Update

And boom! New job, somewhere even further north and colder than Dundee. I've actually had the job for a couple of weeks now, but what with the chaos of moving and settling in I figured The Oblong could rest for a few days.

I've even updated the code a little bit in the interim.

See, I was getting really very annoyed at the way transparency doesn't work in my deferred shading system. I don't really need very much in the way of translucency support for the roguelike-like, just enough for some water and perhaps a few lit smoke-like effects. Seems like there should be a solution...

And lo, there was extremely crude hackery. Use a screen space stipple texture to do cheesy alpha-tested transparency and perform a chunky Gaussian blur over transparent areas as a post process. As ever: if in doubt, blur more.

I've managed to confuse my material parameters target somehow such that the specular is NaN-ing in my face, so I've temporarily hacked in constant specularity to preview the water a little better. Behold its being-illuminated-by-deferred-lights glory!


I've actually shrunk the image a bit, the blur is a bit more obvious in actual fact. Still, the blue, green and white lights are clearly visible in the water as wobbly specular highlights, and the water itself rendered as standard opaque, unsorted geometry into the render targets.

No, I don't know what's going on with the crazy purple highlight on the left. I think the tangents are a bit screwy there, and the glowing mushroom that's supposed to source the light is buried in the floor. Yaybugs!