⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 phong.vrt

📁 G3D游戏引擎的库
💻 VRT
字号:
/**
 Per-pixel Phong Shading
 */

/** Camera origin in world space */
uniform vec3 wsEyePosition;

/** Non-unit vector to the eye from the vertex */
varying vec3 wsInterpolatedEye;

/** Non-unit surface normal in world space */
varying vec3 wsInterpolatedNormal;

void main(void) {
    wsInterpolatedNormal = g3d_ObjectToWorldNormalMatrix * gl_Normal;
    wsInterpolatedEye    = wsEyePosition - (g3d_ObjectToWorldMatrix * gl_Vertex).xyz;

    gl_Position = ftransform();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -