Code Monkey home page Code Monkey logo

Comments (3)

kungfooman avatar kungfooman commented on June 9, 2024 1

Thanks alot again, the last 3 commits with enabled r_fastPath upped the fps to around 40-120fps in Debug mode.

For comparison, Debug mode:
opengl1: 200-500fps
opengl2: 190-300fps
bgfx: 40-120fps

And I tested the code now in Release x32 mode, which is a complete game changer:

opengl1: 500-1000fps
opengl2: 200-400fps
bgfx: 600-1000fps

(hard to tell the exact fps over 1000fps, because the fps text is flickering so much)

I guess the lesson is that the bgfx usage of malloc/free and C++ code are just way slower than C code in Debug mode.

And nice to know about the GL 3.2 features, will see when I get to the point of porting this to WebGL2.

from ioq3-renderer-bgfx.

kungfooman avatar kungfooman commented on June 9, 2024

Hi, thanks for fixing this so fast. I did another little performance test, because for some reason bgfx is more than 10x slower than opengl1 renderer (400-500fps vs 30-70fps).

One strange point is that more than 44% of a frame is spend in realloc:

bgfx_realloc

Then the rest is mostly uniform/submit stuff:

bgfx_uniforms

Would be epic if this could get to near-opengl1-performance, I would like to use bgfx as WebGL renderer, since currently I'm just using rend2, which I hacked up being GLES only (and e.g. skybox and framebuffer stuff doesn't work anymore)

from ioq3-renderer-bgfx.

jpcy avatar jpcy commented on June 9, 2024

Setting r_fastPath to 1 should improve performance a little.

I haven't done any real profiling since on an old machine I get 350+ fps, compared to ~500 fps with the opengl and opengl2 renderers, which is only 0.85 ms difference. You're getting much worse performance...

You will have to use webgl2 because I'm using GL 3.2 features like GLSL texelFetch for dynamic lighting.

from ioq3-renderer-bgfx.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.