Settings

Theme

Commodore 64 in a shader

shadertoy.com

7 points by epsylon 10 years ago · 6 comments

Reader

0x0 10 years ago

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 10 years ago

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

    Try the example

    • 0x0 10 years ago

      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 10 years ago

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

    http://porkrind.org/a2
daveloyall 10 years ago

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

Obviously that description is insufficient. What are shaders?

  • tonyarkles 10 years ago

    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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection