-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
17 additions
and
17 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
#version 400 | ||
#version 450 | ||
#extension GL_ARB_separate_shader_objects : enable | ||
#extension GL_ARB_shading_language_420pack : enable | ||
layout(location = 0) in vec3 position; | ||
layout(location = 1) in vec4 color; | ||
|
||
layout (binding = 0) uniform samplerBuffer texels; | ||
layout (binding = 0,rgba32f) uniform readonly imageBuffer texels; | ||
layout (location = 0) out vec4 outColor; | ||
|
||
void main() { | ||
float r = texelFetch(texels, gl_VertexIndex*3).r; | ||
float g = texelFetch(texels, gl_VertexIndex*3+1).r; | ||
float b = texelFetch(texels, gl_VertexIndex*3+2).r; | ||
outColor = vec4(r, g, b, 1.0); | ||
float r = imageLoad(texels, gl_VertexIndex*3).r; | ||
float g = imageLoad(texels, gl_VertexIndex*3+1).r; | ||
float b = imageLoad(texels, gl_VertexIndex*3+2).r; | ||
outColor = vec4(r,g,b,1.0); | ||
gl_Position = vec4(position, 1.0); | ||
} |
Binary file not shown.
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