grahamrow / Muview2

3D visualization of micromagnetic simulation data from Mumax or OOMMF
GNU General Public License v2.0
41 stars 8 forks source link

Rendering glitches #3

Closed barnex closed 5 years ago

barnex commented 10 years ago

This rendering glitch occurred for me with m000000.ovf obtained from mumax/3/test/standardproblem4.txt (I will mail you the file). Only present when rendering vectors.

screenshot from 2014-02-14 09 28 03

Edit: this was on Linux (obviously) and only occurs when rendering on my intel graphics. Nvidia does it fine.

grahamrow commented 10 years ago

Looks cool! Does it complain about loading the shaders? Could you send the OpenGL debug info written to terminal? This modern OpenGL stuff is really a headache!

barnex commented 10 years ago

There's not much to see here:

VENDOR: Intel Open Source Technology Center RENDERDER: Mesa DRI Intel(R) Ivybridge Mobile VERSION: 3.1 (Core Profile) Mesa 9.2.1 GLSL VERSION: 1.40 QBackingStore::flush() called with non-exposed window, behavior is undefined QBackingStore::flush() called with non-exposed window, behavior is undefined QBackingStore::flush() called with non-exposed window, behavior is undefined QBackingStore::flush() called with non-exposed window, behavior is undefined QBackingStore::flush() called with non-exposed window, behavior is undefined QBackingStore::flush() called with non-exposed window, behavior is undefined QBackingStore::flush() called with non-exposed window, behavior is undefined QBackingStore::flush() called with non-exposed window, behavior is undefined

grahamrow commented 10 years ago

Hmmm... I only have a discrete graphics card (on which the file you sent renders fine). What happens if you change to the boring fragment shader (line 218 in glwidget_assets.cpp):

-- result = result && vect.shader.addShaderFromSourceFile( QOpenGLShader::Fragment, ":/shaders/diffuse.frag" ); ++ result = result && vect.shader.addShaderFromSourceFile( QOpenGLShader::Fragment, ":/shaders/standard.frag" );

barnex commented 10 years ago

Using the standard fragment sharder instead of diffuse indeed seems to solve it.

On 2014-02-14 16:16, Graham Rowlands wrote:

result = result && vect.shader.addShaderFromSourceFile( QOpenGLShader::Fragment, ":/shaders/standard.frag" );

grahamrow commented 10 years ago

It looks like I'll be added a number of fallback options, such as using basic shaders. Probably I'll reintroduce my old OpenGL 1.2 code for backwards compatibility...

grahamrow commented 10 years ago

I get this same sort of issue occasionally on an AMD Radeon 5770 card. I'm still planning on adding a compatibility option...