Skip to content

Instantly share code, notes, and snippets.

@julik
Created August 21, 2013 21:23
Show Gist options
  • Save julik/6300476 to your computer and use it in GitHub Desktop.
Save julik/6300476 to your computer and use it in GitHub Desktop.
uniform sampler2D input1;
uniform float adsk_input1_w, adsk_result_w;
void main()
{
// this should output the width of the input1 into the G channel of the shader,
// but it's value is always zero. And it wasn't. The test_shader stipulates that
// adsk_{sampler_name}_w / adsk_{sampler_name}_h : when declared as a float
// uniform, this gives access to each texture's resolution
// but it's broken now
gl_FragColor = vec4( adsk_result_w + 1.0, adsk_input1_w + 1.0, 1.0, 1.0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment