Author Topic: Dissecting a Shader Quine  (Read 750 times)

0 Members and 1 Guest are viewing this topic.

JeGX

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1676
    • View Profile
    • Geeks3D.com
Dissecting a Shader Quine
« on: August 17, 2018, 02:47:58 PM »
Quote
I'm not normally very interested in quines, but today I saw one that that really made me sit down and study it carefully. It was a quine in the form of a shadertoy.

For those that might be wondering, the impressive thing about this is that GLSL doesn't really have a concept of text, or fonts, or anything that could be used to put human-readable messages on the screen. The output of a pixel shader is just a color, and that's it. So how does this thing manage to display its own source code and be so compact? That's what I set out to learn.

Links:
- https://gpfault.net/posts/shader-quine.txt.html
- https://www.shadertoy.com/view/llcyD2