19 lines
458 B
GLSL
19 lines
458 B
GLSL
/*
|
|
* MIT License
|
|
* Author: Mark Allyn
|
|
*
|
|
* sweep.vert — fullscreen quad vertex shader used by the phosphor
|
|
* accumulation ping-pong pass. vTexCoord maps 1:1 to the phosphor
|
|
* FBO in PPI space (u=0 west, u=1 east, v=0 south, v=1 north).
|
|
*/
|
|
#version 330 core
|
|
|
|
layout(location = 0) in vec2 aPos; // clip-space quad [-1,+1]^2
|
|
|
|
out vec2 vTexCoord;
|
|
|
|
void main() {
|
|
gl_Position = vec4(aPos, 0.0, 1.0);
|
|
vTexCoord = aPos * 0.5 + 0.5; // [0,1]^2
|
|
}
|