Skip to content

Instantly share code, notes, and snippets.

@rodzyk
Created March 17, 2025 14:03
Show Gist options
  • Select an option

  • Save rodzyk/9dfd609312285740d0340333a484b150 to your computer and use it in GitHub Desktop.

Select an option

Save rodzyk/9dfd609312285740d0340333a484b150 to your computer and use it in GitHub Desktop.
uniform shader iChunk;
uniform float2 iChunkSize;
uniform float2 iChunkOffset;
uniform float2 iContentSize;
uniform float2 iMouse;
half4 main(float2 xy) {
float pixelSize = 4;
float2 pixelPos = floor(xy / pixelSize) * pixelSize;
half4 color = iChunk.eval(pixelPos);
return color;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment