Zielon/CPURasterizer
소개
CPU Based Rasterizer Engine
디자인 및 미디어측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalCPURasterizer
Efficient CPU based rasterizer
CPU implementation of a very efficient rasterizer which utilizes AVX2 instructions and lock-free multi-threading programming. Using tiled rendering the program consumes 8 pixels at the same time, which together with std::execution threading library makes it very fast and robust. The viewer of the project is a very simple OpenGL applicatoin which renders a texture to a quad. The texture is generated by the CPU Renderer.h class. The pipeline contains most of the modern GPU rasterizers stages.
Current development is available under project. Discussion about the project is available here.
Implemented stages include:
- Vertex Shader
- Clipping (Sutherland–Hodgman algorithm)
- Rasterization (Larrabee paper)
- Perspective Corrected Interpolation
- Fragment Shader
- Depth Testing
Except rasterization pipeline the project contains serveral additional features. (More features will be developed soon)
- Tiled rendering using AVX2 (2x4 pixels tile)
- Texture sampling
- OpenGL viewer (only texture rendering)
- C++17 (
std::executionetc.)
Performance
All tests were done on CPU Intel i4790k with 4 cores. 60 fps is the maximum for GLFW window.
| Scene | Triangles | Resolution | Shader | Filter | FPS |
|---|---|---|---|---|---|
| Boy | 85k | 1280x720 | Phong | Nearest | 35.2 |
| Bedroom | 1490k | 1280x720 | Phong | Nearest | 10.1 |
| Panther | 2004k | 1280x720 | Phong | Nearest | 6.3 |
How to run
All dependencies needed for the project can be downloaded using windows_install.bat for Windows or linux_install.sh for Linux. The project has Visual Studio 2019 solution and CMake project.
git-lfs must be installed in order to fetch scenes repository.
Assets
The scene description and assets are adapted from GLSL-PathTracer project [4]. The scenes repository will be automatically cloned during the installation process.
Rasterizer/Assets/PBRScenes/
bedroom/
coffee_cart/
HDR/
bedroom.scene
coffee_cart.scene
...
References/Credits
[0] Optimizing the basic rasterizer
[1] Rasterization on larrabee
[2] Rasterization practical implementation
[3] EDXRaster
관련 프로젝트 살펴보기
불러오는 중…