12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- /* License Notice:
- **
- ** This program is free software: you can redistribute it and/or modify
- ** it under the terms of the GNU General Public License as published by
- ** the Free Software Foundation, either version 3 of the License, or
- ** (at your option) any later version.
- ** This program is distributed in the hope that it will be useful,
- ** but WITHOUT ANY WARRANTY; without even the implied warranty of
- ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ** GNU General Public License for more details.
- ** You should have received a copy of the GNU General Public License
- ** along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
- /**
- * @file shader.frag
- * @author TooOld2Rock'nRoll
- * @date 2022/Ago
- * @remark Last modified in 2023/Jul
- *
- * @brief Fragment Shader program for the ArcadeFighter library.
- *
- * Originally this code was part of Breakout, now part of ArcadeFighter library
- * and was modified by the author as a exercise.<br>
- * Breakout is free software: you can redistribute it and/or modify
- * it under the terms of the CC BY 4.0 license as published by
- * Creative Commons, either version 4 of the License, or (at your
- * option) any later version.
- *
- * @see https://learnopengl.com/Getting-started/Shaders
- * @see https://www.khronos.org/opengl/wiki/OpenGL_Shading_Language
- * @see https://www.khronos.org/opengl/wiki/Fragment_Shader
- *
- * @todo give another try at chroma key (solid color for transparency), opengl does not like this!
- */
- //The minimum version of OpenGl that this program supports.
- #version 330 core
- in vec2 TexCoords; ///< which point (pixels don't quite make sense here) of the texture to render.
- out vec4 FragColor; ///< forward the color to render the fragment.
- uniform sampler2D image; ///< the texture
- uniform vec4 color; ///< color tint to apply over the texture
- /**
- * @brief The main method of the Fragment Shader.
- */
- void main ()
- {
- FragColor = color * texture(image, TexCoords);
- }//END main ()
|