Skip to content

Instantly share code, notes, and snippets.

@smakhtin
Created May 31, 2013 14:17
Show Gist options
  • Select an option

  • Save smakhtin/5685278 to your computer and use it in GitHub Desktop.

Select an option

Save smakhtin/5685278 to your computer and use it in GitHub Desktop.
float x = DTid.x % Size.x;
float y = DTid.x / Size.y;
y = y - frac(y);
x /= Size.x;
y /= Size.y;
Output[DTid.x] = texture2d.SampleLevel(g_samLinear, float2(x, y), 0, 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment