Questions tagged [deferred-rendering]

a screen-space shading technique that defers shading until the second pass of rendering

In the field of 3D computer graphics, deferred shading is a screen-space shading technique. It is called deferred because no shading is actually performed in the first pass of the vertex and pixel shaders: instead shading is "deferred" until a second pass.

It is used in numerous popular games starting around 2010.

Advantages: easier resource and pipeline management

Disadvantages: hard to handle transparency, multiple materials, incompatible with anti-aliasing

Wikipedia: https://en.wikipedia.org/wiki/Deferred_shading

142 questions
10
votes
1 answer

World-space position from logarithmic depth buffer

After changing my current deferred renderer to use a logarithmic depth buffer I can not work out, for the life of me, how to reconstruct world-space depth from the depth buffer values. When I had the OpenGL default z/w depth written I could easily…
RamblingMad
  • 5,332
  • 2
  • 24
  • 48
9
votes
3 answers

Reconstructing world coordinates from depth buffer and arbitrary view-projection matrix

I'm trying to reconstruct 3D world coordinates from depth values in my deferred renderer, but I'm having a heck of a time. Most of the examples I find online assume a standard perspective transformation, but I don't want to make that assumption. In…
jbatez
  • 1,772
  • 14
  • 26
9
votes
1 answer

Deferred Rendering with Tile-Based culling Concept Problems

EDIT: I'm still looking for some help about the use of OpenCL or compute shaders. I would prefer to keep using OGL 3.3 and not have to deal with the bad driver support for OGL 4.3 and OpenCL 1.2, but I can't think of anyway to do this type of…
7
votes
3 answers

What is the difference between a ND-Buffer and a G-Buffer?

I'm noob at WebGL. I read in several posts of ND-Buffers and G-Buffers as if it were a strategic choice for WebGL development. How are ND-Buffers and G-Buffers related to rendering pipelines? Are ND-Buffers used only in forward-rendering and…
deblocker
  • 7,629
  • 2
  • 24
  • 59
5
votes
1 answer

Resolution of multi-sampled frame-buffer with multiple color attachments

Trying to implement Anti-aliasing on top of deferred shading, I'm attempting to use multi-sampled render buffers and then resolve the samples with a buffer-blit pass. As is traditional in deferred shading, I am rendering the scene with a dedicated…
5
votes
2 answers

deferred rendering - Renderbuffer vs Texture

So, I've been reading about this, and I still haven't found a conclusion. Some examples use textures as their render targets, some people use renderbuffers, and some use both! For example, using just textures: // Create the gbuffer…
Joao Pincho
  • 939
  • 2
  • 11
  • 26
4
votes
1 answer

Deferred rendering and moving point light

I know there are couple of threads on the net about the same problem but I haven't got help from these because my implementation is different. I'm rendering colors, normals and depth in view space into textures. In second I bind textures with…
Karmo Rosental
  • 653
  • 1
  • 8
  • 18
4
votes
1 answer

Deferred MSAA Artifacting

This is the process I go through to render the scene: Bind MSAA x4 GBuffer (4 Color Attachments, Position, Normal, Color and Unlit Color (skybox only. I also have a Depth component/Texture). Draw SkyBox Draw Geo Blit all Color and Depth Components…
Calum McManus
  • 250
  • 1
  • 9
4
votes
1 answer

Deferred renderer with light volumes produce strange banding

I have a deferred renderer that only calculates lighting equations when the current fragment is in range of a light source. I do this by calculating the size of a light volume in my application and send this with other light information to the…
ABHAY
  • 221
  • 2
  • 12
4
votes
2 answers

Under what conditions does a multi-pass approach become strictly necessary?

I'd like to enumerate those general, fundamental circumstances under which multi-pass rendering becomes an unavoidable necessity, as opposed to keeping everything within the same shader program. Here's what I've come up with so far. When a result…
Engineer
  • 8,529
  • 7
  • 65
  • 105
4
votes
0 answers

minimum/maximum depth of tile in opengl

I'm trying to implement tiled deferred rendering but I'm stuck on calculating min/max depth for each tile. I'm using compute shader for this. This is its complete code: #version 430 #define TILE_SIZE 32 layout (location = 0, rgba32f) uniform…
mezo
  • 423
  • 1
  • 7
  • 19
4
votes
3 answers

How exactly does deferred shading work in LWJGL?

I want to start a deferred shading project with GLSL , Java & openGl 1. How does a deferred rendering pipeline works, does it render the scene for each image? For example when I want to create a specular, blur and shadow texture, do I need to render…
bitQUAKE
  • 473
  • 1
  • 8
  • 19
4
votes
1 answer

reconstructed world position from depth is wrong

I'm trying to implement deferred shading/lighting. In order to reduce the number/size of the buffers I use I wanted to use the depth texture to reconstruct world position later on. I do this by multiplying the pixel's coordinates with the inverse…
Dr Bearhands
  • 303
  • 2
  • 11
4
votes
1 answer

Ogre3d / Deferred rendering / Point light

Im trying to set up deferred renderer using ogre compositor framework. I tried to implement a point-light shader (as a fullscreen quad effect, without attenuation or specular calculations) in the code below: Material that outputs deferred data to…
Anon
  • 1,274
  • 4
  • 17
  • 44
4
votes
1 answer

Visualizing the Stencil Buffer to a texture

I'm trying to put the stencil buffer into a texture for use in a deferred renderer. I'm getting other Color and Depth Attachments with glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textures[color1], 0); and the result…
Chase Walden
  • 1,252
  • 1
  • 14
  • 31
1
2 3
9 10