-
Notifications
You must be signed in to change notification settings - Fork 0
/
ocean.vert
31 lines (25 loc) · 823 Bytes
/
ocean.vert
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*This is your first vertex shader!*/
#version 330 core
#define PI 3.14159265
/*default camera matrices. do not modify.*/
layout (std140) uniform camera
{
mat4 projection; /*camera's projection matrix*/
mat4 view; /*camera's view matrix*/
mat4 pvm; /*camera's projection*view*model matrix*/
mat4 ortho; /*camera's ortho projection matrix*/
vec4 position; /*camera's position in world space*/
};
/*input variables*/
layout (location=0) in vec4 pos; /*vertex position*/
layout (location=1) in vec4 color; /*vertex color*/
layout (location=2) in vec4 normal; /*vertex normal*/
layout (location=3) in vec4 uv; /*vertex uv*/
layout (location=4) in vec4 tangent; /*vertex tangent*/
/*output variables*/
out vec3 vtx_uv;
void main()
{
vtx_uv = uv.xyz;
gl_Position=pvm*vec4(pos.xyz,1.f);
}