1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-07 03:13:49 +00:00

Fix compilation with USE_TOONIFY enabled.

This commit is contained in:
Sergey Lipskiy 2014-11-20 17:09:18 +06:00
parent e2347a09a5
commit 647a9cdf02
3 changed files with 6 additions and 4 deletions

View File

@ -494,7 +494,7 @@ ShaderCombiner::ShaderCombiner(Combiner & _color, Combiner & _alpha, const gDPCo
strFragmentShader.append(fragment_shader_end);
#ifdef USE_TOONIFY
strBuffer.append(fragment_shader_toonify);
strFragmentShader.append(fragment_shader_toonify);
#endif
#ifdef GLES2

View File

@ -116,4 +116,6 @@ void InitShaderCombiner();
void DestroyShaderCombiner();
void SetShadowMapCombiner();
//#define USE_TOONIFY
#endif //GLSL_COMBINER_H

View File

@ -201,7 +201,7 @@ static const char* fragment_shader_header_common_functions =
"bool alpha_test(in float alphaValue); \n"
#endif
#ifdef USE_TOONIFY
"void toonify(in float intensity); \n"
"void toonify(in mediump float intensity); \n"
#endif
;
@ -316,9 +316,9 @@ static const char* fragment_shader_toonify =
" if (intensity > 0.5) \n"
" return; \n"
" else if (intensity > 0.125) \n"
" gl_FragColor = vec4(vec3(gl_FragColor)*0.5, gl_FragColor.a);\n"
" fragColor = vec4(vec3(fragColor)*0.5, fragColor.a);\n"
" else \n"
" gl_FragColor = vec4(vec3(gl_FragColor)*0.2, gl_FragColor.a);\n"
" fragColor = vec4(vec3(fragColor)*0.2, fragColor.a);\n"
"} \n"
;
#endif