X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=mupen64plus-pandora.git;a=blobdiff_plain;f=source%2Fgles2glide64%2Fsrc%2FGlitch64%2Fcombiner.cpp;h=ace5033a62dc6721512a1da411a103ef69ed3ee8;hp=b82f8fa8794d20ad7b7032e15046cde363d709d4;hb=2d26287291331f2b1793a8e76ede08c75654fb7c;hpb=01d8ca6fb06a8261602900cab63c61e5a1b143c9 diff --git a/source/gles2glide64/src/Glitch64/combiner.cpp b/source/gles2glide64/src/Glitch64/combiner.cpp index b82f8fa..ace5033 100755 --- a/source/gles2glide64/src/Glitch64/combiner.cpp +++ b/source/gles2glide64/src/Glitch64/combiner.cpp @@ -177,7 +177,7 @@ static const char* vertex_shader = SHADER_HEADER "#define Z_MAX 65536.0 \n" "attribute highp vec4 aVertex; \n" -"attribute mediump vec4 aColor; \n" //*SEB* highp -> lowp +"attribute mediump vec4 aColor; \n" //*SEB* highp -> mediump "attribute highp vec4 aMultiTexCoord0; \n" "attribute highp vec4 aMultiTexCoord1; \n" "attribute float aFog; \n" @@ -267,12 +267,14 @@ void init_combiner() int log_length; //#ifndef ANDROID +#if 0 +// unfortunatly, Pandora has not the gl_FragDepthEXT extension... So I disable this block. // depth shader fragment_depth_shader_object = glCreateShader(GL_FRAGMENT_SHADER); - char s[128]; + char s[512]; // ZIGGY convert a 565 texture into depth component - sprintf(s, "gl_FragDepth = dot(texture2D(texture0, vec2(gl_TexCoord[0])), vec4(31*64*32, 63*32, 31, 0))*%g + %g; \n", zscale/2/65535.0, 1-zscale/2); + sprintf(s, "gl_FragDepthEXT = dot(texture2D(texture0, vec2(gl_TexCoord[0])), vec4(31*64*32, 63*32, 31, 0))*%g + %g; \n", zscale/2/65535.0, 1-zscale/2); fragment_shader = (char*)malloc(strlen(fragment_shader_header)+ strlen(s)+ strlen(fragment_shader_end)+1); @@ -284,7 +286,7 @@ void init_combiner() glCompileShader(fragment_depth_shader_object); check_compile(fragment_depth_shader_object); -//#endif +#endif // default shader fragment_shader_object = glCreateShader(GL_FRAGMENT_SHADER);