Back in 1990s, PC entered the era of 3D graphics hardware grating. Voodoo replaces CPU raster rendering. Next, nvidia tnt emerged. Until geforce swallowed up 3dfx. The evolution of GPUs has been around for eight years. Complex Computing Based on each pixel on the screen has allowed the old shader programmers to ignore the differences between C and HLSL.
Before developing the next generation MMO 3D engine tool platform, it is necessary to go back to the GPU To Focus On The ry and grating pipelines. The increasingly complex shader effect is based on the operating mechanism of the grating. The goal of moving work from the GPU back to the CPU is to enable graphic developers to salvage the basics of graphics and make better use of GPU functions in the next generation of development.
Softcore is a software grating. This is a technical demonstration of the entire graphic processing pipeline from geometry transform, clipping, lighting, texture mapping, and Gouraud shading of scene objects to the final raster display. All optimizations are omitted for this project to keep the code clear. It is only marked in steps where SIMD and multithread can be used. For ease of learning, the project integrates SIMD and Math library code in the id software doom3 SDK.
Because it was made in two weeks in my spare time and has limited time, the main purpose is to demonstrate the core 3D acceleration algorithm. The Tc, color numerical computation, and sampler parts of the raster still need further tunning. Overflow and floating-point Integer Conversion rules need to be removed. These can be modified by interested parties.
Softcore Project
Done:
* CPU soft Rasterization
* Z-Buffer
* Gouraud shading
* Perspective correct texturemapping
* Near plane Clipping
* Back face culling (geometry)
* Directional Lighting
Not do:
X Phong Shading/bump mapping
X bilinear Filter
X mipmap
X dynamic lightmap
X vertex color Export/Import
X Optimization
The following figure shows the source image of the 3dsmax scenario. With the hardware bilinear, the effect is still different .....
Technical details are provided later