Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Direct3D Rendering Cookbook
  • Table Of Contents Toc
Direct3D Rendering Cookbook

Direct3D Rendering Cookbook

4.1 (10)
close
close
Direct3D Rendering Cookbook

Direct3D Rendering Cookbook

4.1 (10)

Overview of this book

Table of Contents (19 chapters)
close
close
Direct3D Rendering Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1
Further Reading
2
Index

Implementing a screen-aligned quad renderer


Screen-aligned quads, also known as fullscreen quads, are a staple of deferred rendering techniques. They have traditionally been used to perform a range of screen-space operations, such as applying ambient lighting or implementing screen space ambient occlusion (SSAO), and provide a convenient method of addressing information within the G-Buffer.

Although image filtering and computation can be performed within compute shaders, the final result still needs to be presented to the screen, and this is usually through a screen-aligned quad. This recipe can be used where screen-space operations are required or visualization of textures is necessary.

How to do it…

We will begin by creating the vertex shader and its input and output structures. We'll then move onto creating the C# renderer class ScreenAlignedQuadRenderer:

  1. Begin with a new HLSL shader file, SAQuad.hlsl, including Common.hlsl for the PerObject constant buffer matrices and adding the following...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Direct3D Rendering Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon