Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2012
468
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. Shader "GLSL basic shader" { // defines the name of the shader
  2. SubShader { // Unity chooses the subshader that fits the GPU best
  3. Pass { // some shaders require multiple passes
  4. GLSLPROGRAM // here begins the part in Unity's GLSL
  5. #ifdef VERTEX // here begins the vertex shader
  6. void main() // all vertex shaders define a main() function
  7. {
  8. gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
  9. }
  10. #endif // here ends the definition of the vertex shader
  11. #ifdef FRAGMENT // here begins the fragment shader
  12.  
  13. #include "UnityCG.glslinc"
  14.  
  15. void main() // all fragment shaders define a main() function
  16. {
  17. gl_FragColor = vec4(0,sin(_Time.y)*1.0,0,1.0);
  18. }
  19. #endif // here ends the definition of the fragment shader
  20. ENDGLSL // here ends the part in GLSL
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement