[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] WEBGL_dynamic_texture extension proposal



On 2012/07/05 17:39, Florian Bösch wrote:
On Thu, Jul 5, 2012 at 9:47 AM, Mark Callow <callow_mark@hicorp.co.jp> wrote:

I welcome your comments and help to resolve all the listed issues.

I like the functionality. I dislike the use of a separate sampler type as in:
uniform samplerExternalOES videoSampler;

It means shaders have to be pre-processed according to the type of texture passed in, and that makes it quite a lot harder to support both static and dynamic textures at the same time, as well as writing utilities/libraries around filtering that work regardless.

If you use the same sampler type the implementation has to figure out at run-time what type of image it is sampling and may have to recompile the shader when switching between yuv and rgb images. It's not wonderful either way but I believe that the majority of applications will know in advance which textures will use dynamic sources. So I think the separate sampler type is the way to go. The underlying OES extension made the same choice.

Regards

    -Mark
--