相关疑难解决方法(0)

顶点着色器中的透视划分?

When using a perspective matrix in a vertex shader am I supposed to write code to divide by w or is it done automatically in a later stage?

The reason for my question is that I have seen lots of vertex shaders using:

gl_Position = matrix * pos;
Run Code Online (Sandbox Code Playgroud)

which makes sense if there is a later stage that divides the vector with its w component.

However I never got it to work until I used the following in my vertex …

opengl opengl-3

5
推荐指数
1
解决办法
2565
查看次数

标签 统计

opengl ×1

opengl-3 ×1