File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ STRATUS_GLSL_VERSION
2+
3+ in vec3 fsTexCoords;
4+
5+ layout (location = 0 ) out vec4 fsColor;
6+
7+ uniform samplerCube skybox;
8+
9+ void main() {
10+ fsColor = texture(skybox, fsTexCoords);
11+ }
Original file line number Diff line number Diff line change 1+ STRATUS_GLSL_VERSION
2+
3+ layout (location = 0 ) in vec3 position;
4+
5+ out vec3 fsTexCoords;
6+
7+ uniform mat4 projection;
8+ uniform mat4 view;
9+
10+ void main() {
11+ fsTexCoords = position;
12+ vec4 pos = projection * view * vec4 (position, 1.0 );
13+ // Set the z and w components to w so that w / w = 1.0 which
14+ // is the maximum depth value. This will allow the graphics pipeline
15+ // to know that we always want the skybox to fail the depth test if a valid
16+ // pixel is already in the buffer from a previous stage.
17+ gl_Position = pos.xyww;
18+ }
You can’t perform that action at this time.
0 commit comments