Skip to content

UUUnmei/RenderLiteV2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RenderLiteV2

cpu rasterizer with a more powerful architecture(than version 1) implement some basic technique

Features

  • programmable pipeline(and can rasterize 2*2 quad at a time)
  • perspective correct
  • directional light
  • point light (with omnidirectional shadow!)
  • changable render target (render to window or texture, enable a depth pass for shadow)
  • basic geometry generation (plane, cube, uvsphere, icosphere)
  • face culling
  • cvv clip
  • homogeneous clip
  • orbit camera
  • fps camera
  • tangent space calculation
  • mouse/keyboard input callbacks (thanks to glfw)
  • basic mipmap support

Some implemented technique

mainly in *Shader.hpp

  • basic shadow mapping(hard shadow)
  • PCSS
  • omnidirectional shadow for point light
  • skybox
  • normal mapping, parallax papping
  • blinn-phong shading
  • derivative calculation(e.g. ddx/ddy in HLSL) for mipmap. In master branch, it comes from difference of neighbouring pixels. In test_mipmap branch, it comes from some kind of analytical solutions.

TODO

  • update pipeline (greatly inspired by this and related series)
  • refactor texture and material (for flexibility)
  • tiled based (for performance and try multi-thread)

Dependencies

  • Windows (though windows and input system is based on glfw, i haven't test on other platform)
  • C++17
  • stb_image v2.27 (included already)
  • stb_image_write v1.16 (included already)
  • assimp-5.1.5
  • glm-0.9.9.8
  • glfw 3.34
  • glad
  • git lfs (due to large model files)

Visual Studio seems not work with git-lfs well, will generate extra 'hook' and 'lfs' directory. What's worse, may need to replace .git/lfs/object by this extra lfs/object when you update files tracked by lfs use git lfs fsck to verify correctness maybe have to use 'git lfs clone' instead of 'git clone' when clone this repo

Make sure config the path in project setting before use and don't forget assimp's dll

Reference

Example

see demos

basic blinn phong

skybox

hard shadow

omnidirectional shadow for point light

PCSS

normal mapping

mipmap(master)

mipmap(test_mipmap)