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

Re: [Public WebGL] Premultiplied alpha blending and issues with color accuracy



RE Mark: I meant that you cannot have an input sampler to a fragment shader also be bound as a render buffer in the current frame buffer: you cannot draw to yourself. It'll sometimes work on certain hardware, but not always. It would remove the need for ping-ponging/multiple render targets (not to be confused with MRT) in most image-related blending scenarios (compositing two layers together).

On the fly shader generator, yes - there are many potential pitfalls with that approach, though, that make building a robust image filter pipeline very difficult (namely: precision inconsistencies and performance when compiling).

RE Thor: ? activeTexture is used just to setup the sampler bindings for vertex/fragment shaders. In a vertex shader you can sample up to MAX_VERTEX_TEXTURE_IMAGE_UNITS textures, and in a fragment shader MAX_TEXTURE_IMAGE_UNITS. See: multitexturing

On Fri, May 11, 2012 at 5:39 PM, Thor Harald Johansen <thj@thj.no> wrote:

You can use any number of texture units you like (up
to MAX_TEXTURE_IMAGE_UNITS).

Simultaneously? In a single shader? AFAIK, WebGL only allows one active
texture per drawing operation.

Thor



-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------