SHARE
TWEET

Pixel Shader

a guest May 1st, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Texture2D map_Ka    :   register(t0);
  2. Texture2D map_Kd    :   register(t1);
  3. Texture2D map_Ks    :   register(t2);
  4. Texture2D map_Ns    :   register(t3);
  5. Texture2D map_d     :   register(t4);
  6. Texture2D map_bump  :   register(t5);
  7.  
  8. SamplerState Sampler : register(s0);
  9.  
  10. cbuffer MaterialBuffer : register(b0) {
  11.     float3 Ka;
  12.     float3 Kd;
  13.     float3 Ks;
  14.     float3 Ke;
  15.     float Ns;
  16.     float Tr;
  17.     float d;
  18.     float bias;
  19. };
  20.  
  21. struct PixelShaderInput {
  22.     float4 position: SV_POSITION;
  23.     float4 normal: NORMAL;
  24.     float2 texCoord: TEXCOORD;
  25. };
  26.  
  27. float4 psEntryPoint(PixelShaderInput input) : SV_TARGET {
  28.     float4 color = map_Kd.Sample(Sampler, input.texCoord);
  29.     return color;
  30. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top