Re: [Algorithms] Decals and deferred rendering
Brought to you by:
vexxed72
From: Megan F. <sha...@gm...> - 2010-01-13 16:44:13
|
I'd also suggest G-Buffer, including blending. As far as the diffuse channel of the G-Buffer goes, the results will always be right (since decals are one of the few cases where you can guarantee sorting / not require depth peeling / etc), and as far as any lighting parameters, it "should" read right so long as the lighting parameters of your decal aren't grossly different from the surface being decalled. ... but for that reason, you would need to reign in your decals and keep them reasonable. A high-specular shiny decal thrown onto a low-specular muddy wall would look silly indeed unless it was hard-edged, given that the lighting properties will be entirely hard-edged. I'd wonder, though, if you couldn't mask the edge with a bit of alpha-blending even on those properties? So long as you're not changing any of the values that are rigid (ie. specular mul is probably safe, but any ID-buffer-esque data is not), you'd be able to mask the edges pretty nicely with the blend. So, again, you're seemingly safe so long as the lighting properties of your decal aren't grossly removed from that of the surface. Just depends what kind of game you're doing, really. Personally, I'd just make sure the decals matched, since that'd probably look better period, and bake them into the G-Buffer to allow the much-improved lighting, AO et al they'd get that way. -- Megan Fox http://www.shalinor.com/ |