Advertisement
Guest User

Load HLSL intrinsic

a guest
Mar 24th, 2011
1,106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. /*Using Effect syntax*/
  2.  
  3. struct PixelShader_INPUT
  4. {
  5.     float4 p : SV_POSITION;
  6. };
  7.  
  8. float4 PixelMain(PixelShader_INPUT input) : SV_TARGET
  9. {
  10.     uint3 index = uint3(input.p.x, input.p.y, 0);
  11.     float val = tex0.Load(index).r;
  12.     float4 output = float4(val, val, val, 1);
  13.     return output;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement