我正在研究渲染管道,当我到达剪辑阶段时,我们解释说,从视图(眼睛或相机)空间我们必须传递到剪辑空间,也称为规范化设备空间(NDC),即立方体空间从-1到1.
但是,现在我不明白从这个空间到屏幕坐标空间的通道何时发生:
剪切后和光栅化之前?
光栅化后和剪刀和z测试之前?
在写入帧缓冲区之前的最后?
前提
按照一个定义规则,如C++14标准所述,只要我遵循3.2.6中的规则,我就可以在每个翻译单元中定义相同的类。这意味着允许以下程序合法:
//a_1.cpp
class A { //definition of A
int a; //definition of A::a
static int b; //declaration of A::b
int foo(); //declaration of A::foo();
int boo(){ return 42; }; //definition of A::boo() implicity inlined
};
//a_2.cpp
class A { //definition of A
int a; //definition of A::a
static int b; //declaration of A::b
int foo(); //declaration of A::foo();
int boo(){ return 42; }; //definition of A::boo() implicity inlined
};
Run Code Online (Sandbox Code Playgroud)
但是,如果我尝试定义bor foo(),则仅限于整个程序中的单个定义,我认为这是由于 3.2.4 …