Cell - Graphics engine
Welcome to the development repository of Cell, an open-source OpenGL graphics engine aimed to serve as an educational repository for learning how a larger graphics engine can be structured and organized. A large focus of Cell is building an engine that is both easy to use and read. Cell also aims to provide both flexible and properly maintainable code. Note that this project is not finished, so code may still be vague nor are there proper build files yet.
The engine will be heavily commented and documented from within the source code itself, to motivate new graphics programmers to take a look at any of its inner workings, without feeling too overwhelming.
Feature List (complete:base-functionality)
Fully functioning (custom) math library (vectors, matrices, transformations, utility functions):
- Linear algebra: n-dimensional vectors, nxn-dimensional matrices, transformations, utility.
- Trigonemetry: unit circle utility functions, radian/degree conversions.
- Utility functions: lerp, step, smoothstep, smootherstep, clamp etc.
Engine utility namespace:
- High-precision performance analysis and measurement.
- Random numbers.
- Configure and enable debugging and logging utility.
- Shader object w/ custom pre-processor (defines, includes):
- Include other shader files.
- Parse active vertex attributes and uniform variables, retrieve location and store in shader object.
- Easy to use state configuration per shader.
- Support multiple build paths.
- Material pipeline; configure render state in materials, together with shader, uniform configuration and samplers used.
- Allow for easy access of materials and storage; include set of default materials (default material, glass material etc.)
- Define Mesh object and encompassing Model class.
- Define set of basic shape mesh generation; plane, cube, disk, sphere, cylinder, torus (donut)
- Load artist defined 3D models w/ Assimp.
- Note: Assimp is built as a static library that is statically linked/merged with Cell. I also built the static zlib library for the ingration to work properly with Assimp (both 32 bit).
- Flexible Framebuffer configuration utility:
- Including CubeMap use and generation (reflection probes, point shadow-maps)
- Create Render Buffer, draw commands encapsulated in push to render buffer w/ relevant state:
- Define list of render push commands (material, mesh)
- Collect all render commands and seperate by pass.
- Sort render commands per pass; execute (batch where necessary) to minimize state changes.
- Configure Deferred rendering pipeline:
- Configure render buffer w/ geometry pass.
- Build fully functional shaders w/ Blinn-Phong (now PBR) lighting.
- Normal mapping.
- Environment lighting.
- Environment reflection support.
- Directional shadows
- Number of lights optimization.
- Per-object motion blur.
- Functioning PBR render pipeline.
- Calculate diffuse integral and store into cubemap.
- Prefilter environment map w/ integral and store into cubemap as diffuse integral.
- Pre-calculate active BRDF in 2D LUT (approach by Unreal for split sum approximation).
- Irradiance reflection probe(s): pre-calculate environment lighting approximation at any scene location.
- Store material-independent uniforms in UBO; together with barely changing shader parameters.
- Per-object Frustum culling.
- Cache GL state.
Feature List (work-in-progress)
- Engine utility namespace:
- Flexible OpenGL initialization.
- Add Camera functionality; add multiple camera variations: FPS, FlightSim, ArcBall.
- Configure Deferred rendering pipeline:
Feature List (todo)
- Skeletal animation:
- Define Bone structure on top of current scene hierarchy system.
- Load skeletal mesh from Assimp as skeletal hierarchy as well? Think of different design solutions that would work well in current environment.
- Animation blending.
- Complete code cleanup (re-factor where relevant), focussing on readability and maintainability. There are still a lot of items that do work, but could be better organized.
- Document the entire engine, describing architectural and semantic choices where relevant. Also include a walkthrough guide describing the best file order to start reading/understanding the engine.
- Configure cross-platform build files (there's currently 0 build support).