/TheForgeExamples

Graphic Techniques Implemented on The Forge API, a cross-platform rendering framework on top of Vulkan, DirectX, Metal

Primary LanguageC++The UnlicenseUnlicense

Learning and Testing The Forge Rendering API

Implementations

ScreenShots

1. Instancing

2. Blinn-Phong Lightmapping

Using Blinn-Phong Lighting model with 3 types of lights: 1.Point Light 2.Directional Light 3.Spot Light and Specular Maps to highlight the outer edges of the cubes. Blinn-Phong LearnOpenGL

3. Deferred Lighting

Blinn-Phong Deferred Rendering. It writes to normal/position/color map in the 1st Pass, Then uses the Lights Data Passed to GPU as Uniform and Structured Buffers to calculate the colors using these textures.

Deferred Rendering doesn't work too well on High Resolution (2K/4K) devices such as consoles due to it's memory and It's suggested to use Visibility Buffers instead.

Also on Mobile devices it's good to uses subpasses for tile-based rendering instead of Render Passes, again because of high memory size.

4. Toon Shading

Simple Toon Shading with outlining. It uses Stencil Buffers to draw the cool outlines.

5. Tessellation (Passthrough and PN Triangles)

Tessellation using Hull/Control and Domain/Evaluation Shader in HLSL and GLSL. PN-Triangles is a method using Bezier Triangles and does not require a heightmap to improve quality of the geometry unlike the first technique which is simple and passthrough tessellation

6. Bloom

Bloom gives noticeable visual cues about the brightness of objects as bloom tends to give the illusion objects are really bright.

The technique used is to render the bloom-affected objects to a 256x256 FBO and then blurred and added to the final scene. Technique based on GPU Pro 2 : Post-Processing Effects on Mobile Devices and SachaWilliens Vulkan Example

The Final pass is ToneMapping / Exposure Control and Gamma Correction and all the frame buffers before that are rendered as HDR (R16G16B16A16)

Build

  • Visual Studio 2017:
    • Put Repository folder next to cloned The-Forge API repository folder
    • Build The-Forge API Renderer and Tools and place library files in build/VisualStudio2017/$(Configuration) for example build/VisualStudio2017/ReleaseDx
    • Assimp:
      • Build Assimp for Projects involving Loading Models
      • Don't change the directory of assimp.lib, the Default is:
        • The-Forge\Common_3\ThirdParty\OpenSource\assimp\4.1.0\win64\Bin