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

Re: [Public WebGL] WebGLSL Media Type Proposal




The particular issue is that a shader only works when setup just
right with the correct vertex attributes, uniforms, textures,
rendering modes etc. You realistically can't just share a whole
shader, whithout also writing an entire infrastructure library around
it, that assumes as a convention all the things the shader need to
work.

If I may paraphrase...

"The particular issue is that a library only works when setup just right with the correct input encoding, parameters, input data and output decoding etc. You realistically can't just share a whole library, without also writing an entire program around it, that assumes as a convention all the things the library needs to work."

"Okay, smartass," you might say, "so a single shader library might devise a consistent convention for all its shaders, but how do you pass the same data to different shaders without rearranging it? Huh?"

Back to the library analog. Have you ever seen two 3D engines with mutually compatible data structures? No? How do programmers solve it? They use a single engine, and stick to its conventions in their own code. When interfacing with other libraries, they convert their structures.

Library functions define typed parameters. Shaders define typed parameters, and they don't even require ordered arguments. What is the difference, exactly?

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