Is there chance fixing ntsc-adaptive glslp android

Is there chance fixing ntsc-adaptive glslp for android ? Slang version works good but slow than opengl

Nope, it’s a limitation of the capabilities of the GLES shader pipeline not recognizing/enabling float framebuffers.

There are some other NTSC shaders that don’t have this requirement, but I think they’re all more demanding than ntsc-adaptive.

That said, many cores can use CPU-based NTSC simulation, either from an internal core option or through the frontend’s video filters.

1 Like

In theory, there might be possible adaptations in the code itself for normal, 8-bit buffers. First ntsc pass outputs to a float framebuffer, which allows negative values.

Negative values can be lifted to positive domain:

  1. pass: FragColor = vec4(0.5*yiq+0.5, 1.0);

And then corrections can be made at the end of the sampling in the second pass:

  1. pass: signal = 2.0*(signal - 0.5);

Test image without float framebuffer be like:

This is more a proof-of-concept, there are still issues with borders. But it might be a good start.

Edit: wrap_mode “mirrored_repeat” for second pass can help somewhat.

3 Likes

This could be the start of something good here.

1 Like

I’ve done different things to avoid float framebuffers before but always had the green borders. I never thought to try the mirrored_repeat wrap mode to get rid them, though :open_mouth:

EDIT: hmm, for that matter, I actually committed one of those strategies awhile back:

and it should already be in effect on any GLES devices. Dunno why it’s not taking effect for OP.