[x3d-public] shader question: should X3DVertexAttributeNodenameberequired?

Don Brutzman brutzman at nps.edu
Sun Mar 26 17:37:13 PDT 2017


Absent any objections, will plan on documenting the naming issue in mantis and requiring Shader name values in future versions of specification + schemas + dtd + OM4X3D.

Michalis, 1M apologies for not noticing before that you produced a Ph.D. dissertation on this topic!  Wow, lots more homework to pursue:

	https://castle-engine.sourceforge.io/compositing_shaders.php

Am hoping to put this topic on a future X3D working group call (next month probably) so that we can all prepare and discuss the topic in a dedicated fashion.

Might someone be willing to collect and curate representative shader examples for X3D Example Archives?  Open source of course.  Recommended location:

	X3D Example Archives: Basic, Shaders
	http://www.web3d.org/x3d/content/examples/Basic/Shaders/	

It would be great to lay out goals, issues and opportunities for improved shader support in X3D v4.

v/r Don


On 3/23/2017 7:08 PM, Michalis Kamburelis wrote:
> 2017-03-24 2:49 GMT+01:00  <yottzumm at gmail.com>:
>>
>>
>> implementations use
>>
>> prefixes when naming internal attributes (like gl_ for GLSL standard
>>
>> attributes, fw_ for FreeWRL, castle_ for Castle Game Engine...) to
>>
>> avoid this from accidentally happening.
>>
>>
>>
>>
>>
>> Yes, that’s exactly what’s making my shaders non-portable.
>>
>>
>>
>> How do we make shaders more portable.
>>
>
> Note: I'm eager to discuss that, but it's a *large* topic:) It would
> also be nice to discuss it on x3d-public mailing list.
>
> Some options that I see:
>
> 1. Pass all the information through X3DVertexAttributeNode attributes,
> do not depend on implementation-specific attributes. Yes, it will
> require some work, you will have to postprocess X3D models exported
> from your 3D modeling software.
>
> 2. Use my "Compositing Shaders" extensions, documented on
> https://castle-engine.sourceforge.io/compositing_shaders.php .
> Implemented in Castle Game Engine and FreeWRL. These are my proposed
> solution to the problem of unportable shaders.
>
> 3. Propose a scheme for all X3D renderers to follow when naming some
> standard attributes (positions, tex coords...), and write it in X3D
> specification. Problem: it's not really 100% possible, as it's very
> tied to the implementation (e.g. a renderer may pack some standard
> attributes, in order to deliver them more efficiently to shaders, with
> less bytes transferred to GPU). But  (maybe?) some specification
> suggestions (not requirements) would help in mitigating this problem,
> at least.
>
> Regards,
> Michalis


all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list