Skip to content

qjtdsqqm94akkyysgjdqo3hx1jn6l17/tinyrenderer-bash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tinyrenderer, but in bash (and ANSI escape sequences)

Result from lesson 1

What?

As is said, this is an attempt to follow ssloy's tinyrenderer course (older version here) but without stepping half a foot outside GNU bash & ANSI escape sequences. And as seen from the state of this repo - it's... not really going too well.

No vibe coding/AI that edit the codebase. This bad idea is 100% birth from a human, start to finish.

Why?

Once again, good question.

How?

The "canvas" initialization and pixel drawing was handled by my bash-graphics scripts. Basically it uses ANSI escape sequences to change the printing cursor's position and colors (foreground and background). It then prints a character, which with both the fg and bg being changeable represents 2 vertically stacked pixels.

Performance?

You Serious?

Run

  1. git clone this
  2. Open terminal in root of project & git submodule init
  3. bash lesson<number>/<filename>.bash
  • If it complains about the terminal being too small, hit Ctrl+- a whole bunch and try again.

TODO:

  • obj parser
  • Rest of course
  • Rest of course, but 100% integer math
  • o p t i m i z a t i o n s

Course Progress:

  • Bresenham’s line drawing
    • Homework: obj wireframe rendering
  • Triangle rasterization
    • make it so where rendering big triangles don't seemingly crashes my Desktop
    • Bug squashing
    • Bug squashing
    • Bug squashing
    • Bug sq
  • Barycentric coordinates
  • Hidden faces removal
  • Naive camera handling
  • Better camera

Showoffs:

lesson1_whale.mp4
diablo.mp4

About

Yes, it is what it said it is. No, it's worse than you feared.

Topics

Resources

License

Stars

Watchers

Forks

Languages