Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. // Main function
  2.  
  3. float4 ps_main( in VS_OUTPUT In ) : COLOR
  4. {
  5. // look up colour
  6.  
  7. float4 tex_col = tex2D(Tex0, In.Texture);
  8.  
  9. // NO CHANGE
  10. //return tex_col;
  11.  
  12. // S-SHAPE
  13. float4 x_sq = tex_col * tex_col;
  14. float4 x_cu = x_sq * tex_col;
  15. //return -2.0f * x_cu + 3.0f * x_sq;
  16. float4 shape = -2.0f * x_cu + 3.0f * x_sq;
  17. //return shape;
  18.  
  19. // GAMMA
  20. //return pow(tex_col, 0.5f);
  21.  
  22. // CONTRAST
  23. return (tex_col - float4(0.5f, 0.5f, 0.5f, 0.0f)) * 1.0f + float4(0.5f, 0.5f, 0.5f, 0.0f); // contrast
  24.  
  25. // SIMPLE HDR
  26. return tex_col / (1.0f + tex_col) ;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement