Skip to content

Instantly share code, notes, and snippets.

@cbaggers
Last active August 29, 2015 14:24
Show Gist options
  • Save cbaggers/5c974e02a61f6b5fc920 to your computer and use it in GitHub Desktop.
Save cbaggers/5c974e02a61f6b5fc920 to your computer and use it in GitHub Desktop.
Implicit Uniform Capture
(defparameter *loop* 0.0)
(defun-g frag ()
(let ((loop *loop*))
(v! (cos loop) (sin loop) 0.4 1.0)))
;; Becomes
#version 330
layout(location = 0) out vec4 OUTPUT_COLOR_30V;
uniform float _42LOOP42;
void main() {
float LOOP_29V = _42LOOP42;
OUTPUT_COLOR_30V = vec4(cos(LOOP_29V),sin(LOOP_29V),0.4f,1.0f);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment