X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fplayback3d.C;h=3b9cd6901edb6cf3461a808713693c2a95c66faf;hb=9e779f63289f91f132569a933ddc93f4c1487751;hp=a6a721ba80feb38266e5c60ca0a30c7e2947ba69;hpb=5820b5f022aeec75ec03f7dd0121aa8a3d7f7590;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/playback3d.C b/cinelerra-5.1/cinelerra/playback3d.C index a6a721ba..3b9cd690 100644 --- a/cinelerra-5.1/cinelerra/playback3d.C +++ b/cinelerra-5.1/cinelerra/playback3d.C @@ -53,6 +53,7 @@ // Can't hard code sampler2D +#ifdef HAVE_GL static const char *yuv_to_rgb_frag = "uniform sampler2D tex;\n" "void main()\n" @@ -197,10 +198,10 @@ static const char *blend_divide_frag = "void main() {\n" " vec4 canvas = texture2D(tex2, gl_FragCoord.xy / tex2_dimensions);\n" " vec4 result = gl_FragColor / canvas;\n" - " if(!canvas.r) result.r = 1.0;\n" - " if(!canvas.g) result.g = 1.0;\n" - " if(!canvas.b) result.b = 1.0;\n" - " if(!canvas.a) result.a = 1.0;\n" + " if(canvas.r == 0.) result.r = 1.0;\n" + " if(canvas.g == 0.) result.g = 1.0;\n" + " if(canvas.b == 0.) result.b = 1.0;\n" + " if(canvas.a == 0.) result.a = 1.0;\n" " result = clamp(result, 0.0, 1.0);\n" " gl_FragColor = mix(canvas, result, alpha);\n" "}\n"; @@ -219,7 +220,6 @@ static const char *blend_max_frag = "void main() {\n" " vec4 canvas = texture2D(tex2, gl_FragCoord.xy / tex2_dimensions);\n" " vec4 result = max(canvas, gl_FragColor);\n" - " result = clamp(result, 0.0, 1.0);\n" " gl_FragColor = mix(canvas, result, alpha);\n" "}\n"; @@ -231,7 +231,6 @@ static const char *blend_min_frag = "void main() {\n" " vec4 canvas = texture2D(tex2, gl_FragCoord.xy / tex2_dimensions);\n" " vec4 result = min(canvas, gl_FragColor);\n" - " result = clamp(result, 0.0, 1.0);\n" " gl_FragColor = mix(canvas, result, alpha);\n" "}\n"; @@ -243,7 +242,6 @@ static const char *blend_average_frag = "void main() {\n" " vec4 canvas = texture2D(tex2, gl_FragCoord.xy / tex2_dimensions);\n" " vec4 result = (canvas + gl_FragColor) * 0.5;\n" - " result = clamp(result, 0.0, 1.0);\n" " gl_FragColor = mix(canvas, result, alpha);\n" "}\n"; @@ -400,7 +398,6 @@ static const char *blend_or_frag = "void main() {\n" " vec4 canvas = texture2D(tex2, gl_FragCoord.xy / tex2_dimensions);\n" " vec4 result = canvas + gl_FragColor - canvas * gl_FragColor;\n" - " result = clamp(result, 0.0, 1.0);\n" " gl_FragColor = mix(canvas, result, alpha);\n" "}\n"; @@ -481,11 +478,7 @@ static const char *fade_yuv_frag = " gl_FragColor.gb += vec2(0.5, 0.5);\n" "}\n"; - - - - - +#endif Playback3DCommand::Playback3DCommand() @@ -739,7 +732,7 @@ void Playback3D::copy_from_sync(Playback3DCommand *command) // command->frame->get_h(), // BC_RGB888, // -1); -// command->frame->to_ram(); +// command->frame->screen_to_ram(); // // window->clear_box(0, // 0,