Skip to main content
4 votes

Unity ignoring the deferred shader

Note that some of the functions used here have been deprecated in Unity 5.5, but I have tested it to work. In Unity 5.5, many changes have been made. The most significant, being that the dot product ...
TWickz's user avatar
  • 141
2 votes
Accepted

Deferred shadow mapping

Normally the 0.5 bias should have been included in the matrix (so I don't think it should be after the division by w) so this shouldn't appear: ...
unknown's user avatar
  • 192
2 votes
Accepted

What's the use and difference between Forward, Deferred and Physically Based Rendering?

First, I wouldn't consider PBR to be separate from forward or deferred rendering. You can use PBR in either forward or deferred rendering, as I understand it. Physically-based rendering just means ...
user1118321's user avatar
  • 2,632
2 votes

How do multiple render targets get rendered onto the back buffer(s) then screen?

The render targets become sampling textures for a final compositing pass shader rendering to the back buffer. The GPU doesn't do any automatic flattening. It all has to be done in a shader. Ping-...
Stephane Hockenhull's user avatar
2 votes
Accepted

Stencil pass in deferred rendering - far plane

Depth clipping can be disabled in other graphics APIs as well, this is a normal feature, so this is one way to solve the problem. You can draw front faces of light geometries when you are outside of ...
János Turánszki's user avatar
2 votes

Artifacts when trying to implement Cook-Torrance BRDF

When you see abrupt patches of black like these often the cause of this are NaNs (Not A Number) from divisions by zero. And then anything multiplied by an NaN will give an NaN or (almost) any other ...
Stephane Hockenhull's user avatar
2 votes

What are the alternatives to OpenGL arrays for deferred rendering?

You can send all the data that you want in a texture.
Yudrist's user avatar
  • 963
2 votes
Accepted

OpenGL Deferred Shading Pixelation

I used to get pixelated light when precision of gBuffer textures was low. Use GL_RGB16F or GL_RGB32F as internal format for position. Position can be reconstructed from depth texture like this, so no ...
some rand's user avatar
  • 118
2 votes
Accepted

Implementing a Deferred Renderer (Basic Understanding)

In short, there's nothing super special about a deferred renderer when it comes to drawing the initial scene. You just submit your triangles via VBs/IBs, state, and the ...
Chuck Walbourn's user avatar
1 vote
Accepted

error X3671: loop termination conditions in varying flow control cannot depend on data read from a UAV

The answer is effectively to use [allow_uav_condition] but in the right place what does not work is to place the condition before the if statement even if it is where I need it ...
philB's user avatar
  • 139
1 vote
Accepted

Optimizing a deferred renderer

Many hours of debugging later, and while looking at an unrelated problem, I noticed that for whatever reason, I configured all my G-buffers with RGBA_32F precision, ...
Twometer's user avatar
  • 121
1 vote

OpenGL color attachments don't work

Solved by replacing count of color channels of gPosition and gNormal to 4 (RGBA16F) as ...
Mihail Ris's user avatar
1 vote
Accepted

How to calculate normal from normal map in world space? (OpenGL)

When using a deferred rendering pipeline, your normal-mapping workflow is as follows: Writing to GBuffer: Vertex shader: Compute T, B, and N vertex properties. Multiply by normal matrix. Construct ...
Ian Young's user avatar
  • 2,649
1 vote

Correctly transforming normals for G-Buffer in Deferred Rendering

In the case of a deferred system, your pipeline is as follows: Compute projection matrix Compute view matrix Compute world to screen ( mat4 pm = projection * view )...
Ian Young's user avatar
  • 2,649
1 vote

Different lighting models in deferred rendering

One way to do it is to have 3 different shaders and simply using the one that you need at the time. There are a number of ways you can do this. You could have 3 separate files (or just strings in ...
user1118321's user avatar
  • 2,632
1 vote

Multi-pass rendering using FBO and combining resulting textures

The technique you seam to be referring to in your pseudo-code is deferred shading. It's a technique where you defer shading to a later stage by rendering to intermediary render targets and finally ...
CpCd0y's user avatar
  • 301
1 vote

Tiled deferred shading without compute shader

You can sort of fake it with a pixel shader, but it requires an extra pass. I don't claim this is a great approach, BUT it will work: Create two low-res render targets - say, 1/8th of your ...
3Dave's user avatar
  • 3,151
1 vote

Variance shadow maps don't want to render properly

Regarding cubemap seams, you can just filter across edges. See: glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); As far as your actual shadow quality, the entire benefit ...
GameGraph's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible