Advertisement
atm959

shaders.shader

Nov 3rd, 2018
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. cbuffer MatrixBuffer {
  2. matrix matt;
  3. };
  4.  
  5. Texture2D tex;
  6. Texture2D tex2;
  7. SamplerState sampState;
  8.  
  9. struct VOut {
  10. float4 position : SV_POSITION;
  11. float4 color : COLOR;
  12. float2 TexCoord : TEXCOORD;
  13. };
  14.  
  15. VOut VShader(float4 position : POSITION, float4 color : COLOR, float2 inTexCoord : TEXCOORD) {
  16. VOut output;
  17.  
  18. output.position = mul(position, matt);
  19. output.color = color;
  20. output.TexCoord = inTexCoord;
  21.  
  22. return output;
  23. }
  24.  
  25.  
  26. float4 PShader(float4 position : SV_POSITION, float4 color : COLOR, float2 TexCoord : TEXCOORD) : SV_TARGET {
  27. return color * tex.Sample(sampState, TexCoord);// * tex2.Sample(sampState, TexCoord);
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement