Happenstance Posted January 24, 2018 Share Posted January 24, 2018 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.fxAvoids the expense and messiness involved with creating custom geometry that conforms to the underlying surface by just writing directly to the gbuffer. Quote Link to comment Share on other sites More sharing options...
Duion Posted January 24, 2018 Share Posted January 24, 2018 Can you translate that so normal people understand the benefit? Quote Link to comment Share on other sites More sharing options...
Happenstance Posted January 25, 2018 Author Share Posted January 25, 2018 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. Quote Link to comment Share on other sites More sharing options...
Duion Posted January 25, 2018 Share Posted January 25, 2018 That sounds too good to be true, what is the downside? Quote Link to comment Share on other sites More sharing options...
Happenstance Posted January 25, 2018 Author Share Posted January 25, 2018 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. Quote Link to comment Share on other sites More sharing options...
Duion Posted January 26, 2018 Share Posted January 26, 2018 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. Quote Link to comment Share on other sites More sharing options...
JeffR Posted January 26, 2018 Share Posted January 26, 2018 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.