[ create a new paste ] login | about

Link: http://codepad.org/n8PNNZRd    [ raw code | fork ]

Plain Text, pasted on Dec 12:
1
2
3
4
5
6
7
8
9
10
11
// VERTEX SHADER

out vec4 vertex_in_eye = view_matrix * vertex_in_world;
gl_position = proj_matrix * vertex_in_eye;


// FRAGMENT SHADER

fragment_in_eye = vertex_in_eye + offsetInSphere;
fragment_in_clip = proj_matrix * fragment_in_eye;
gl_FragDepth = fragment_in_clip.z / fragment_in_clip.w;


Create a new paste based on this one


Comments: