mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 22:25:38 +00:00
34 lines
561 B
Plaintext
34 lines
561 B
Plaintext
|
// SPDX-License-Identifier: MIT
|
||
|
//
|
||
|
// EmulationStation Desktop Edition
|
||
|
// bgra_to_rgba.glsl
|
||
|
//
|
||
|
// Convert from color model BGRA to RGBA.
|
||
|
//
|
||
|
|
||
|
#if defined(VERTEX)
|
||
|
// Vertex section of code:
|
||
|
|
||
|
uniform mat4 MVPMatrix;
|
||
|
varying vec2 vTexCoord;
|
||
|
|
||
|
void main(void)
|
||
|
{
|
||
|
vTexCoord = gl_MultiTexCoord0.xy;
|
||
|
gl_Position = MVPMatrix * gl_Vertex;
|
||
|
}
|
||
|
|
||
|
#elif defined(FRAGMENT)
|
||
|
// Fragment section of code:
|
||
|
|
||
|
uniform sampler2D myTexture;
|
||
|
varying vec2 vTexCoord;
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
vec4 color = texture2D(myTexture, vTexCoord);
|
||
|
gl_FragColor = vec4(color.bgra);
|
||
|
}
|
||
|
|
||
|
#endif
|