Questions tagged «frustum»

2
OpenGL中的延迟平铺阴影,平铺视锥面计算
我正在尝试使用计算着色器在OpenGL中进行延迟的平铺着色,但是在尝试为每个平铺创建平截头体时遇到了障碍。我正在使用AMD的Forward +演示(用D3D编写)作为指导,但是当不应该使用时,灯光似乎被剔除了。 更新 阅读下面的更新。 这是我的(完整)计算着色器: #version 430 core #define MAX_LIGHTS 1024 #define MAX_LIGHTS_PER_TILE 40 #define WORK_GROUP_SIZE 16 struct PointLight { vec3 position; float radius; vec3 color; float intensity; }; layout (binding = 0, rgba32f) uniform writeonly image2D outTexture; layout (binding = 1, rgba32f) uniform readonly image2D normalDepth; layout (binding = …

1
gluLookAt如何工作?
据我了解, gluLookAt( eye_x, eye_y, eye_z, center_x, center_y, center_z, up_x, up_y, up_z ); 等效于: glRotatef(B, 0.0, 0.0, 1.0); glRotatef(A, wx, wy, wz); glTranslatef(-eye_x, -eye_y, -eye_z); 但是当我打印出ModelView矩阵时,对的调用glTranslatef()似乎无法正常工作。这是代码片段: #include <stdlib.h> #include <stdio.h> #include <GL/glut.h> #include <iomanip> #include <iostream> #include <string> using namespace std; static const int Rx = 0; static const int Ry …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.