Code Monkey home page Code Monkey logo

SRender's Introduction

SRender

SRender is a software rasterization application written from scratch in C++11 with minimal dependencies (except win32 for display image) for windows platform. The purpose of writing this renderer is mainly for better understanding basic CG knowledge and algorithms.

The number of core codes is about 2000 lines, so it's easy for studying or reading. You can feel free to make changes on this project. Here some screenshots of SRender:

Image-based lighting

Blinn-Phong Shading

Main Features

  • Blinn-Phong shading
  • Perspective correct interpolation
  • Back-face culling
  • Homogeneous clipping
  • Cubemap skybox
  • Physically based rendering (PBR)
  • Metallic-roughness workflow
  • Image-based lighting (IBL)
  • movable camera

Binaries for Usage

The pre-built binaries can be found in bin folder. You can start with binaries and obj assets. (Note: the obj folder should be placed in the parent directory of binaries)

The obj models folder be downloaded from here:

https://pan.baidu.com/s/1_EgKzcFXJLCuDi1o5fhQww

extract code: ghde

Build

If you want to check more details of SRender, the cmakelists.txt file is provided for building project files using CMake.

For visual studio:

mkdir build
cd build
cmake -G "Visual Studio 15 2017" ..

Another way is directly opening the SRender file with CLION, it will automatically configure the project.

Control of Camera

  • Rotation: holding left mouse button
  • Pan: holding right mouse button
  • Zoom: mouse wheel

Reference

zauonlok's implementation of software renderer.

GAMES101.

SRender's People

Contributors

SunXLei avatar

Stargazers

 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.