Coder Social home page Coder Social logo

xenation / ionengine Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 0.0 198.18 MB

Experimental Game Engine (uses Clustered Deferred)

License: MIT License

C++ 73.00% C 25.33% Objective-C 1.27% GLSL 0.39%
game-engine deferred-rendering clustered-shading experimental

ionengine's Introduction

IonEngine

Sample_01

IonEngine is currently under developpement. It's main purpose is to experiment with several techniques.

Features

  • Scene Hierarchy
  • Custom math library (uses SIMD instructions and Rotors for rotations)
  • Deferred Renderer
  • Clustered Shading (compute shader light assignment)
  • Basic BRDF with metallic workflow
  • Shader pipeline (detects layouts and possible permutations, uses UBOs to define Materials)
  • Basic Shadows with Atlas (Directional and Spotlights supported)
  • GUI using DearIMGUI
  • Basic Bullet3 implementation

Upcoming

  • DX12 / Vulkan
  • Better Shadows (Point light support, better smooth)
  • Mesh Import pipeline
  • Textured Skybox
  • Handles to edit scene
  • Scene file format

ionengine's People

Contributors

xenation avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ionengine's Issues

Basic PBR

Implement basic PBR rendering, using metallic workflow.

Textured Test Shader

A Test shader that supports several textures (albedo, spec, normals, ...), to have a better representation of the capabilities.

Workaround for the std140 vec3 alignment

Make a workaround the implementation specific bug for the vec3 variables in uniform blocks with std140 layout. In some implementations vec3 does not follow correctly the std140 rules and has alignment of 3 floats instead of 4.

More VisualDebug Functions

  • drawCube(Vec3f center, Vec3f size, Color color)
  • drawFrustum(Matrix4x4f vpMatrix, Color color)
  • drawMesh(Mesh mesh, Color color)
  • drawRay(Ray3f ray, Color color)
  • drawSphere(Vec3f center, float radius, Color color)
  • drawWireCube(Vec3f center, Vec3f size, Color color)
  • drawWireMesh(Mesh mesh, Color color)
  • drawWireSphere(Vec3f center, float size, Color color)

More Math Constants

  • PI
  • PI * 2
  • PI / 2
  • PI / 4
  • E
  • (PositiveInfinity)
  • (NegativeInfinity)
  • Deg2Rad
  • Rad2Deg

More vector methods

Adding some simple vector methods (currently only the Vec3f has methods).

Shader Preprocessor automatic uniform buffer layout fill

When preprocessing a shader, for each uniform buffer layout, check for missing fields and add them. This can currently only be done for the global buffers.

Exemple

Expected fields:

  • mat4x4 projectionMatrix
  • mat4x4 viewMatrix
  • ivec2 resolution
  • uint sampleCount

Input code:

layout (std140, binding = 1) uniform Camera {
	ivec2 resolution;
	uint sampleCount;
};

Output code:

layout (std140, binding = 1) uniform Camera {
	mat4x4 projectionMatrix;
	mat4x4 viewMatrix;
	ivec2 resolution;
	uint sampleCount;
};

Flexible Random class

Implement a flexible Random class that allows:

  • Using an instance of the class to have an isolated seed and output values
  • Using static methods for quick access to random values

Math Intersection and Projection Methods

Intersection Tests

Boxi Boxf Recti Rectf Ray2f Ray3f Line2f Line3f Segment2f Segment3f Plane OBB2D OBB3D Frustum3f
Boxi X X X X X X X X
Boxf X X X X X X X X
Recti X X X X X X
Rectf X X X X X X
Ray2f X X X X X X
Ray3f X X (X) (X) X X X
Line2f X X X X X X
Line3f X X (X) (X) (X) X X X
Segment2f X X X X X X
Segment3f X X (X) (X) (X) X X X
Plane X X X X X X X X
OBB2D X X X X X X
OBB3D X X X X X X X X
Frustum3f X X X X X X X (X)

Intersection Results

Boxi Boxf Recti Rectf Ray2f Ray3f Line2f Line3f Segment2f Segment3f Plane OBB2D OBB3D Frustum3f
Boxi Boxi Boxf Vec3f Vec3f Vec3f SIDE / /
Boxf Boxf Boxf Vec3f Vec3f Vec3f SIDE / /
Recti Recti Rectf Vec2f Vec2f Vec2f /
Rectf Rectf Rectf Vec2f Vec2f Vec2f /
Ray2f Vec2f Vec2f Vec2f Vec2f Vec2f Vec2f
Ray3f Vec3f Vec3f (Vec3f) (Vec3f) Vec3f Vec3f Vec3f
Line2f Vec2f Vec2f Vec2f Vec2f Vec2f Vec2f
Line3f Vec3f Vec3f (Vec3f) (Vec3f) (Vec3f) Vec3f Vec3f Vec3f
Segment2f Vec2f Vec2f Vec2f Vec2f Vec2f Vec2f
Segment3f Vec3f Vec3f (Vec3f) (Vec3f) (Vec3f) Vec3f Vec3f Vec3f
Plane SIDE SIDE Vec3f Vec3f Vec3f (Line3) / /
OBB2D / / Vec2f Vec2f Vec2f /
OBB3D / / Vec3f Vec3f Vec3f / / /
Frustum3f / / Vec3f Vec3f Vec3f / / /

Projections

proj/shape Boxi Boxf Recti Rectf Ray2f Ray3f Line2f Line3f Segment2f Segment3f Plane OBB2D OBB3D
Vec2i Vec2i
Vec2f Vec2f Vec2f Vec2f Vec2f Vec2f Vec2f
Vec3i Vec3i
Vec3f Vec3f Vec3f Vec3f Vec3f Vec3f Vec3f Vec3f

Auto Resources Copy on build

Automatically copy all resources when building to avoid having to manually change the parameters of each res file in VS.

Self Contained Assets System

Implement a build mode that allows including all assets into the executable file. This requires an API for the manipulation of files included. The API should implement a folder structure and allow modifications, creations and deletions.

Better Textures

Improve Texture creation, to allow for more customisation and avoid unnecessary allocations

More math structures

Add a few useful math structures:

  • Ray2f
  • Line2f
  • Line3f
  • Segment2f
  • Segment3f
  • OBB2D
  • OBB3D

(also rename Ray to Ray3f)

Cap deltaTime

Cap the deltaTime to avoid extreme movements on lag spikes.

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.