mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Fix monochrome shaders for GLES2
This commit is contained in:
parent
15f90a0699
commit
341f9848bb
|
@ -89,6 +89,19 @@ namespace glsl {
|
|||
public:
|
||||
MonochromeFragmentShader(const opengl::GLInfo & _glinfo)
|
||||
{
|
||||
if (_glinfo.isGLES2) {
|
||||
m_part =
|
||||
"uniform sampler2D uColorImage; \n"
|
||||
"uniform mediump vec2 uScreenSize; \n"
|
||||
"void main() \n"
|
||||
"{ \n"
|
||||
" mediump vec2 coord = gl_FragCoord.xy/uScreenSize; \n"
|
||||
" lowp vec4 tex = texture2D(uColorImage, coord); \n"
|
||||
" lowp float c = dot(vec4(0.2126, 0.7152, 0.0722, 0.0), tex); \n"
|
||||
" gl_FragColor = vec4(c, c, c, 1.0); \n"
|
||||
"} \n"
|
||||
;
|
||||
} else {
|
||||
m_part =
|
||||
"uniform sampler2D uColorImage; \n"
|
||||
"OUT lowp vec4 fragColor; \n"
|
||||
|
@ -102,6 +115,7 @@ namespace glsl {
|
|||
"} \n"
|
||||
;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*---------------TexrectDrawerShaderPart-------------*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user