Code Monkey home page Code Monkey logo

softglrender's Introduction

SoftGLRender

Tiny C++ Software Renderer/Rasterizer, it implements the main GPU rendering pipeline, 3D models (GLTF) are loaded by assimp, and using GLM as math library.

License

CMake MacOS CMake Windows CMake Linux

Features

  • Wireframe
  • View Frustum culling
  • Back-Front culling
  • Orbit Camera Controller
  • Perspective Correct Interpolation
  • Reversed Z
  • Early Z
  • Tangent Space Normal Mapping
  • Basic Lighting
  • Blinn-Phong shading
  • PBR & IBL shading
  • Skybox CubeMap & Equirectangular
  • Texture mipmaps
  • Texture tiling and swizzling (linear, tiled, morton)
  • Texture filtering and wrapping
  • Shader varying partial derivative dFdx dFdy
  • Alpha mask & blend

Texture Filtering

  • NEAREST
  • LINEAR
  • NEAREST_MIPMAP_NEAREST
  • LINEAR_MIPMAP_NEAREST
  • NEAREST_MIPMAP_LINEAR
  • LINEAR_MIPMAP_LINEAR

Texture Wrapping

  • REPEAT
  • MIRRORED_REPEAT
  • CLAMP_TO_EDGE
  • CLAMP_TO_BORDER
  • CLAMP_TO_ZERO

Texture Fetch

  • Lod
  • Bias
  • Offset

Anti Aliasing

  • SSAA
  • FXAA

TODO

  • MSAA\TAA
  • Shadow Map

Showcase

Render Textured

  • BoomBox (PBR)

  • Robot

  • DamagedHelmet (PBR)

  • GlassTable

  • AfricanHead

  • Brickwall

  • Cube

Render Wireframe

Check "show clip" to show the triangles created by frustum clip

Dependencies

Clone

git clone [email protected]:keith2018/SoftGLRender.git
cd SoftGLRender
git submodule update --init --recursive

Build

mkdir build
cmake -B ./build -DCMAKE_BUILD_TYPE=Release
cmake --build ./build --config Release

Run

cd bin/Release
./SoftGLRender

License

This code is licensed under the MIT License (see LICENSE).

softglrender's People

Contributors

keith2018 avatar

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.