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
1
vote
1 answer

Trying to render to several textures to implement deferred rendering. But all textures are equal

So I'm trying to implemtent deferred rendering in opengl. To do so I create a FBO which renders to 3 textures (one for position, one for normal, one for material info) however since I'm not finished the 3rd texture is instead just the final color of…
User
  • 35
  • 4
1
vote
1 answer

OpenGL Deferred rendering static?

I'm trying to implement deferred rendering in my engine but I'm having some problems. It seems that there is some static in the triangles being drawn. Here is the drawing code: // GEOMETRY PASS gbuffer->BindForWriting(); //…
Ricardo Antunes
  • 397
  • 2
  • 11
1
vote
0 answers

Rectangular area light specular factor following Epic's SIGGRAPH 2013 notes

I'm trying to implement area lights following Epic's notes from SIGGRAPH 2013. They provide a method for a tube area light which I have already implemented and it's working. Now I'm trying to implement rectangular area lights as well, following a…
zeb
  • 1,105
  • 2
  • 9
  • 32
1
vote
1 answer

OpenGL Deferred Shading lighting not working properly

So this is my first time with Deferred Shading, and it's pretty fast and simple. Until I start to not get the expected results. The light behaves in a weird way, it's like the position texture is not right. (from top to bottom clockwise: (1)…
dcubix
  • 187
  • 2
  • 10
1
vote
0 answers

Gaussian blur on a single object

I have implemented a simple gaussian blur and combined it with deferred shading, and it works. When I'm trying to add another object to the scene the object is also affected by the blur, which is not what I'm looking for. Is it possible to make the…
Riggs
  • 99
  • 2
  • 9
1
vote
1 answer

Bypass classical deferred shading light volumes

I would like to "bypass" the classical light volume approach of deferred lighting. Usually, when you want to affect pixels within a pointlight volume, you can simply render a sphere mesh. I would like to try another way to do that, the idea is to…
Qzaac
  • 159
  • 1
  • 8
1
vote
1 answer

Deferred context do not fill D3D11_MAPPED_SUBRESOURCE size

I have a 3D application that use 4 thread with one deferred context each one. The problem is that when I use the deferred context to map (ID3D11DeviceContext::Map) the resource, the variables RowPitch and DepthPitch are equal to 0. I get the pointer…
1
vote
2 answers

Parsing THREE.js json mesh format normals errors

EDIT: Demo finally online: http://bharling.github.io/deferred/index.html use the dropdown to switch to torus models to see the problem live. NOTE: requires Webgl MRT extensions. I've been in the process of developing my own deferred rendering engine…
bharling
  • 2,800
  • 1
  • 18
  • 25
1
vote
1 answer

Deferred shading, store position or construct it from depth

I'm in the middle of implementing deferred shading in an engine I'm working on, and now I have to make a decision on whether to use a full RGB32F texture to store positions, or reconstruct it from the depth buffer. So it's basically a RGB32F texel…
Mehdi
  • 582
  • 4
  • 14
1
vote
0 answers

GLSL Deferred Rendering can only output RGBA

I´m trying to do some shadows but the shader only outputs values if I use: layout (location = 0) out vec4 outColor; It doesnt work with vec3 or less. You can check my texture properties here: shadowTextureProperties.setHasMipMap(false); …
bitQUAKE
  • 473
  • 1
  • 8
  • 19
1
vote
0 answers

Issues with subsequent texture read and write

In my rendering pipeline (OpenGL 3.3 core), I have a following cycle (pseudo-code): for 1..n: render to texture T bind texture T render to back buffer (with texture T sampled in the fragment shader) When n=1, everything is OK. However, when…
Lukas Z.
  • 483
  • 6
  • 14
1
vote
1 answer

Stencil buffer and deferred rendering using OpenGL and GLSL

I'm wondering one thing concerning the usage of stencil buffer in a deferred rendering context: do all the fragment shaders on screen space is used within the 'occluded' area ? Here's an example for the website…
user1364743
  • 5,283
  • 6
  • 51
  • 90
1
vote
0 answers

Reconstruct 3D world position from Depth

I'm trying to develop a deferred render on my own webGL engine. I have everything ready to calculate the lightning but I can't reconstruct the position from the depth buffer properly... Right now, I'm trying to do the calculations out of the shader…
MaDowen
  • 115
  • 1
  • 1
  • 9
1
vote
1 answer

OpenGL multiple render targets and multisampling

I am having problems using explicit multisampling when using multiple rendering targets in OpenGL. I have 4 render targets (Position, Diffuse + opacity, Normal, Specular + exponent) that are rendered to during the initial geometry pass. These are…
sangwe11
  • 123
  • 6
1
vote
1 answer

How to render multiple objects with deferred rendering?

Well i have looked in many places and i cant find a solution to the problem, i want to render each object at the same time in a multi threaded rendering environment, or deferred rendering as many people call it. My current system does not work at…
Anonixis
  • 11
  • 1