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

Re: [Public WebGL] ESSL 3.5 Comments Compliance





On Tue, Jan 11, 2011 at 9:01 PM, Daniel Koch <daniel@transgaming.com> wrote:

On 2011-01-11, at 10:55 PM, David Sheets wrote:
[...]
Furthermore, here is a list of invalid shader examples (due to invalid
character use) in the ESSL spec itself:

4.1.2: // declare “success” to be a Boolean
4.1.2: // declare and initialize “done”
4.2.2: // y is initialized to '2'
4.2.2: // x is initialized to '1'
4.2.2: // 'S' is only visible as a struct and constructor
4.2.2: // 'S' is now visible only as a variable
4.2.7: // Error: type 'f' conflicts with function 'f'
4.2.7: // Error: conflicts with the type 'f'
4.6.2: // a has a value a2 where possibly a1 ≠ a2
5.5: // illegal - 'x' used twice

I'd always taken the comments in the examples to be intended as annotations and/or editor's notes and not intended to be part of the example itself per-se.


1.4  Typographical Conventions
Italic, bold, and font choices have been used in this specification primarily to improve readability.  Code
fragments use a fixed width font.

It doesn't say anywhere that human post-processing is needed for code fragments.

I find it rather unfortunate that WebGL spec can be read to not allow special characters inside comments.  It would make more sense if that restriction is required for the output of the preprocessor, similar to how C deals with it.