zoukankan
html css js c++ java
GLSL学习笔记 9.1 Transformation
转换顶点到裁减坐标系中的两种方式
gl_Position
=
gl_ModelViewProjectionMatrix
*
gl_Vertex;
gl_Position
=
ftransform();
转换顶点到眼坐标系中
vec4 ecPosition;
vec3 ecPosition3;
//
in 3 space
//
Transform vertex to eye coordinates
if
(NeedEyePosition)
{
ecPosition
=
gl_ModelViewMatrix
*
gl_Vertex;
ecPosition3
=
(vec3 (ecPosition))
/
ecPosition.w;
}
转换法线到眼坐标系中
normal
=
gl_NormalMatrix
*
gl_Normal;
规格化法线
normal
=
normalize(normal);
缩放法线
normal
=
normal
*
gl_NormalScale;
纹理坐标变换
gl_TexCoord[
0
]
=
gl_TextureMatrix[
0
]
*
gl_MultiTexCoord0;
查看全文
相关阅读:
py 5.11
py 5.10
py 5.9
py 5.8
python 5.7
python 5.4
python 5.3
python 5.2
python 4.28
python 4.27
原文地址:https://www.cnblogs.com/Pointer/p/33949.html
最新文章
乐视面试
2012Tencent实习
LeetCode解题报告
2015-04-18 Tencent在THU暑期实习生笔试
配置ubuntu的命令提示符
配置ubuntu使用console登录登录欢迎提示
静态分析的四种基本方法
关于最近招实习的公司
设计模式六项基本原则
关于笔试的一些博客
热门文章
win10 64位环境安装配置Veins
OMNET++
OMNeT++网络节点的定义
车联网场景下V2V/V2I混合传输方式的研究
Data Security Sharing and Storage Based on a Consortium Blockchain in a Vehicular Ad-hoc Network
A new type of blockchain for secure message exchange in VANET
Integration of VANET and 5G Security: A review ofdesign and implementation issues
常见共识算法简介
《Practical Byzantine Fault Tolerance and Proactive Recovery》别人阅读记录
虚拟机上安装Veins
Copyright © 2011-2022 走看看