Page MenuHome

High Quality DOF Glitches when GFX Card does not Support it- Intel Cards
Closed, ArchivedPublic

Description

System Information
Arch Linux - Intel HD Graphics 4000 - Nvidia GeForce 610m

Blender Version
Broken: Blender 2.74 997c0c8
Worked: 2.73

Short description of error
Testing the new features, AO and DOF in blender, then switch to view > camera and moving around the render region the image freeze , and trying to move the frame it re draws or display the image inside the render region

Example

Example 2

Exact steps for others to reproduce the error
go to view > camera - Rotate camera view or move the render region with shift + scroll button

Event Timeline

after some test i found that the bug is a result of the "high quality" DOF option

Can't confirm that but looks like another issue caused by poor Intel graphics cards/drivers. Could you start blender from the blender-softwaregl? Will be slow but shows us if this may come from the drivers or not.

Julian Eisel (Severin) lowered the priority of this task from 90 to 30.

Yes, the technique requires quite a few extensions to work, I should probably make sure they are present before allowing the use of high quality.

can confirm

INtel HD4600

got to hate intel card :{

Run blender from command line with blender -d. Are there any messages?

In any system that has the issue, if both have the issue and you can try it on both then that would definitely help.

I highly suspect that this issue is caused by crappy support of framebuffer objects actually, I'll add a few checks in the code so users can check

C:\Users\Aaron\Downloads\blender-2.74-997c0c8-win64 (1)\blender-2.74-997c0c8-win64>blender -d
Switching to fully guarded memory allocator.
Blender 2.74 (sub 1)
Build: 2015-03-21 03:18:19 Windows:64bit Release
argv[0] = blender-app.exe
argv[1] = -d
read file C:\Users\Aaron\AppData\Roaming\Blender Foundation\Blender\2.74\config\startup.blend
  Version 274 sub 0 date 1970-01-01 00:00 hash unknown

ordered
 OBCube
 OBLamp
 OBCamera
read file C:\Users\Aaron\AppData\Roaming\Blender Foundation\Blender\2.74\config\userpref.blend
  Version 274 sub 0 date 1970-01-01 00:00 hash unknown
Read new prefs: C:\Users\Aaron\AppData\Roaming\Blender Foundation\Blender\2.74\config\userpref.blend
AL lib: (EE) UpdateDeviceParams: Failed to set 44100hz, got 192000hz instead
found bundled python: C:\Users\Aaron\Downloads\blender-2.74-997c0c8-win64 (1)\blender-2.74-997c0c8-win64\2.74\python
Rock generator settings file found:
C:\Users\Aaron\Downloads\blender-2.74-997c0c8-win64 (1)\blender-2.74-997c0c8-win64\2.74\scripts\addons_contrib\add_mesh_rocks\add_mesh_rocks.xml
Rock Generator: Numpy found.
read file
  Version 262 sub 3 date 1970-01-01 00:00 hash
read file
  Version 268 sub 5 date 1970-01-01 00:00 hash
ED_undo_push: Outliner click event
GPUShader: compile error:
===== shader string 1 ====
 1  #version 130
===== shader string 2 ====
 1  #extension GL_ARB_texture_query_lod: enable
 2  #extension GL_EXT_geometry_shader4: enable
 3  #extension GL_EXT_gpu_shader4: enable
 4  #extension GL_ARB_draw_instanced: enable
===== shader string 3 ====
 1  #define GPU_INTEL
 2  #define BUMP_BICUBIC
===== shader string 4 ====
 1  #define PERSP_MATRIX
 2  #define SECOND_PASS
===== shader string 5 ====
 1  uniform ivec2 rendertargetdim;
 2  uniform sampler2D colorbuffer;
 3
 4  uniform vec2 layerselection;
 5
 6  uniform sampler2D cocbuffer;
 7
 8  /* initial uv coordinate */
 9  varying in vec2 uvcoord[];
10  varying out vec2 particlecoord;
11  varying out vec4 color;
12
13
14  #define M_PI 3.1415926535897932384626433832795
15
16  void main(void)
17  {
18      vec4 coc = texture2DLod(cocbuffer, uvcoord[0], 0.0);
19
20      float offset_val = dot(coc.rg, layerselection);
21      if (offset_val < 1.0)
22              return;
23
24      vec4 colortex = texture2DLod(colorbuffer, uvcoord[0], 0.0);
25
26      /* find the area the pixel will cover and divide the color by it */
27      float alpha = 1.0 / (offset_val * offset_val * M_PI);
28      colortex *= alpha;
29      colortex.a = alpha;
30
31      vec2 offset_far = vec2(offset_val * 0.5) / vec2(rendertargetdim.x, rendertargetdim.y);
32
33      gl_Position = gl_PositionIn[0] + vec4(-offset_far.x, -offset_far.y, 0.0, 0.0);
34      color = colortex;
35      particlecoord = vec2(-1.0, -1.0);
36      EmitVertex();
37      gl_Position = gl_PositionIn[0] + vec4(-offset_far.x, offset_far.y, 0.0, 0.0);
38      particlecoord = vec2(-1.0, 1.0);
39      color = colortex;
40      EmitVertex();
41      gl_Position = gl_PositionIn[0] + vec4(offset_far.x, -offset_far.y, 0.0, 0.0);
42      particlecoord = vec2(1.0, -1.0);
43      color = colortex;
44      EmitVertex();
45      gl_Position = gl_PositionIn[0] + vec4(offset_far.x, offset_far.y, 0.0, 0.0);
46      particlecoord = vec2(1.0, 1.0);
47      color = colortex;
48      EmitVertex();
49      EndPrimitive();
50  }
WARNING: 1:3: '#extension' :  'GL_EXT_gpu_shader4' is not supported
ERROR: 4:9: 'vec2' : syntax error syntax error

and the error repeats itself

Antonis Ryakiotakis (psy-fi) changed the task status from Unknown Status to Resolved.Mar 23 2015, 7:26 PM

High quality is only supported for GL 3.0+ GPUs. Added check that will fall back to low quality for now. 1bee77b77ad625111489e4d44531e8fdc5107e7c

If issue persists please notify here.

is this because it says "WARNING: 1:3: '#extension' : 'GL_EXT_gpu_shader4' is not supported
"

By the way, looks like issue of original reporter is caused by his system using the Intel card (check the system_info.txt file generated from the help menu of blender to check which GPU is used in your system).

Intel may not support it but the NVIDIA does, make sure you have setup your optimus system correctly.

I Googled it and found that intel does support GL_EXT_gpu_shader4 Link And this is and onld artical probaly before intel hd 4600 so these cards should have these capabilities

Then you obviously need to update your driver. Your System_Info.txt file should have all the info you need there

i also read that it requires opengl 3.0 but blender does not use that?

Now it does. It's just that people don't understand the notion of extensions.

Antonis Ryakiotakis (psy-fi) changed the task status from Resolved to Unknown Status.Mar 25 2015, 1:05 PM

Reopening, this should work

Can you try a build tomorrow and tell me if the error is gone for you now?

Did you build your own version? buildbot still doesn't include the fix.

@Aaron Carlisle (Blendify), well then try again using latest buildbot. It should now include the fix.

just did and isnt this the same as T44056

Probably, but his GPU is different...we mixed the reports a bit so let's keep your issue focused here (don't close the other issue!). Probably solving your issue will solve the other one too, but we are not sure if this is a duplicate yet.

Anyway, keep the Intel discussion here please.

BTW, @Aaron Carlisle (Blendify), it would really help if you could verify if T43987 happens with your GPU. It happens on my Intel HD3000 but would be interested to know if it happens with newer GPUs too. Thanks!

We would appreciate if you would stay connected in case we have more questions that we can not answer ourselves :)

Aaron Carlisle (Blendify) renamed this task from View > Camera - Image/Viewport Freeze to High Quality DOF Glitches when GFX Card does not Support it- Intel Cards.Mar 29 2015, 4:35 PM
Aaron Carlisle (Blendify) claimed this task.
Aaron Carlisle (Blendify) raised the priority of this task from 30 to Normal.

cant tell if this has been fixed or falling back on not high quality if it does not support it i think greying out the option is a better idea

tested on different computer

Windows 7-64 bit
Intel HD 3000

Changed it to greyed out in recent master.

Antonis Ryakiotakis (psy-fi) changed the task status from Unknown Status to Unknown Status.Mar 30 2015, 3:03 PM

I'm afraid I can't understand what the issue is with this shader.

The message is not clear enough and without access to an Intel GPU we can't really hope to solve this, since I'd have to do many compilations of the shader to see what works.
According to the specification there should be no error, so this is yet another driver quirk which we'll have to work around by figuring out what makes this specific driver reject the code.
It's possible that the "in" keyword before "vec2" confuses the driver but there is no other way to differentiate between geometry shader inputs and outputs.

Frankly, I have no idea what to try remotely without access to such a system.

I'll have to archive this for now and it might be fixed when I get my hands on such a GPU (or if another coder with it can figure out what the issue is). I'm willing to give directions to the files and code if someone can help with this.