Re: [filters] Shading language recommendation

On Aug 21, 2012, at 9:52 AM, Sylvain Galineau <sylvaing@microsoft.com> wrote:

> The normative prose of section 38.2 'Recommended shading language' recommends 
> GL SL ES [1]. Per RFC2119 this means implementers MUST support GL SL ES 
> unless there exist 'valid reasons in particular circumstances' to ignore this 
> recommendation. 
> 
> While Microsoft has no objection to defining how the feature works for UAs 
> that choose GL SL ES as defined by Web GL 1.0, we object to its normative
> recommendation. This was the reason for the note in the same section, note
> which looks at best confusing if not contradictory given the normative 
> recommendation that precedes it.
> 
> We would prefer to follow a pattern similar to the informative section 6.1 in 
> Media Source Extension[2]: "This section defines segment formats for 
> implementations that choose to support WebM". We think the ability to specify 
> multiple shading languages is important, as broadly suggested by the current 
> note. This allows sites to work with different user agents supporting different 
> shading languages. For example, a future version of GL SL ES with fallback to 
> the current version for user agents that don't yet support the new version.

GLSL ES was chosen because it matches what WebGL uses. Through the ANGLE library, WebGL can be ported to Direct3D based systems. ANGLE converts GLSL to HLSL for Direct3D. And the variant of GLSL used by WebGL (as well as the rest of the WebGL API) is designed to be easily portable to Direct3D. ANGLE also makes the shaders portable to desktop OpenGL implementations. So I don't think there are any technical roadblocks to using GLSL as a "generic" shading language.

And it would be a travesty if there were not a single required shader language, from an interoperability standpoint. I really don't think we want to go down the same path and suffer the same pain as in media formats.

-----
~Chris Marrin
cmarrin@apple.com

Received on Tuesday, 21 August 2012 20:32:28 UTC