Jump to content

Recommended Posts

Posted

Interesting technique for drawing decals in a deferred renderer:

http://martindevans.me/game-development/2015/02/27/Drawing-Stuff-On-Other-Stuff-With-Deferred-Screenspace-Decals/


and shader code:


https://github.com/martindevans/Myre/blob/master/Myre/Myre.Graphics.Content/Decal.fx


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

Posted

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.

Posted

Not many, at least as far as I know. They can create edge artifacts in certain cases and might be tricky to use with baked light depending on how it's done.


Apparently Andrew implemented these in Torque6. Think I'll look around and see if there's something that can be ported over.

Posted

Well artifacts exist with the common method as well, but baked lighting may be an issue in case someone wants to have that in his project, but this is probably rare.

Posted

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.

Join the conversation

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

Guest
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...