[X3D-Public] Shader programming and URLs in X3D
johannes.behr at igd.fraunhofer.de
Thu May 14 09:34:52 PDT 2009
On 14 May 2009, at 15:32, Michalis Kamburelis wrote:
> Peter Eschler wrote:
>> On Wed, May 13, 2009 at 8:56 PM, John A. Stewart
>> <alex.stewart at crc.ca> wrote:
>>> Hi All;
>>> I'm verifying the Shader support code in FreeWRL, and I have a
>>> The url field, can it contain the source, or does it always have to
>>> designate a file? eg, with scripting, one can have a url starting
>> InstantPlayer supports both approaches.
>> See the following example:
> Ah, just without protocol. Thanks! Any documentation how exactly the
> fact that we have direct shader source code is detected?
The rule and code is very simple: Single line is URL and external.
(What a "single line"
is depends on the encoding) and multiple lines are shader code in the
Works for classic-encoding (url-field) and xml/cdata encoding.
This works already for years and we had a discussion on a protocol:-
at the time we implemented this. However we did not like it since the
kind of language is already defined by the type-field.
> I just added this to view3dscene. URL is recognized as direct shader
> source if it doesn't start with any protocol *and*
> has some newlines (needed to recognize relative URLs without protocol
> X3D-Public mailing list
> X3D-Public at web3d.org
Dr.-Ing. Johannes Behr tel: +49-6151-155-510
Fraunhoferstr. 5 fax: +49-6151-155-196
D-64283 Darmstadt skype: johannesbehr
Germany web: www.igd.fhg.de/www/igd-a4/
More information about the X3D-Public