Advertisement
Guest User

Untitled

a guest
Jan 20th, 2013
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. Input:
  2. // LGSL version of C2E1v_green from "The Cg Tutorial" (Addison-Wesley, ISBN
  3. // 0321194969) by Randima Fernando and Mark J. Kilgard. See page 38.
  4.  
  5. float3 C2E1v_green(in float2 position : ATTRIBUTE_0, out float4 NDCPosition : HPOS) : INTERPOLATOR_0
  6. {
  7. NDCPosition = float4(position,0,1);
  8. return float3(0,1,0);
  9. }
  10.  
  11. ------------------------------------------
  12. Output:
  13.  
  14. layout(location = 0) out vec3 return_value_INTERPOLATOR_0;
  15. layout(location = 0) in vec2 position;
  16.  
  17. void main()
  18. {
  19.  
  20. gl_Position = vec4(position,0,1);
  21. return_value_INTERPOLATOR_0 = vec3(0,1,0);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement