Files
oak-editor/app/shaders/rgbhistogram.vert
T
itsmattkcandThomas Wilshaw a4056d8454 Upgrade to OpenGL ES 3.2 (#1879)
* upgrade to opengl 3.2

* cornerpin: no need for hack

* renderer: Update OCIO shader language to ES 3.0

Co-authored-by: Thomas Wilshaw <thomaswilshaw@gmail.com>
2022-03-20 11:17:18 -07:00

27 lines
527 B
GLSL

uniform float histogram_scale;
in vec4 a_position;
in vec2 a_texcoord;
out vec2 ove_texcoord;
mat4 scale_mat4(vec3 scale) {
return mat4(
scale.x, 0.0, 0.0, 0.0,
0.0, scale.y, 0.0, 0.0,
0.0, 0.0, scale.z, 0.0,
0.0, 0.0, 0.0, 1.0
);
}
void main() {
// Create identity matrix
mat4 transform = mat4(1.0);
// Scale the scope
transform *= scale_mat4(vec3(histogram_scale, histogram_scale, 1.0));
gl_Position = transform * a_position;
ove_texcoord = a_texcoord;
}