Skip to content

Instantly share code, notes, and snippets.

@noisecrime
Forked from nickdarnell/Downsampling.hlsl
Created December 20, 2016 22:33
Show Gist options
  • Save noisecrime/2c3a7d1b6a9cdbd955362c52849291c9 to your computer and use it in GitHub Desktop.
Save noisecrime/2c3a7d1b6a9cdbd955362c52849291c9 to your computer and use it in GitHub Desktop.
float4 vTexels;
vTexels.x = LastMip.Load( nCoords );
vTexels.y = LastMip.Load( nCoords, uint2(1,0) );
vTexels.z = LastMip.Load( nCoords, uint2(0,1) );
vTexels.w = LastMip.Load( nCoords, uint2(1,1) );
float fMaxDepth = max( max( vTexels.x, vTexels.y ), max( vTexels.z, vTexels.w ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment