W3C home > Mailing lists > Public > public-fx@w3.org > July to September 2012

Re: [filters] Shading language recommendation

From: Chris Marrin <cmarrin@apple.com>
Date: Tue, 21 Aug 2012 13:32:01 -0700
Cc: "public-fx@w3.org" <public-fx@w3.org>
Message-id: <F8E76070-FC01-494E-A4D2-6BD1C9935C21@apple.com>
To: Sylvain Galineau <sylvaing@microsoft.com>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 21 August 2012 20:32:29 GMT