Skip to main content
gamedev.net
🔒 Locked

using alpha testing with shadow maps

Started by Matt Aufderheide Dec 29, 2006 at 5:27 AM 1 replies 850+ views
Original Post
Matt Aufderheide
Matt Aufderheide
While its trivial to enable alpha testing in a shadow mapping algorithim, the problem comes when you want to a floating point render target that dosent have an alpha channel, like the D3D format R32F. This format is usually faster than somehting like A16B16G16R16F. If the render taget has no alpha channel, you cant use any kind of alpha testing or alpha blending when rendering to it. Is there anyway around this, to fake the alpha testing while still using a format like R32F ?
Schrompf
Schrompf
Not only can you use clip(), you have to. I too expected that the alpha value still gets compared against, even if the target texture has no alpha channel. But apparently it gets discarded earlier than that stage, the comparision always yielded true in my experiments. So you have to clip() the pixel yourself.

Bye, Thomas
----------
Gonna try that "Indie" stuff I keep hearing about. Let's start with Splatter.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.