Title: Odd diagonal feature Post by: Feline on June 09, 2013, 12:20:21 AM So I got myself a new laptop with Win7-64bit and Quadro K2000M graphics. 384 shaders, baybeee.
I went to github and downloaded 0.9.12b (I already had that, but just to make sure I get the newest of everything in the library) and when I fire it up it's pleasantly smooth and fast and ... has a diagonal drawn across it. Huh. I'll attach an example. Here's what I can figure out so far: - The diagonal is independent of camera settings - It appears with DE-Raytracer and with DE-Raytracer-v0.9.10 but not(!) with Fast-Raytracer - It disappears when I change BufferShader in 3D.frag to BufferShaderIFS I'm guessing there's something going on somewhere that results in a rounding error of some sort when coord.x equals coord.y (is there an atan(coord) somwhere? SOmething like that?) But for the life of me I can't figure out where that is. I have no idea why my (new, shiny, Kepler-based) graphics card should be susceptible to it while my dinky old GF7000M wasn't. Anybody have any ideas? Title: Re: Odd diagonal feature Post by: JohnVV on June 09, 2013, 05:12:24 AM Did you install the nvidia driver from the nvidia web site ?
for that card on win7 http://www.nvidia.com/object/quadro-tesla-grid-win8-win7-winvista-64bit-320.00-whql-driver.html Microsoft REMOVES MOST of the OpenGL code from the driver you get from "Auto-updates" It is an on going attempt to try to kill off OpenGL Title: Re: Odd diagonal feature Post by: Syntopia on June 09, 2013, 05:23:26 PM Here's what I can figure out so far: - The diagonal is independent of camera settings - It appears with DE-Raytracer and with DE-Raytracer-v0.9.10 but not(!) with Fast-Raytracer - It disappears when I change BufferShader in 3D.frag to BufferShaderIFS Anybody have any ideas? Interesting. Perhaps it has something to do with the offscreen buffer. Fast-Raytracer and BufferShaderIFS do not use the floating-point offscreen buffers ("#buffer RGBA32F"). What happens if you render a high-resolution image? I'm also a little bit curious about the screenshot. It appears that your buttons and graphics style is the old WinXP style. Are you using a special kind of skin? Also, how many frames per second do you get on the Mandelbulb when in continous mode? (hopefully a lot more than number on the screenshot indicates). Microsoft REMOVES MOST of the OpenGL code from the driver you get from "Auto-updates" It is an on going attempt to try to kill off OpenGL I really don't think that is the case. Where have you heard about this? Title: Re: Odd diagonal feature Post by: Feline on June 09, 2013, 10:29:42 PM Lessee: the buttons and such are just "Windows Classic" theme in "personalization". I don't go for the transparent and rounded-corner things that have been floating around for a while (XP is by default rounded-corner as well, but most people I know just revert back to Win98 style).
On the default Mandelbulb in continuous mode I get from 30 to 33 fps, depending on the direction I turn it to (and yet different numbers upon zooming, of course). Hi-res renders have the diagonal in each sub-panel, resulting in an apparent multiple diagonals across the image once it's re-assembled. The diagonal is always one pixel wide, independent of window size. I note that it's always from lower left to upper right corner, independent of aspect ratio (so the problem is not in object space). I'm using the driver than came with the laptop, but downloading the latest from Nvidia is probably not a bad idea, if only for good housekeeping. I'll report back if that changes something. (FP offscreen buffers, eh? Back in the eighties I once ran into a problem where some math failed depending on whether I approached zero from above or below because of an odd FP implementation that distinguished internally between "plus zero" and "minus zero" and failed to find them "equal". This long-buried memory was just triggered, and may have nothing to do with the case at hand...) Title: Re: Odd diagonal feature Post by: Syntopia on June 09, 2013, 10:56:52 PM Lessee: the buttons and such are just "Windows Classic" theme in "personalization". I don't go for the transparent and rounded-corner things that have been floating around for a while (XP is by default rounded-corner as well, but most people I know just revert back to Win98 style). Yep, they have been around for a while :-) Quote (FP offscreen buffers, eh? Back in the eighties I once ran into a problem where some math failed depending on whether I approached zero from above or below because of an odd FP implementation that distinguished internally between "plus zero" and "minus zero" and failed to find them "equal". This long-buried memory was just triggered, and may have nothing to do with the case at hand...) Yes, signed zeroes are required by the IEEE754 standard. However +0==-0 should be true :-) We can test the buffer thing: Code: #buffer RGBA32F Try using different buffer types and see if it matters. The ones with F are floating point buffers. Title: Re: Odd diagonal feature Post by: Feline on June 10, 2013, 05:42:49 AM Ever more interesting stuff.
None of the four types show the diagonal line. Including the 32F So I tried a few things from Example|2D and it's inconclusive. BurningShip and Ducks have the line, Droste and Game of Life do not. Graphplotter has it, Mandelbrot-DE doesn't. But Mandebrot has it. Huh. 16F led to a complaint: Unknown buffertype requested: RGBA16F. Type must be: NONE, RGBA8, RGBA16, RGBA32F Changing it to RGBA16 works. No line there either. I hadn't looked at it before at all, so I re-started the application and upon startup it tells me "This graphics card supports: ". With nothing following it. Hum. I went to Nvidia's webpage and downloaded the newest driver package (v320; the one that came installed on this laptop was v296). Installed it, restarted, no change: the line is still there and it still tells me this card supports " " In MandelbrotOrbitTrap I realized that it has a line in the default version that uses Progressive2D, but when I change that to the simple 2D and rebuild then the line vanishes. PenroseTiles does not have a line and it uses "2D" - when I change it to "Progressive2D" the line appears. Thorn uses Progressive2DJulia and has the line. The line vanishes when I change this to "2DJulia" (and use Antialiasing instead). Just as with Fast-Raytracer, this suggests the bug is somewhere in the progressive code, I guess. Keep the ideas coming, everybody :-) Title: Re: Odd diagonal feature Post by: Syntopia on June 10, 2013, 09:32:36 PM Hmmm... Mandelbrot-DE also use progressive2D rendering, doesn't it?
Try the example again with progressive rendering: Code: #buffer RGBA32F Title: Re: Odd diagonal feature Post by: Feline on June 10, 2013, 10:34:39 PM Actually, Mandelbrot-DE uses 2D.frag, not Progressive2D.frag.
The new example looks weird: three quadrants are black, the upper right is reddish and it does have the white line. When I hit "continuous", the outer half of that upper right quadrant turns black as well, but the white line is still there. I think the problem is the trig functions in "color" that go negative. I get all four quadrants appropriately colored (and a nice white diagonal) if I add one to gl_FragColor: gl_FragColor =prev+vec4(color,1.0)+1; but it is unclear to me why this didn't trip things up with the previous example... (Edit) in this second example, when I change RBGA32F to RGBA16, nothing is black - it's all nicely colored. However, it all changes scale when I hit "continuous" (or when I drag another window in front of it). And it does still have the same white diagonal line. Title: Re: Odd diagonal feature Post by: Feline on June 12, 2013, 10:42:09 PM Now here's another surprise on the same front.
For experiment's sake, I tried the second example (from June 10) on my "real computer": a seven-year-old dual-xeon that isn't particularly good at anything except that it has a Tesla-C2070 in it. Mainly I wanted to verify that, indeed, 3/4 of the display starts out black and, indeed, the scaling of the image changes when I switch to "continuous". I.e. that there's a problem with the .frag file, not with the laptop. And indeed, all this came up exactly as described previously, except that it didn't have that odd diagonal line. Just to verify the rest, I changed #buffer RGBA32F to #buffer RGBA16 and indeed the whole screen is now reddish-yellow and indeed it still changes pattern-scale when I hit "continuous" BUT(!) I do now also see the diagonal line on this completely different graphics card (two year old, Fermi architecture, 448 cores, vs my laptop's brand-new, Kepler architecture, 384 cores). This means whatever bug there is in the accumulating shader code was there all along - just obscured by whatever Fermi cores do differently in the floating point arena from Kepler cores... Could someone out there try this and confirm or deny that indeed the code snippet syntopia posted on Jun-10 in this thread, when put into a .frag file and opened in fragmentarium, creates a thing diagonal line on the screen in the upper right quadrant IF the first line is changed as noted above? Title: Re: Odd diagonal feature Post by: cKleinhuis on June 12, 2013, 10:54:33 PM this is how it looks with RGBA16 and continous:
i am using a radeon hd 6800 graka Title: Re: Odd diagonal feature Post by: elphinstone on June 13, 2013, 10:03:18 AM GTX 680, driver 314.22 - I confirm I have a diagonal from the bottom left to the top right corner.
Title: Re: Odd diagonal feature Post by: Syntopia on June 13, 2013, 05:57:45 PM I tried Fragmentarium on a Geforce 570GTX and found that I also get the diagonals when using RGBA16.
I manage to reduce the code to BufferShaderX.frag Code: #vertex MainShader.frag Code: #buffer RGBA16 So the error is not in the shader code. The error only happens when I read from a integer based texture (RGB8, RGB16) and only when sampling the alpha channel. My guess is that the full-viewport quad I'm drawing is converted into triangles, and that the Geforce Fermi cards does some kind of manipulation near the edges (interpolation, alpha-blending, MSAA supersampling?). The Keppler cards probably do the same in floating-point mode to. Title: Re: Odd diagonal feature Post by: eiffie on June 13, 2013, 08:05:15 PM If you calculate the coords in the fragment shader does it go away?
Title: Re: Odd diagonal feature Post by: vinz on June 13, 2013, 08:40:24 PM Dunno if it can help anyway : here GTX 580 drivers 310.90 on winx64
and no diagonal issue. Title: Re: Odd diagonal feature Post by: Syntopia on June 13, 2013, 09:45:49 PM I convinced myself this is a dual triangle edge problem. I have created a new build where I render to buffer using a single (larger-than-viewport) triangle instead of a quad. Please try it, to see if it solves the problem:
http://hvidtfeldts.net/Fragmentarium-Triangle.zip (Replace the fragemtarium.exe with the one in this zip). Title: Re: Odd diagonal feature Post by: Feline on June 14, 2013, 06:11:09 AM Nope - I still get the diagonal line with the "triangle" version. Dang.
Meanwhile, just to keep y'all on your toes, I dug up an older version (0.8.0) and lo: I do NOT get a diagonal line in that one. I guess that's consistent with the fact that I think I only get that line in any of the accumulating ("progressive") raytracers, which 0.8.0 didn't have (FWIW: eiffieGI.frag has that line as well) Title: Re: Odd diagonal feature Post by: Syntopia on June 14, 2013, 11:54:03 PM I tried again
Nope - I still get the diagonal line with the "triangle" version. Dang. Meanwhile, just to keep y'all on your toes, I dug up an older version (0.8.0) and lo: I do NOT get a diagonal line in that one. I guess that's consistent with the fact that I think I only get that line in any of the accumulating ("progressive") raytracers, which 0.8.0 didn't have (FWIW: eiffieGI.frag has that line as well) I tried again on the 570GTX and yep, the line is still there. So much for my hypothesis. Some more digging around: I can write 1.0 to all channels in my texture, e.g.: gl_FragColor =vec4(1.0); But when I read from it: vec4 tex = texture2D(frontbuffer, vec2(x,y)); the alpha channel (tex.a) is 0.5, not 1.0 - but only if I sample on the diagonal (x==y), and only if the buffer type is 8-bit or 16-bit integer, and only for the alpha channel. Title: Re: Odd diagonal feature Post by: Syntopia on June 15, 2013, 12:43:38 AM Feline, could you try this one?:
http://hvidtfeldts.net/Fragmentarium-Triangle2.zip Title: Re: Odd diagonal feature Post by: marius on June 15, 2013, 04:37:42 AM I tried again I tried again on the 570GTX and yep, the line is still there. So much for my hypothesis. Some more digging around: I can write 1.0 to all channels in my texture, e.g.: gl_FragColor =vec4(1.0); But when I read from it: vec4 tex = texture2D(frontbuffer, vec2(x,y)); the alpha channel (tex.a) is 0.5, not 1.0 - but only if I sample on the diagonal (x==y), and only if the buffer type is 8-bit or 16-bit integer, and only for the alpha channel. Offset the reading position by vec2(0.5/xres, 0.5/yres) to sample the middle of the texels? But, yeah that sounds suspicious with the whole texture all 1.0. Not a normal texel edge sampling issue. Title: Re: Odd diagonal feature Post by: Feline on June 15, 2013, 05:24:11 AM Ahh! Excellent. With the "Triangle2" version, I do not get that line any more. Hooray!
So what solved it? (And major kudos for the customer service here: I gripe about it on a forum and a few days later it's fixed. Wish most companies out there were as responsive as that...) Title: Re: Odd diagonal feature Post by: Syntopia on June 15, 2013, 09:26:46 AM Ahh! Excellent. With the "Triangle2" version, I do not get that line any more. Hooray! So what solved it? Well... It turns out the the "Triangle" version, was actually still using the old two triangle approach to draw the quad. I had reverted the code to test whether the new single triangle approach was slower, and then I uploaded the wrong version :-) So it was an issues along the edges of two triangles. I believe I have disabled all blending and disabled MSAA, so I not sure what caused it, but at least I have a workaround. Offset the reading position by vec2(0.5/xres, 0.5/yres) to sample the middle of the texels? But, yeah that sounds suspicious with the whole texture all 1.0. Not a normal texel edge sampling issue. Yes, I also thought about that, but I'm not sampling near the edges of the texture - the problem was along the diagonal. Title: Re: Odd diagonal feature Post by: knighty on June 15, 2013, 02:49:53 PM A silly question :spgloomy: :
What happens if one goes to NVidia's configuration pannel and set in 3D parameters the option "let the 3D application take the decision" (or so, I have it in french)? I say that because I suspect that the application settings (like anti-aliasing) are overrided by the CG drivers by default. Title: Re: Odd diagonal feature Post by: Syntopia on June 15, 2013, 10:45:30 PM A silly question :spgloomy: : What happens if one goes to NVidia's configuration pannel and set in 3D parameters the option "let the 3D application take the decision" (or so, I have it in french)? I say that because I suspect that the application settings (like anti-aliasing) are overrided by the CG drivers by default. A good question. I tried restoring my drivers settings to default, and with my drivers at least, the default setting is: "Anti-Aliasing mode: Application Controlled". Interestingly the drivers allow you to enable FXAA and even screen space ambient occlusion. I tested this on a couple of scientific OpenGL applications after setting the Anti-Alias mode to overwrite the application settings, but nothing seemed to happen. Perhaps these are Direct3D only. Title: Re: Odd diagonal feature Post by: Feline on June 22, 2013, 11:42:58 PM Finally having some time to tinker over the weekend, I find that the "workaround version" introduces a bug somewhere in the vicinity of "uniform float time;".
As a simple test, open Examples|DrosteGrid.frag and hit "continuous". In the regular version of Fragmentarium.exe this animates the spiral. In the "fixed version" ("Triangle2"?) there is no animation. In the same vein, I seem unable to animate anything else either. Still more work to do for Syntopia, I fear... :evil1: Title: Re: Odd diagonal feature Post by: Kali on June 23, 2013, 01:14:28 AM The older versions of Fragmentarium used "continuous mode" to animate time variable, but now it's used for progressive renders (backbufferCounter variable)... you must use the "animation" render mode instead. If you want continuous animation mode, set a large amount of seconds and let it play. However, I must say that I miss the quick continuous animation function at one click.
Title: Re: Odd diagonal feature Post by: Feline on June 23, 2013, 01:48:09 AM But the regular 0.9.12b does still have the regular animation via "time - or are there multiple versions of 0.9.12b?
The version that I downloaded just two weeks or so ago sure seems to animate in "continuous" mode for Examples|2D|DrosteGrid or Examples|2D|DomainDistortion. I do understand that some of the newer raytracers do progressive accumulation - and that's fine with me. If I want to use continuous mode for on-screen animation I just use one of the older ones like FastRaytracer (Or, really, my own - that was what was called "DE-Raytracer" in 0.8 and has since been hacked up into unrecognizability). Except that it looks to me as if time doesn't progress in the recent workaround version (from Jun-15). Or am I completely misunderstanding something somewhere... :hmh: Title: Re: Odd diagonal feature Post by: Kali on June 23, 2013, 02:44:23 AM You are right, 0.9.12b version animates via "time" variable in continuous mode, this another version 0.9.12 (without the "b") that I'm currently using works like I mentioned, because it has the support for rendering animations using progressive renders (in previous versions you must use old raytracers to animate).
Title: Re: Odd diagonal feature Post by: Feline on June 23, 2013, 03:31:51 AM Ohhh - yet another wrinkle I didn't know about. Indeed - in "animation" mode time seems to flow just fine. Man - every time I think what I'm doing I realize I'm just scratching the surface...
Title: Re: Odd diagonal feature Post by: Kali on June 23, 2013, 04:29:33 AM Don't worry, it seems like as humans, we are doomed to always scratching surfaces, revealing different layers but never reaching the core.
Sorry, totally off-topic, this is not the philosophy section ;D Title: Re: Odd diagonal feature Post by: Syntopia on June 23, 2013, 04:30:34 PM The current four rendering modes in Fragmentarium is a mess.
I need something that the able to support both progressive rendering, animated rendering, and even animated progressive rendering. Some animations may be driven by the 'time' variable, and some simply by flipping the buffers (for instance the game-of-life or RD type systems). I'm thinking of having just two different rendering modes buttons: [Progressive (subframe)] and [Animation (time)] In Progressive mode a 'subframe' integer uniform is incremented (previously known as the 'backBufferCounter'), and time is kept fixed. In Animation mode, the 'time' variable is a uniform float with time in (fractional) seconds (same as now). The 'Animation' controller window (the timeline window) would be removed. Instead a new 'Timeline' windows could be spawned from the application menu. Rendering an animation would need to be done from the 'High-resolution render' window, where progressive rendering could be enabled, and the FPS could be set. Image size The image output size is also clumsy. I'm thinking of having some top-panel widgets, where you could specify buffer size in pizels (or keep it synchronized to the current viewport size), e.g: Buffer size: x: 640px Y: 400:px [Lock to view size] Where [Lock to view size] is a drop-down menu, with the following options: [Lock to 1/2 view size, Lock to 1/4 view size, Lock to 1/6 view size, Preview tile (2x), Preview tile (4x), Preview tile (6x), Custom] The custom size should be able to have different aspect ratio than the view, but should not be allowed to be larger than the view - hires images still need to be 'tile' rendered in order not to time out. The 'Tile Preview' and 'Preview' sliders could then be removed. Title: Re: Odd diagonal feature Post by: Crist-JRoger on May 01, 2016, 08:32:32 AM My friend has the same diagonal line at nvidia quadro 4000. Fragmentarium 1.0.0. Tried other versions. "Triangle2" version link is broken. How fix this problem? |