UB2D - 2D Physically Based Rendering Engine

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
ccode
User
User
Posts: 99
Joined: Sat Jun 23, 2018 5:21 pm

Re: UB2D - 2D Physically Based Rendering Engine

Post by ccode »

Intel(R) HD Graphics 405: All examples are running (10-40 FPS)

NVidia GeForce GTX 1060: All examples are running (Default 60 FPS) (Can also do more)

Intel(R) UHD Graphics 630: It does not work

Image
Artus
Enthusiast
Enthusiast
Posts: 104
Joined: Wed Feb 25, 2009 10:29 pm
Location: Germany
Contact:

Re: UB2D - 2D Physically Based Rendering Engine

Post by Artus »

Good evening,

first a big thanks to all of you for testing it, the pictures and information. This helps us a lot. Thanks.

We (STARGATE and I) should give maybe some more information about our engine, to understand better why too old graphic cards don't work well. Our engine use a technique which is called PBR this means Physically Based Rendering (special technique to calculate the surface behavior), a deferred rendering technique. This technique is used in all new game engines like Unreal 4, Crysis or Unit etc. Meanwhile it is state of the art. What we did is to turn this technique to 2D. There is only one or two pure 2D engine which uses deferred rendering, but as far as I know none of them use PBR. But even if we are in 2D the system requirements are relative high for a 2D engine. We simplified a lot to gain performance, but we still in a higher range.

To be to be honest I'm surprised that the engine works on a GeForce 8400 GS :D . That’s great, even if it's only 3 FPS. But not only the speed is important, also the VRAM, for this technique we need a higher amount of VRAM than a standard forward rendering engine. We have a lot of framebuffer, which stores the pixel in HDR, which means 4 floats per pixel, not bytes! To be on the save side I would recommend min. 2 GB of VRAM, just to be on the save side. I ques also, that a GeForce GTX 640 or a ATI equivalent, is quit the minimum. BUT let us find out try it on everything you have, to get as much information as possible and to optimize the engine.
Mhh and yeah Intel on board graphic chips are it's own topic, put we will try to get it running.

The engine needs currently also SSE, SSE2 and SSE3 from the CPU. Maybe a missing one of this can be the problem with the wrong positions.

So, sorry for this long post ^^

So we compiled a new version with one example, which debug all the important specifications for the engine. We would be happy if you could share this with us. If you don’t want to post it here, you can send me a PM.
So to get this information please start the 002_Debugger.pb and clock on the "Copy All"-Button in the "Debugger Output"-Tab. And post it as code. Thank you a lot.
Image


Download of the new version: UB2D_PreAlpha_0027_2018-11-09.zip


My example:

Code: Select all

UnionBytes 2D Engine (UB2D)
0.0.27 (2018-11-09)

AMD Ryzen 5 1600X Six-Core Processor           
12 logical processors 
SSE is supported!
SSE2 is supported!
SSE3 is supported!
SSSE3 is supported!
16331 MB RAM

GeForce GTX 1060 6GB/PCIe/SSE2
OpenGL 4.6.0 NVIDIA 416.34
GLSL 4.60 NVIDIA
Major version 4

COMPUTE UNIFORM COMPONENTS 2048
GEOMETRY UNIFORM COMPONENTS 2048
VERTEX UNIFORM COMPONENTS 4096
FRAGMENT UNIFORM COMPONENTS 4096
COMBINED UNIFORM BLOCKS 84
COMPUTE UNIFORM BLOCKS 14
GEOMETRY UNIFORM BLOCKS 14
VERTEX UNIFORM BLOCKS 14
FRAGMENT UNIFORM BLOCKS 14
UNIFORM block size 65536
MAX_UNIFORM_LOCATIONS 65536
MAX SHADER STORAGE BUFFER BINDINGS 96
MAX UNIFORM BUFFER BINDINGS 84
MAX 3D TEXTURE SIZE 16384
MAX ARRAY TEXTURE LAYERS 2048
MAX DRAW BUFFERS 8
MAX ELEMENTS INDICES 1048576
MAX ELEMENTS VERTICES1048576
Greetings from UnionBytes
ccode
User
User
Posts: 99
Joined: Sat Jun 23, 2018 5:21 pm

Re: UB2D - 2D Physically Based Rendering Engine

Post by ccode »

With the Intel GPU I can not get a debugger window.

With the NVidia GPU I get the following:

Image
User avatar
STARGÅTE
Addict
Addict
Posts: 2088
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: UB2D - 2D Physically Based Rendering Engine

Post by STARGÅTE »

Dear xcode, plz download the zip file above again, the link was wrong.
The DLLs should be were compiled on 9th November.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
ccode
User
User
Posts: 99
Joined: Sat Jun 23, 2018 5:21 pm

Re: UB2D - 2D Physically Based Rendering Engine

Post by ccode »

SSE is supported!
SSE2 is supported!
SSE3 is supported!
SSSE3 is supported!
Intel(R) UHD Graphics 630
OpenGL 4.5.0 - Build 23.20.16.5018
GLSL 4.50 - Build 23.20.16.5018
Major version 4

COMPUTE UNIFORM COMPONENTS 4096
GEOMETRY UNIFORM COMPONENTS 4096
VERTEX UNIFORM COMPONENTS 4096
FRAGMENT UNIFORM COMPONENTS 4096
COMBINED UNIFORM BLOCKS 70
COMPUTE UNIFORM BLOCKS 14
GEOMETRY UNIFORM BLOCKS 14
VERTEX UNIFORM BLOCKS 14
FRAGMENT UNIFORM BLOCKS 14
UNIFORM block size 65536
MAX_UNIFORM_LOCATIONS 4096
MAX SHADER STORAGE BUFFER BINDINGS 16
MAX UNIFORM BUFFER BINDINGS 84
MAX 3D TEXTURE SIZE 2048
MAX ARRAY TEXTURE LAYERS 2048
MAX DRAW BUFFERS 8
MAX ELEMENTS INDICES 1048576
MAX ELEMENTS VERTICES1048576
GeForce GTX 1060/PCIe/SSE2
OpenGL 4.6.0 NVIDIA 388.73
GLSL 4.60 NVIDIA
Major version 4

COMPUTE UNIFORM COMPONENTS 2048
GEOMETRY UNIFORM COMPONENTS 2048
VERTEX UNIFORM COMPONENTS 4096
FRAGMENT UNIFORM COMPONENTS 4096
COMBINED UNIFORM BLOCKS 84
COMPUTE UNIFORM BLOCKS 14
GEOMETRY UNIFORM BLOCKS 14
VERTEX UNIFORM BLOCKS 14
FRAGMENT UNIFORM BLOCKS 14
UNIFORM block size 65536
MAX_UNIFORM_LOCATIONS 65536
MAX SHADER STORAGE BUFFER BINDINGS 96
MAX UNIFORM BUFFER BINDINGS 84
MAX 3D TEXTURE SIZE 16384
MAX ARRAY TEXTURE LAYERS 2048
MAX DRAW BUFFERS 8
MAX ELEMENTS INDICES 1048576
MAX ELEMENTS VERTICES1048576
Artus
Enthusiast
Enthusiast
Posts: 104
Joined: Wed Feb 25, 2009 10:29 pm
Location: Germany
Contact:

Re: UB2D - 2D Physically Based Rendering Engine

Post by Artus »

Thanks ccode,
unfortunately it is none of the problem i thought^^
Intel is quite hard.
Maybe Intel handels the buffer different or the addressing of the uniform buffer is different.
Or the binding of buffers and textures, i optimized it ro reduce the openGL calls.

Greetings
ccode
User
User
Posts: 99
Joined: Sat Jun 23, 2018 5:21 pm

Re: UB2D - 2D Physically Based Rendering Engine

Post by ccode »

But the "Intel(R) HD Graphics 405" works.
Intel(R) HD Graphics 405
OpenGL 4.4.0 - Build 20.19.15.4352
GLSL 4.40 - Build 20.19.15.4352
Major version 4

COMPUTE UNIFORM COMPONENTS 4096
GEOMETRY UNIFORM COMPONENTS 4096
VERTEX UNIFORM COMPONENTS 4096
FRAGMENT UNIFORM COMPONENTS 4096
COMBINED UNIFORM BLOCKS 70
COMPUTE UNIFORM BLOCKS 14
GEOMETRY UNIFORM BLOCKS 14
VERTEX UNIFORM BLOCKS 14
FRAGMENT UNIFORM BLOCKS 14
UNIFORM block size 65536
MAX_UNIFORM_LOCATIONS 4096
MAX SHADER STORAGE BUFFER BINDINGS 16
MAX UNIFORM BUFFER BINDINGS 84
MAX 3D TEXTURE SIZE 2048
MAX ARRAY TEXTURE LAYERS 2048
MAX DRAW BUFFERS 8
MAX ELEMENTS INDICES 1048576
MAX ELEMENTS VERTICES1048576
ccode
User
User
Posts: 99
Joined: Sat Jun 23, 2018 5:21 pm

Re: UB2D - 2D Physically Based Rendering Engine

Post by ccode »

The Intel GPU has a 100% utilization, in the examples.

Image

NVidia remains completely relaxed.

Image

Intel HD - GPU:

Image
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1252
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Re: UB2D - 2D Physically Based Rendering Engine

Post by Paul »

Just an update for you...
I found there were newer graphic drivers for my Intel HD 4600 which had to be installed manually since it is an HP Laptop and apparently HP doesn't update their drivers ;(

All the demos now work using the Intel Graphics card with the newer drivers (and the FPS for the Engine Control demo with default settings is 35).
Using your debug mode, this is the difference between the old driver and the new:
OLD
Intel(R) HD Graphics 4600
OpenGL 4.3.0 - Build 10.18.10.3960
GLSL 4.30 - Build 10.18.10.3960
Major version 4

COMPUTE UNIFORM COMPONENTS 4096
GEOMETRY UNIFORM COMPONENTS 4096
VERTEX UNIFORM COMPONENTS 4096
FRAGMENT UNIFORM COMPONENTS 4096
COMBINED UNIFORM BLOCKS 70
COMPUTE UNIFORM BLOCKS 14
GEOMETRY UNIFORM BLOCKS 14
VERTEX UNIFORM BLOCKS 14
FRAGMENT UNIFORM BLOCKS 14
UNIFORM block size 16384
MAX_UNIFORM_LOCATIONS 4096
MAX SHADER STORAGE BUFFER BINDINGS 8
MAX UNIFORM BUFFER BINDINGS 84
MAX 3D TEXTURE SIZE 2048
MAX ARRAY TEXTURE LAYERS 2048
MAX DRAW BUFFERS 8
MAX ELEMENTS INDICES 1048576
MAX ELEMENTS VERTICES1048576
NEW
Intel(R) HD Graphics 4600
OpenGL 4.3.0 - Build 10.18.14.5057
GLSL 4.30 - Build 10.18.14.5057
Major version 4

COMPUTE UNIFORM COMPONENTS 4096
GEOMETRY UNIFORM COMPONENTS 4096
VERTEX UNIFORM COMPONENTS 4096
FRAGMENT UNIFORM COMPONENTS 4096
COMBINED UNIFORM BLOCKS 70
COMPUTE UNIFORM BLOCKS 14
GEOMETRY UNIFORM BLOCKS 14
VERTEX UNIFORM BLOCKS 14
FRAGMENT UNIFORM BLOCKS 14
UNIFORM block size 65536
MAX_UNIFORM_LOCATIONS 4096
MAX SHADER STORAGE BUFFER BINDINGS 16
MAX UNIFORM BUFFER BINDINGS 84
MAX 3D TEXTURE SIZE 2048
MAX ARRAY TEXTURE LAYERS 2048
MAX DRAW BUFFERS 8
MAX ELEMENTS INDICES 1048576
MAX ELEMENTS VERTICES1048576
Image Image
Artus
Enthusiast
Enthusiast
Posts: 104
Joined: Wed Feb 25, 2009 10:29 pm
Location: Germany
Contact:

Re: UB2D - 2D Physically Based Rendering Engine

Post by Artus »

Good Morning,

ccode & Paul thank you very much for your support.

The hint with updating the driver is really good.
Also interesting is, that the MAX SHADER STORAGE BUFFER BINDINGS increases with the update from 8 to 16^^

So, to all people who have problems, maybe a update of the graphic driver helps already to solve this problems.

But please have in mind, that all Intel on board graphic chips are not as good as the stand alone from NVIDIA or ATI. The performance will never be so good like on a "right" graphic card.

Thank you all for testing. :D

Greetings from UnionBytes
User avatar
Lord
Addict
Addict
Posts: 849
Joined: Tue May 26, 2009 2:11 pm

Re: UB2D - 2D Physically Based Rendering Engine

Post by Lord »

Hi!

My results are:
UnionBytes 2D Engine (UB2D)
0.0.27 (2018-11-09)

Intel(R) Core(TM) i5 CPU 760 @ 2.80GHz
4 logical processors
SSE is supported!
SSE2 is supported!
SSE3 is supported!
SSSE3 is supported!
16375 MB RAM

GeForce GTX 460/PCIe/SSE2
OpenGL 4.3.0
GLSL 4.30 NVIDIA via Cg compiler
Major version 4

COMPUTE UNIFORM COMPONENTS 2048
GEOMETRY UNIFORM COMPONENTS 2048
VERTEX UNIFORM COMPONENTS 4096
FRAGMENT UNIFORM COMPONENTS 2048
COMBINED UNIFORM BLOCKS 84
COMPUTE UNIFORM BLOCKS 14
GEOMETRY UNIFORM BLOCKS 14
VERTEX UNIFORM BLOCKS 14
FRAGMENT UNIFORM BLOCKS 14
UNIFORM block size 65536
MAX_UNIFORM_LOCATIONS 65536
MAX SHADER STORAGE BUFFER BINDINGS 96
MAX UNIFORM BUFFER BINDINGS 84
MAX 3D TEXTURE SIZE 2048
MAX ARRAY TEXTURE LAYERS 2048
MAX DRAW BUFFERS 8
MAX ELEMENTS INDICES 1048576
MAX ELEMENTS VERTICES1048576
I corrected my posting here because I have a GTX 460 not GTX 640. :wink:
The card has 1 GB RAM.
Image
User avatar
HeX0R
Addict
Addict
Posts: 992
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: UB2D - 2D Physically Based Rendering Engine

Post by HeX0R »

Quite impressive, and no problems here.
UnionBytes 2D Engine (UB2D)
0.0.27 (2018-11-09)

AMD FX(tm)-8350 Eight-Core Processor
8 logical processors
SSE is supported!
SSE2 is supported!
SSE3 is supported!
SSSE3 is supported!
32683 MB RAM

AMD Radeon (TM) R9 390 Series
OpenGL 4.5.13537 Compatibility Profile Context 24.20.13001.1010
GLSL 4.50
Major version 4

COMPUTE UNIFORM COMPONENTS 16384
GEOMETRY UNIFORM COMPONENTS 16384
VERTEX UNIFORM COMPONENTS 16384
FRAGMENT UNIFORM COMPONENTS 16384
COMBINED UNIFORM BLOCKS 90
COMPUTE UNIFORM BLOCKS 15
GEOMETRY UNIFORM BLOCKS 15
VERTEX UNIFORM BLOCKS 15
FRAGMENT UNIFORM BLOCKS 15
UNIFORM block size 572657868
MAX_UNIFORM_LOCATIONS 4096
MAX SHADER STORAGE BUFFER BINDINGS 64
MAX UNIFORM BUFFER BINDINGS 90
MAX 3D TEXTURE SIZE 2048
MAX ARRAY TEXTURE LAYERS 2048
MAX DRAW BUFFERS 8
MAX ELEMENTS INDICES 536870911
MAX ELEMENTS VERTICES536870911
infratec
Always Here
Always Here
Posts: 6874
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: UB2D - 2D Physically Based Rendering Engine

Post by infratec »

My small help for your project:
UnionBytes 2D Engine (UB2D)
0.0.27 (2018-11-09)

Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz
4 logical processors
SSE is supported!
SSE2 is supported!
SSE3 is supported!
SSSE3 is supported!
8146 MB RAM

AMD Radeon HD 7000 series
OpenGL 4.5.13399 Compatibility Profile Context 15.201.1151.1008
GLSL 4.40
Major version 4

COMPUTE UNIFORM COMPONENTS 16384
GEOMETRY UNIFORM COMPONENTS 16384
VERTEX UNIFORM COMPONENTS 16384
FRAGMENT UNIFORM COMPONENTS 16384
COMBINED UNIFORM BLOCKS 90
COMPUTE UNIFORM BLOCKS 15
GEOMETRY UNIFORM BLOCKS 15
VERTEX UNIFORM BLOCKS 15
FRAGMENT UNIFORM BLOCKS 15
UNIFORM block size 65536
MAX_UNIFORM_LOCATIONS 4096
MAX SHADER STORAGE BUFFER BINDINGS 8
MAX UNIFORM BUFFER BINDINGS 90
MAX 3D TEXTURE SIZE 2048
MAX ARRAY TEXTURE LAYERS 2048
MAX DRAW BUFFERS 8
MAX ELEMENTS INDICES 16777215
MAX ELEMENTS VERTICES2147483647
If I start the program the fan increases the rpm immediately :wink:

Btw.: 30fps in 009
kvitaliy
Enthusiast
Enthusiast
Posts: 162
Joined: Mon May 10, 2010 4:02 pm

Re: UB2D - 2D Physically Based Rendering Engine

Post by kvitaliy »

UnionBytes 2D Engine (UB2D)
0.0.27 (2018-11-09)

Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz
4 logical processors
SSE is supported!
SSE2 is supported!
SSE3 is supported!
SSSE3 is supported!
8149 MB RAM

GeForce GTX 1050 Ti/PCIe/SSE2
OpenGL 4.6.0 NVIDIA 388.13
GLSL 4.60 NVIDIA
Major version 4

COMPUTE UNIFORM COMPONENTS 2048
GEOMETRY UNIFORM COMPONENTS 2048
VERTEX UNIFORM COMPONENTS 4096
FRAGMENT UNIFORM COMPONENTS 4096
COMBINED UNIFORM BLOCKS 84
COMPUTE UNIFORM BLOCKS 14
GEOMETRY UNIFORM BLOCKS 14
VERTEX UNIFORM BLOCKS 14
FRAGMENT UNIFORM BLOCKS 14
UNIFORM block size 65536
MAX_UNIFORM_LOCATIONS 65536
MAX SHADER STORAGE BUFFER BINDINGS 96
MAX UNIFORM BUFFER BINDINGS 84
MAX 3D TEXTURE SIZE 16384
MAX ARRAY TEXTURE LAYERS 2048
MAX DRAW BUFFERS 8
MAX ELEMENTS INDICES 1048576
MAX ELEMENTS VERTICES1048576
Artus
Enthusiast
Enthusiast
Posts: 104
Joined: Wed Feb 25, 2009 10:29 pm
Location: Germany
Contact:

Re: UB2D - 2D Physically Based Rendering Engine

Post by Artus »

Hello,

thank you all for testing and sending you results.
I will be happy to see the first small projects in the future. ^^

Just a small interim report:
Currently we are working on severall things, one of them is the Paricle System which i post a picture here,
klick on the picture to see it in full size:
Image
The link has been fixed and should work now!

Tanks and Greetings from Germany
UnionBytes
Post Reply