Coder Social home page Coder Social logo

haeri / photonbox Goto Github PK

View Code? Open in Web Editor NEW
107.0 107.0 8.0 877.68 MB

A portable modern OpenGL Game-Engine with focus on PBR

License: MIT License

C++ 48.68% C 41.20% GLSL 8.06% Batchfile 0.30% Python 0.52% Shell 0.33% CMake 0.92%
cpp engine game-engine opengl pbr visualization

photonbox's People

Contributors

haeri avatar strager avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

photonbox's Issues

Instanced rendering

Rendering API should allow for to render multiple instances of the same mesh at once,

Shader System rework

The current shader system needs a rework. It should not be necessary to create a class for every shader type. A shader instance should parse all the necessary information from a unified shader file (with a .pbs extension) containing vertex and fragment source code. Additional defines should specify how the shader is configured.

shader.pbs

# type: surface
# vertex
/* glsl code */

# fragment
/* glsl code */

Game code hot-reloading

If the game code compiles to a shared library, it can be hot-reloaded without having to shut down the running engine-process.

Vcpkg and CMake

Redistributing dependencies as binaries is not best practice, as it bloats the repo and may not work for all platforms.

  • Vcpkg would solve this problem as it is a rather large c++ "package" manager.
  • But this change would required to setup CMake form the current project, which is a royal pain in the butt!
  • Also the project setup would reqire Cmake and vcpkg to be installed, instead of no requirements (since Premake is currently redistributed)

Decouple OpenGL from renderer

The OpenGL API is strongly coupled with the engine. There needs to be an abstraction layer over the graphics api.

Tile Based Deferred Rendering

Although Deferred Rendering performes better than Forward rendering, since shading is deferred to the end of the pipeline, when all valid fragments are determined, it still can be expensive to shade all final fragments with a large number of lights.
This can be optimized by dividing the depth buffer into tiles represented by the frustum formed by the near, far and the frustum sides defined by the tile position. Through a compute shader the min and max depth in said tile can be computed and the frustum near and far planes should be adusted accordingly. This gives us a tight frustum representation of a tile, which we then can test against light bounds to check if a light would affect this tile.

https://www.ea.com/frostbite/news/directx-11-rendering-in-battlefield-3

Delta Index Buffer storage

In 99% of the cases the index buffer consists of liear incrementing values. If we instead change it to a deltas, the sequence will mostly consist of 1s, which will greatly increase the compressability.

GDC Talk

Logging System

An easy logging API that will eliminate direct std::cout calls. Should allow for options:

  • default
  • info
  • warn
  • error

Timestamps should also be included. Logging should be completely deactivated with macros or redirected to a log file.

Data oriented ECS

The current ECS implementation stores the different components inside the Entity. This can be improved by storing the components according to their type into a vector inside their respective system. This would result in an uniform memory layout and cache friendly fetching when iterating over components from the same family such is the case for Physics objects, Mesh Components etc.

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.