[x3d-public] QA/Validation on uniform/attribute shader variables. [ was: Re: Non-portability of X3D Shaders]

doug sanden highaspirations at hotmail.com
Mon Mar 28 13:36:08 PDT 2016


I remember liking the pretty names from other browsers^, but in any case I don't remember doing any fact-checking or conflict testing.

-Doug

more ..

I seemed to remember freewrl wasn't doing/setting some of those variables like the gl modelviewInverse so I had it on my list to look into the whole shader thing, including

- web3d standard naming

-- check for conflicts with gl_ naming, ie can we over-write if already defined for a gl version, otherwise the x3dom names seemed pretty, and didn't conflict/no gl_ prefix

- add ones a particular browser (freewrl) is missing ie modelviewinverse which may require more FLOPS per frame

- and look in detail at Michalis' castle-shader technique:

http://castle-engine.sourceforge.net/compositing_shaders_doc/html/chapter.implementation.html

- some freewrl configs use ANGLEPROJECT which translates glsl into directX hlsl, and there are a few things it doesn't do like variable loop terminators in the shader, so some runtime checking with angleproject before committing

^
X3DOM:  http://doc.x3dom.org/tutorials/lighting/customShader/index.html
FreeWRL: http://freewrl.sourceforge.net/FreeX3D/Component_ProgrammableShaders.html
Cobweb:  http://titania.create3000.de/cobweb/custom-shaders/
BS Contact: http://www.bitmanagement.com/developer/contact/examples/shader/shader.html
________________________________
From: x3d-public <x3d-public-bounces at web3d.org> on behalf of John Carlson <yottzumm at gmail.com>
Sent: March 28, 2016 1:51 PM
To: Don Brutzman
Cc: X3D Graphics public mailing list
Subject: Re: [x3d-public] QA/Validation on uniform/attribute shader variables. [ was: Re: Non-portability of X3D Shaders]


I propose we use the gl_ names for matrices from other versions of GLSL.  how do we vote?  Do we need other variables?

On Mar 28, 2016 3:48 PM, "John Carlson" <yottzumm at gmail.com<mailto:yottzumm at gmail.com>> wrote:

It would be fine for me to convert a standard to a particular vendor's shader variables.  What's the standard?

Thanks,

John

On Mar 28, 2016 1:08 PM, "Don Brutzman" <brutzman at nps.edu<mailto:brutzman at nps.edu>> wrote:
If you and others want to keep track of status, the working group could create a web page to publish & maintain that information.

Wondering if there is an API call that lists the names you are concerned with.  That might help with run-time discovery.

Sometimes people write javascript libraries to wrap/normalize different browser idiosyncrasies.  Perhaps a similar approach is appropriate here?

The great majority of X3D content does not depend on shaders, relying on baseline X3D interoperability instead.  So hopefully this specialization challenge can be decoupled and not become a blocker for most uses of your X3D JSON Loader.


On 3/27/2016 7:11 PM, John Carlson wrote:
This is a problem with X3D vendors use of at least uniform matrix names in GLSL shaders.

My use of the X3D JSON Loader (most of the bugs introduced, and crashes in the browser) and X3D in general is held up by differences in the X3D Shader variable names (not what they represent) from different vendors. Can we get some support from the Web3D (and/or possibly Khronos) consortium on standardizing uniform names (some non-portable matrices commonly supported by vendors, not authors) in (at least) GLSL shaders?   Validation of Shaders (warning for non-portable variables) would be useful. Thanks!

Do most people do preprocessing, or stick with one vendor?  Not use GLSL?  I think my other alternative on Mac is Metal, which is way too platform specific.

Thanks,

John
On Mar 26, 2016, at 10:24 PM, John Carlson <yottzumm at gmail.com<mailto:yottzumm at gmail.com>> wrote:

I reported earlier on the non-portability of X3D shaders.  How does one address the right working group to get this fixed?  Or am I taking the wrong approach? I really would like to get some good content online and this is hampering me.  Should I generate a script for each X3D player? Is the player User Agent information sent to the server?

Thanks,

John

all the best, Don
--
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu<mailto:brutzman at nps.edu>
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<tel:%2B1.831.656.2149>
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160328/96af6df0/attachment.html>


More information about the x3d-public mailing list