Giter Site home page Giter Site logo

rs-cpurenderer's Introduction

使用纯Rust编写的3D软渲染器。

B站视频教程

目前的显示

snapshot

工程运行

只有一个例子:examples/sandbox.rs,用

cargo run --example sandbox

运行。

使用WSAD前后左右移动相机,使用Q上升相机,E下降相机。

本工程由两种软渲染:纯粹为了在CPU上快速运行的CPU软渲染(./src/cpu_renderer.rs),以及模拟GPU原理的GPU软渲染(./src/gpu_renderer.rs)。使用features可以指定运行某种:

cargo run --example sandbox --features cpu
cargo run --example sandbox --features gpu

默认是CPU渲染。

参考

书籍:

  • 《3D游戏编程大师技巧》
  • 《Fundamentals of Computer Graphics》
  • 《线性代数及其应用》

视频:

齐次空间裁剪:

投影矩阵推导:

透视投影矫正:

其他:

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.