Advertisement
Guest User

Untitled

a guest
Jan 6th, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. ****** Input:
  2.  
  3.  
  4.  
  5. // LGSL version of C2E1v_green from "The Cg Tutorial" (Addison-Wesley, ISBN
  6.  
  7. // 0321194969) by Randima Fernando and Mark J. Kilgard.  See page 38.
  8.  
  9.  
  10.  
  11. float3 C2E1v_green(in float2 position : ATTRIBUTE_0, out float4 NDCPosition : HPOS) : INTERPOLATOR_0
  12.  
  13. {  
  14.  
  15.   NDCPosition = float4(position,0,1);
  16.  
  17.   return float3(0,1,0);
  18.  
  19. }
  20.  
  21.  
  22.  
  23.  
  24. ****** Output:
  25.  
  26.  
  27.  
  28. uniform vec2 position;
  29.  
  30.  
  31.  
  32. vec3 main() : INTERPOLATOR_0
  33.  
  34. {
  35. vec4 NDCPosition; //HPOS
  36.  
  37.    
  38.  
  39.   NDCPosition = float4(position,0,1);
  40.  
  41.   gl_TexCoord[0] =  float3(0,1,0); 
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement