beachball.vs
来自「OpeNGL超级宝典源代码. OpeNGL超级宝典源代码.」· VS 代码 · 共 25 行
VS
25 行
// beachball.vs
//
// Generic vertex transformation,
// copy object-space position and
// lighting vectors out to interpolants
uniform vec3 lightPos;
varying vec3 N, L, V;
void main(void)
{
// normal MVP transform
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// map object-space position onto unit sphere
V = gl_Vertex.xyz;
// eye-space normal
N = gl_NormalMatrix * gl_Normal;
// eye-space light vector
vec4 Veye = gl_ModelViewMatrix * gl_Vertex;
L = lightPos - Veye.xyz;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?