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

Re: [Public WebGL] WebGLSL Media Type Proposal




if you ship a real app you will for sure not be embedding GLSL in the
HTML with <script> nor will you be requesting scripts individually with
XHR - you will be generating code to pack in via your js
minifier/compiler or building libraries of shaders in a custom,
domain-specific format.

I will? Didn't know that. So many assumptions...

 From my experience, doing 'python -m SimpleHTTPServer' to get around
file:// access when experimenting is so easy that there's no excuse to
not do it and put an end to worrying about file/same-origin/etc.

C:\Users\Thor>python -m SimpleHTTPServer 'python' is not recognized as an internal or external command, operable program or batch file.

Hmmmm... Gee, it seems that I'm not a Python user.

If you're building an offline-only embedded webkit app (or something crazy
like that), see the first point.

But I don't use that development pipeline.

The only case where any of the script stuff makes sense is one-off
hello-world scale experiments and demos and in that case you've got a
bunch of boilerplate copied in anyway - adding one line more to pull
innerText out of a <script> is no biggie.

I'm fine with the <script> tag approach. I like it.

The only benefit I see of an IANA registration is that maybe then some
syntax highlighters in IDEs (or browser inspectors) will become GLSL
aware. It should *never* be used as an interchange format: GLSL is not a
container format, cannot stand alone, and needs some kind of wrapper to
be useful. I'd be much more interested if someone put an effort behind
something similar to MSFT's FX files -- that's something that would
deserve a registration and the artifacts of which could be useful across
applications/providers.

I was considering to suggest the development of a container format, but felt that perhaps this would be to over-engineer things a bit, since the benefits might not outweigh the effort.


On the other hand, shader programs are resources, and have the potential to be reused in multiple scenarios. It would certainly be neat to be able to write full libraries of them, and then load, compile and link them from a dedicated DOM like object.

Such a format could let you specify single vertex and fragment shaders, and optionally, various linked shader programs.

So wait, OpenGL hasn't got a format like this? It could be useful for game developers too...

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
-----------------------------------------------------------