Deferred Decals

Materials, textures, lighting, postfx
7 posts Page 1 of 1
Happenstance
Posts: 55
Joined: Sat Apr 11, 2015 9:08 pm
by Happenstance » Wed Jan 24, 2018 9:37 pm
Interesting technique for drawing decals in a deferred renderer:
http://martindevans.me/game-development ... ce-Decals/

and shader code:

https://github.com/martindevans/Myre/bl ... t/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.
Duion
Posts: 1133
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Thu Jan 25, 2018 12:37 am
Can you translate that so normal people understand the benefit?
Happenstance
Posts: 55
Joined: Sat Apr 11, 2015 9:08 pm
by Happenstance » Thu Jan 25, 2018 5:54 pm
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.
Duion
Posts: 1133
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Thu Jan 25, 2018 7:00 pm
That sounds too good to be true, what is the downside?
Happenstance
Posts: 55
Joined: Sat Apr 11, 2015 9:08 pm
by Happenstance » Thu Jan 25, 2018 9:03 pm
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.
Duion
Posts: 1133
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Fri Jan 26, 2018 3:02 am
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.
Online JeffR
Steering Committee
Steering Committee
Posts: 878
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Fri Jan 26, 2018 3:45 pm
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.
7 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests