Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "GLSL basic shader" { // defines the name of the shader
- SubShader { // Unity chooses the subshader that fits the GPU best
- Pass { // some shaders require multiple passes
- GLSLPROGRAM // here begins the part in Unity's GLSL
- #ifdef VERTEX // here begins the vertex shader
- void main() // all vertex shaders define a main() function
- {
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
- }
- #endif // here ends the definition of the vertex shader
- #ifdef FRAGMENT // here begins the fragment shader
- #include "UnityCG.glslinc"
- void main() // all fragment shaders define a main() function
- {
- gl_FragColor = vec4(0,sin(_Time.y)*1.0,0,1.0);
- }
- #endif // here ends the definition of the fragment shader
- ENDGLSL // here ends the part in GLSL
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement