[x3d-public] geo / bubbles shader scene
doug sanden
highaspirations at hotmail.com
Mon Jan 11 13:12:51 PST 2016
Q. is this what the geo.x3d/ bubbles ProgrammableShader sample is supposed to look like?
http://dug9.users.sourceforge.net/web3d/tests/Bubbles_shaders/geo/geoPshaderInline10.png
-Doug
more..
freewrl wasn't showing the sphere, so I hacked the shaders until I got something, then tinkered to get it close to the original scene.
1. I changed from ComposedShader to ProgramShader (not sure that was necessary)
2. dropped the cube SFInt32 field
3. substituted fw_ names for things like modelviewmatrix ie fw_ModelViewMatrix
4. explicitly multiplied projection * modelview rather than assuming it's already in context ie fw_ProjectionMatrix * fw_ModelViewMatrix
5. avoided mat3 and used the original mat4
6. replaced 'uniform samplerCube cube;' with 'uniform samplerCube fw_Texture_unit0;'
and textureCube(cube,... with textureCube(fw_Texture_unit0,...
Resulting freewrl-compatible scene:
http://dug9.users.sourceforge.net/web3d/tests/Bubbles_shaders/geo/geoPShaderInline10.x3d
more..
I don't know if there's something in the specs saying what the common matrices and texture units are supposed to be called.
If so freewrlians didn't get the memo. Hence the fw_ names.
Q. where is that -names for modelviewmatrix etc- in any specs?
________________________________________
From: x3d-public <x3d-public-bounces at web3d.org> on behalf of doug sanden <highaspirations at hotmail.com>
Sent: January 10, 2016 8:54 AM
To: John Carlson; X3D Graphics public mailing list
Subject: Re: [x3d-public] fill in what shading languages are available
>
>
>
> Could someone fill in what shading languages are available for those
> X3D players which support programmable shaders on this
>
>
>
>
>
> page: http://www.web3d.org/wiki/index.php/Player_support_for_X3D_components
>
_ FreeWRL
Programmable
_ Shaders partial^
GLSL yes
HLSL no
Cg no
^ and a subset of Level 1
http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/shaders.html#SupportLevels
ComposedShader yes
ProgramShader yes
PackagedShader no
more..
http://freewrl.sourceforge.net/FreeX3D/Component_ProgrammableShaders.html
On behalf of the freewrl opensource community, I report my best knowledge today FreeWRL supports GLSL shading language only, Composed and Program shaders only.
Or more correctly aspires to. Your Geo.x3d example
http://coderextreme.net/bug/geo.x3d
of cubemap shading in a ComposedShader isn't working right now in freewrl, and I'm looking into that.
Other samples of ProgramShaders and ComposedShaders do work in freewrl:
http://dug9.users.sourceforge.net/web3d/tests/ProgrammableShaders/flutter2-ProgramShader.x3d
http://dug9.users.sourceforge.net/web3d/tests/ProgrammableShaders/flutter2-ComposedShader.x3d
Thanks,
-Doug
>
> Player support for X3D components - Web3D.org
> www.web3d.org
> The Extensible 3D (X3D) Graphics standard has many capabilities. X3D
> components are modular collections of nodes that make it easier for
> software to gradually ...
>
>
>
> Thanks,
>
>
> John
>
_______________________________________________
x3d-public mailing list
x3d-public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org
More information about the x3d-public
mailing list