
Commodore 64 in a shader - epsylon
https://www.shadertoy.com/view/Xs3XW4
======
0x0
Neat, but isn't this just a c64 text mode screen buffer fixed-font renderer in
a shader? I mean, even the most basic statement "print 2" doesn't work.

Still, pretty cool to see a shader emulating a text mode screen buffer.

~~~
kenz0r
Shift 2 to get double quotes, and you'll need to assign line numbers

Try the example

~~~
0x0
I wasn't looking for double quotes, I was looking for printing an integer :)
Actually I was going for print 2+2 but i couldn't get + to enter. I assumed
there was nothing going on since print 2 didn't produce any output at all in
immediate mode (no line numbers) :)

------
onedognight
This one is a Apple ][ in a shader, complete with NTSC emulation.

    
    
        http://porkrind.org/a2

------
daveloyall
A shader is a thing in a graphics card, right?

Obviously that description is insufficient. What are shaders?

~~~
tonyarkles
Yes, you're right.

Shaders are small chunks of code that run on the GPU. Usually they're used to
do things like process geometry (lots of matrix multiplications), map
triangles to pixels (lots more matrix multiplication), and things like that.
Vector and matrix math, with some logic, sometimes.

What appears to be going on here is that the entire state of the machine,
including IO, registers, and memory, is getting mapped into textures. The
shader then processes the pixel values from those textures through a series of
conditionals to output a new state into a new texture. Next frame, the process
continues.

Pretty nifty, and a glorious abuse of the incredible compute power available
in modern GPUs. I ran it on a cheap integrated Intel GPU and it was rock solid
at 60fps.

