Description | 简介
screenshot form v0.3 hwRenderer
screenshot from v0.2 demo
For learning purpose, This software is a CPU based render pipeline.
为学习研究目的,基于CPU的整套软件渲染管线。
Fully use Multi-Thread Boost and SIMD Bosst.
充分利用多核和SIMD进行运算加速。
Use Msvc10 Compiler Or Intel Compiler
纯VC10编译,内置INTEL编译方案。
Integrate a D3D9 Hardware Renderer, switchable in run-time between sw-renderer and hw-renderer.
内置D3D9的硬件渲染器,可以在运行时进行软件/硬件渲染器的自由切换。
Binary DEMO
Features | 特性
v0.2
- Rasterization | 光栅化
- Rasterization using Scanline method, with prepective correction.
- 扫描线算法光栅化
- Multithreading rasterize, sync while compare same depth buffer element.
- 多线程光栅化运算,在写同一个深度缓存元素时使用用户态同步。
- MathLib | 数学库
- SIMD boost Math-Lib develop by myself.
- 自行实现的数学库,支持SIMD加速
- Multi-core | 多核优化
- Multi-core boost software render.
- 多核加速的软件渲染
- TaskDispatcher with thread pool, dynamic load balancing
- 基于线程池的shader任务分发器,动态负载均衡。
- Programmable Shader | 可编程shader
- Flexible Vertex, Rasterize, Pixel shader.
- 自由的Vertex, Rasterize, PixelShader结构,可简单快速的添加shader
- Other Feature | 其他特性
- Include a hardware pipeline, for compare with software pipeline.
- 内置一个硬件渲染管线,方便对比软渲。
- Bilinear Texture Filtering
- 双线性纹理采样
- Jiterring-Anti Alias
- 抖动抗锯齿
- SSAO
- 屏幕空间环境遮蔽算法
- SkinSim, Fresnel, NormalMapping Shader算法
- 皮肤模拟,菲涅尔反射,法线贴图的shader算法
v0.3
- Shader system abstract | 着色器系统抽象
- Software shader in individual module. Build as .srsl file
- 软件着色器编译到单独模块,编译为srsl文件,shader库。
- Hardware shader as hlsl file. Compiled as .srvs and .srps file
- 硬件着色器通过hlsl编译到srvs和srps文件,作为二进制着色器代码载入硬件。
- Abstract shader run-time bind to sw-shader or hw-shader.
- 抽象着色器在运行时动态绑定到对应的软件或硬件着色器
- Remove D3DX dependency
- Remove D3DX dependency, using pure D3D lib in Windows SDK
- 清除对D3DX库的依赖,使用Windows SDK自带的原生的D3D库
- Remove ATL dependency
- Remove ATL dependency, load BMP by hand.
- 清除对ATL BMP库的依赖,利用HEADER STRUCT手工读取BMP。
- Renderer abstract | 渲染器抽象
- 进一步抽象渲染器,将Shader切换,ShaderConstants的设置抽象出来。
- 渲染器抽象到dll模块,并使用插件方式加载。
- 资源管理剥离
- 将资源和渲染器剥离,使得可以在运行过程中实时切换渲染器,渲染器相关资源和实际资源进行动态绑定。
Performance | 性能
v0.2 DEMO
- 640 x 360 pixels
- sponza scene: 262000 tris,diffuse,normal,spec texture x35
- SSAO, jit AA, Bilinear Texture Filtering
- 18-25 fps @ Intel i5 2500K / oc 4.0Ghz x 4
- 7-10 fps @ Intel i3 530 / 2.93Ghz x 2
v0.3
- 854 x 480pixels
- sponza scene: 262000 tris, diffuse, spec texture x35
- Jit AA, Bilinear Texture Filtering
- 15-23 fps @ Intel i5 2500K / oc 4.0Ghz x 4 (MSVC Compiler)
- 19-28 fps @ Intel i5 2500K / oc 4.0Ghz x 4 (Intel Compiler)
- 4-5 fps @ Intel i3 530 / 2.93Ghz x 2 (MSVC Compiler)
How to | 部署
Plan | 计划
- D3D11 Hw Renderer, also switchable in run-time.
- Cuda Sw Renderer, also switchable in run-time.
- Skin-Animation Integrate.
- Terrian System