Author Topic: ObjReader FBO & PP  (Read 28818 times)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: ObjReader FBO & PP
« Reply #135 on: June 10, 2019, 01:19:02 pm »
post #130 updated with new color set to show the status.
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: ObjReader FBO & PP
« Reply #136 on: June 10, 2019, 01:33:12 pm »
!!! THANKS AGAIN !!!

The remaining faulty shaders are more difficult to debug in the absence of HW to test on; I'll do it as time permits. :)

Now, one more question (apart from my still unanswered question in post #132).

I'd like to set a task for you related to your wonderful overlays like in the lighting editor. I need time to prepare a decent Technical Specification and a set of mock-ups for you to clearly understand my vision.

I think it will greatly improve our existing UI and be a nice addition to the features in our future OR v3.0.

In principle, do you feel like making another coding effort? I think this time it's going to be an absolute, 100% guaranteed success. :)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: ObjReader FBO & PP
« Reply #137 on: June 10, 2019, 01:47:16 pm »
Quote
In principle, do you feel like making another coding effort? I think this time it's going to be an absolute, 100% guaranteed success
No problem my friend  8)

Quote
Do you believe now you nVidia may be failing? :-\
It is not failing, just jerky ;)
« Last Edit: June 10, 2019, 01:51:26 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: ObjReader FBO & PP
« Reply #138 on: June 10, 2019, 01:52:36 pm »
Great! :)

I think I can start with the specs and mock-ups this evening.

Now I have to "go to work" and earn me a couple of bucks for a living. See you again in the evening and thanks a lot for co-operation!
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: ObjReader FBO & PP
« Reply #139 on: June 10, 2019, 02:07:10 pm »
I have attached a screen shot of my nVIDIA parameters, to check with yours.


Could you send me these, thanks!
https://www.shadertoy.com/view/MsVfz1  NeonHex done
https://www.shadertoy.com/view/4sXBRn  Luminescence done (gorgeous!)
https://www.shadertoy.com/view/XldSDs  MoebiusObject done
https://www.shadertoy.com/view/lsBfDz  TinyClouds done

I want to see if TinyClouds works any better by me, and i would like to check Luminescence with Medusa.
« Last Edit: June 10, 2019, 02:38:46 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: ObjReader FBO & PP
« Reply #140 on: June 10, 2019, 06:44:21 pm »
Here they are with the new textures.

Re. TinyClouds, you'll see noticeable dither in the clouds' darker areas. It's due to the noise texture being mipmapped. To temporarily disable mipmapping, goto GLuint glsl_LoadShaderFromFile(...) in shaders.h and:

1. Change line 173 from

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);

to

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

2. Uncomment line 175 and comment out line 176.

3. Recompile to play with Tiny clouds.

4. Do not forget to roll back the changes and recompile again when you're through with that orphan shader.

Please test the shaders also on your Intels and add them to the tables.

Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: ObjReader FBO & PP
« Reply #141 on: June 10, 2019, 07:55:19 pm »
post #127 and #130 have been updated

On my nVIDIA

NeonHex, windowed + turbo OFF and Framebuffers disabled
Luminescence,windowed + turbo OFF and Framebuffers disabled
MoebiusObject,windowed + turbo OFF and Framebuffers disabled
TinyClouds, windowed + turbo OFF and Framebuffers disabled

Could you compare my nVIDIA settings with yours.


Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: ObjReader FBO & PP
« Reply #142 on: June 10, 2019, 08:51:03 pm »
Thanks for the updates, my friend!

That's good news about your nVidia. When windowed with both Turbo and FBO disabled, MoebiusObject and NeonHex are still just a tad jerky for me. And BTW, the hexagon glow isn't colored for some unknown reason on my ATi Radeon... The other two shaders are perfectly smooth at those settings.

You should understand that the amount of jerkiness is almost 100% dependent on the HW implementations of our respective graphics chips that vary from model to model, generation, and brand. And even no-name OEM implementations of licensed GPU designs by nVidia, ATi and Intel for one and the same model may significantly deviate from one another... And there's hardly anything I can do about it with the current layout of our MSAA-based FBO pipeline.

The bottleneck is the first 9 lines in void renderScreenQuad() (renderers.h). This is where the MSAA contents of our main FBO are blitted into an ordinary non-AA FBO's texture to be rendered on our screen quads. The texture bound directly to an MSAA FBO cannot be rendered on screen and has to be copied first.

Though hardware-assisted glBlitFramebuffer() runs, on the average, perhaps a hundred times faster than OpenGL's slowest glCopyPixels() API, it is still very highly dependent on MSAA multiplicity (32x in our case). If we exclude MSAA with that blitting stage altogether and use only simple FBOs that we can anti-alias programmatically significantly faster using FXAA and/or CSAA (nVidia only!), then we'll perhaps be able to avoid much jitter in our shaders as well (but of course not in the Protean shader which is ve-e-ery heavy by definition).

What I want to do is to prepare a special test build of ObjReader that will use only simple FBOs regardless of visual AA quality of final render just to see if we're on the right track to eliminate jerkiness...
« Last Edit: June 10, 2019, 08:53:30 pm by Michael Lobko-Lobanovsky »
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: ObjReader FBO & PP
« Reply #143 on: June 11, 2019, 12:27:29 pm »
Okay, here's a test build of OR with an ordinary no-MSAA FBO and zero MSAA in its on-screen window. Of course the models look jagged but the low GPU usage leaves us a lot of headroom to try FXAA and CSAA "for size".

I'm observing a dramatic improvement in animation smoothness at 30FPS (Turbo Off) and Use framebuffers On settings. In fact, it's so smooth as if I'm sitting in an iMax movie theater watching Avatar! :D

Simpler shaders run for me at a negligible 8 to 10% usage, and harder ones like Canyon, TinyClouds, Aurora, Pegasus etc., at a bearable 50 to 80% usage full screen, absolutely smooth. The only shader that's perfectly smooth only in a windowed mode is of course Protean. When maximized, its FPS drops to 20, usage skyrockets to 100%, and it starts to jerk heavily.

I'm adding a video to support my words. Try out the binary with the same settings (30FPS/FBO On) on your platforms (the more of them the better) and send me a Canyon video at any resolution but of the same duration, for me to evaluate objectively how good or bad things are on your nVidia.

Don't run Star or Tori as they'll crash your app. Tori is an ugly one and I'll dump it not even bothering to debug, while Star refuses to run in that simple FBO and needs more attention to fix.
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: ObjReader FBO & PP
« Reply #144 on: June 11, 2019, 03:30:43 pm »
Everything smooth even in true full screen

2dclouds.fs (CPU 2-3%, GPU 32-35%, FPS 38)
Luminescence.fs (CPU 2-3%, GPU 89-96%, FPS 38)
Mars.fs (CPU 1%, GPU 82-87%, FPS 38)
Protean.fs (CPU 10-12%, GPU 100%, FPS 23)
tinyclouds.fs (the cloud dark parts look granular)

Your hard work deserve my 5-star vote ;)

« Last Edit: June 11, 2019, 04:35:36 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: ObjReader FBO & PP
« Reply #145 on: June 11, 2019, 04:18:32 pm »
!!! GREAT NEWS !!!

We're now 100% compatible with each other even though you have it all running at 38FPS, which is 1/2 of your standard 75Hz refresh rate.

My main nVidia monitors run at 60Hz (that's where the 30FPS half-rate you're seeing in my video comes from) but my AMD/ATi PC monitor runs at 75Hz as well, and it also displays 38FPS when Turbo is switched down to half-rate.

I've started to experiment with FXAA and I can assure you it won't add more than 5 or 7% usage in full screen. I'm not successful yet because for some unknown reason the PP shader mixes in the screen background color (black, see the screenshot below) where it should only mix the border pixels of screen texture only. But the algo works and edge detection (where the border pixels need to be anti-aliased) is calc'ed correctly. I cannot see any extra load added by FXAA other than at 60FPS full screen, where it is probably less than 5%. The overall usage in the screenie was 40% exactly and perfectly smooth. :)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)