xKamuna

HLSL/GLSL Example 3

May 6th, 2019
489
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. struct PSInput
  2. {
  3.     float4 Pos : SV_POSITION;
  4. };
  5.  
  6. // Vertex shader takes two inputs: vertex position and color.
  7. // By convention, Diligent Engine expects vertex shader inputs to
  8. // be labeled as ATTRIBn, where n is the attribute number
  9. PSInput main(float dummy : ATTRIB0)
  10. {
  11.     /*CONST FLOAT f = 1.0f / 255.0f;
  12.     r = f * (FLOAT)(unsigned char) (dw >> 16);
  13.     g = f * (FLOAT)(unsigned char) (dw >> 8);
  14.     b = f * (FLOAT)(unsigned char) (dw >> 0);
  15.     a = f * (FLOAT)(unsigned char) (dw >> 24);*/
  16.     PSInput ps;
  17.     ps.Pos = float4(dummy, dummy, dummy, dummy);
  18.     return ps;
  19. }
Add Comment
Please, Sign In to add comment