<p>This might be not laser precision question but this issue appeared a long time ago when first trying to render some scene with 3D models in rasterisation renderer and apply some lighting, posprocessing etc.</p>

<p>Random squares:</p>

<p><a href="https://i.sstatic.net/XgquJ.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/XgquJ.gif" alt="enter image description here"></a></p>

<p>Sometimes it look like flooding model area:</p>

<p><a href="https://i.sstatic.net/4WWaw.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/4WWaw.gif" alt="enter image description here"></a></p>

<p>But it appears only on models loaded from file, sponza or any other.</p>

<p>So what could be the cause? Numerical errors in shaders? <code>NaN</code> or negative values? Anyone experiences this?</p>

<p>It's hard to explain because its quite random.</p>

CC BY-SA 3.0
2017-03-28T00:36:55.363Z
First of all, have you tries other computers and verified that it isn't your GPU that's the problem? Because I'm facing a similar problem, because my GPU is starting to get a few years behind it. Second of all. Any additional context would greatly help. Did you write the application? Reaching any limits? What does the shader look like? Checked for OpenGL errors?
vallentin
CC BY-SA 3.0
2017-03-28T02:36:40.477Z
I'd look at your post processing first, the black artefact at the start looks like it is being blurred each frame by something. Maybe you are rendering something into the wrong buffer somehow ?
PaulHK
CC BY-SA 3.0
2017-03-28T04:36:25.420Z
FWIW, I have seen issues like this when NaNs enter the pipeline, either by being passed from the CPU or being calculated on the GPU. I can't say whether that's your issue or not, but it did end up looking similar to this.
user1118321
CC BY-SA 3.0
2017-03-28T08:28:39.633Z
@Vallentin I have lots of shaders and framebuffers... that's why i didn't provide any code and in this code there are not many hints of anything.. . There was this issue when my renderer was forward, then I rewrited it to deferred, added some color attachments ping pong (to apply post effects, fog, light) and it worsen the condidtion. There are some gl errors (1280) when adding color attachments to framebuffers which I don't understand because they work at the end. Yeah I didn't check it on other computer. My GPU is quite new (gtx970)
mdkdy
CC BY-SA 3.0
2017-03-28T08:38:33.037Z
@PaulHK I'll check postprocess and btw white flashes in first gif are from eye adaptation effect. There is pass to calculate average luminance (downsample to 1x1) and these error values seem to confuse this.
mdkdy
CC BY-SA 3.0
2017-03-28T08:45:18.113Z
This is just a renderer done in free time to test some advanced graphic techniques, nothing pro.
mdkdy
CC BY-SA 3.0
2017-03-28T08:49:14.683Z
@PaulHK Yes increasing blur sigma is also increasing the size of squares, so artifacts get blurred.
mdkdy
CC BY-SA 3.0
2017-03-29T07:18:17.637Z
Do you have a method to visualise all your buffers individually ?
PaulHK
<opengl><rendering><glsl><rasterizer>
Artifacts (numerical errors?) in rasterisation renderer
mdkdy
# Artifacts (numerical errors?) in rasterisation renderer

(Asked by: username_0 on 2017-03-27)

This might be not laser precision question but this issue appeared a long time ago when first trying to render some scene with 3D models in rasterisation renderer and apply some lighting, posprocessing etc.

Random squares:

[![enter image description here](https://i.sstatic.net/XgquJ.gif)](https://i.sstatic.net/XgquJ.gif)

Sometimes it look like flooding model area:

[![enter image description here](https://i.sstatic.net/4WWaw.gif)](https://i.sstatic.net/4WWaw.gif)

But it appears only on models loaded from file, sponza or any other.

So what could be the cause? Numerical errors in shaders? `NaN` or negative values? Anyone experiences this?

It's hard to explain because its quite random.

**Tags:** opengl, rendering, glsl, rasterizer

> **Comments:**
> **username_1**: First of all, have you tries other computers and verified that it isn't your GPU that's the problem? Because I'm facing a similar problem, because my GPU is starting to get a few years behind it. Second of all. Any additional context would greatly help. Did you write the application? Reaching any limits? What does the shader look like? Checked for OpenGL errors?  
> **username_2**: I'd look at your post processing first, the black artefact at the start looks like it is being blurred each frame by something. Maybe you are rendering something into the wrong buffer somehow ?  
> **username_3**: FWIW, I have seen issues like this when NaNs enter the pipeline, either by being passed from the CPU or being calculated on the GPU. I can't say whether that's your issue or not, but it did end up looking similar to this.  
> **username_0**: @username_1 I have lots of shaders and framebuffers... that's why i didn't provide any code and in this code there are not many hints of anything.. . There was this issue when my renderer was forward, then I rewrited it to deferred, added some color attachments ping pong (to apply post effects, fog, light) and it worsen the condidtion. There are some gl errors (1280) when adding color attachments to framebuffers which I don't understand because they work at the end. Yeah I didn't check it on other computer. My GPU is quite new (gtx970)  
> **username_0**: @username_2 I'll check postprocess and btw white flashes in first gif are from eye adaptation effect. There is pass to calculate average luminance (downsample to 1x1) and these error values seem to confuse this.  
> **username_0**: This is just a renderer done in free time to test some advanced graphic techniques, nothing pro.  
> **username_0**: @username_2 Yes increasing blur sigma is also increasing the size of squares, so artifacts get blurred.  
> **username_2**: Do you have a method to visualise all your buffers individually ?  

---

## 0 answers

