Outputs a terminal fullscreen rendering of simple ruby scripts, designed to mimic fragment shader code.
Run one of the examples:
$ ./bin/tbs examples/italy.rb
To write your own shader follow this template, then run /bin/tbs with the path to the ruby file:
# u, v are normalized x and y coords, go from 0.0 to 1.0
# t is time
# aspect is width/height, it can be used to adjust for window size changes
# output is a ruby Vector initiliazed to [0, 0, 0, 0]
def fragment(u, v, t, aspect, output)
# your code here
# you should return a modified output
# r is color red component
# g is color green component
# b is color blue component
# alpha is used to decide which character to render (smaller number -> smaller character), 0.0 is whitespace
output += Vector[r, g, b, alpha]
end