Skip to content

Instantly share code, notes, and snippets.

@RoyLab
Created June 23, 2017 03:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RoyLab/9797bfef186a0b8c2feafc4a41674372 to your computer and use it in GitHub Desktop.
Save RoyLab/9797bfef186a0b8c2feafc4a41674372 to your computer and use it in GitHub Desktop.
sampling in compute shader
//output.height = lerp(lerp(a, b, localUV.x), lerp(c, d, localUV.x), localUV.y);
//output.height = _HeightMap.SampleLevel(MyPointRepeatSampler, uvSphere, 0).x;
//output.height = tex2Dlod(_HeightMap2, float4(uvSphere, 0, 0)).x;
float a = _HeightMap.Load(int3(coord.x, coord.y, 0)).x;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment