Jump to content

Deferred Decals


Recommended Posts

Interesting technique for drawing decals in a deferred renderer:


and shader code:


Avoids the expense and messiness involved with creating custom geometry that conforms to the underlying surface by just writing directly to the gbuffer.

Link to comment
Share on other sites

Using Torque as an example, decals are rendered by creating a new mesh with geometry that conforms to whatever surface you're projecting them on. One of the problems with this method is it fails at extreme angles (think about a corner of a room where the walls meet the ceiling or a highly tessellated boulder) which will cause decals to warp or clip in weird ways.

With deferred decals you're essentially projecting the decal texture directly onto the screen so there's no extra geometry to create and no z-fighting or clipping issues to deal with.

Link to comment
Share on other sites

Yep, it's been the standing plan to support/use deferred decals. Mostly just been holding off on it until we wrapped PBR as that does some tweaks to the structure of the gbuffer.

Ideally both regular decals and the decal road utilize the deferred decals method both for consistency, and accuracy/speed.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...