-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ep13: Reorganize code and fix issues reported by LSP
- Loading branch information
Showing
21 changed files
with
1,426 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#version 330 | ||
|
||
out vec4 fragment_colour; | ||
|
||
uniform sampler2DArray texture_array_sampler; | ||
|
||
in vec3 local_position; | ||
in vec3 interpolated_tex_coords; | ||
in float interpolated_shading_value; | ||
|
||
void main(void) { | ||
vec4 texture_colour = texture(texture_array_sampler, interpolated_tex_coords); | ||
fragment_colour = texture_colour * interpolated_shading_value; | ||
|
||
if (texture_colour.a == 0.0) { // discard if texel's alpha component is 0 (texel is transparent) | ||
discard; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#version 330 | ||
|
||
layout(location = 0) in vec3 vertex_position; | ||
layout(location = 1) in vec3 tex_coords; | ||
layout(location = 2) in float shading_value; | ||
|
||
out vec3 local_position; | ||
out vec3 interpolated_tex_coords; | ||
out float interpolated_shading_value; | ||
|
||
uniform mat4 matrix; | ||
|
||
void main(void) { | ||
local_position = vertex_position; | ||
interpolated_tex_coords = tex_coords; | ||
interpolated_shading_value = shading_value; | ||
gl_Position = matrix * vec4(vertex_position, 1.0); | ||
} |
Empty file.
Empty file.
Oops, something went wrong.