[x3d-public] [x3dom-developers] ElevationGrid for the modern age

Michalis Kamburelis michalis.kambi at gmail.com
Thu Jan 29 13:57:52 PST 2015


> Michalis, that's a good analysis. The technicalities of actually doing the
> ops is a bit detailed for me, which gets me back to wanting to specify this
> more semantically. Which is why I like Fraunhofer's 'common surface shader'
> for a great deal of the things most of us need it for. I can say 'bumpmap'
> and it does that, I don't have to know how to multiply normals or whatnot.
> That's too much like deconstructing the scene for the hardware, and then I
> might as well be using Three.js. But it IS handy to have that power.

I like CommonSurfaceShader too (and I would like to implement it in
Castle Game Engine too :), for now I realize bump mapping by my own
extension http://castle-engine.sourceforge.net/x3d_implementation_texturing_extensions.php#section_ext_bump_mapping
). Seeing CommonSurfaceShader in standard X3D, and just generally
supported by all browsers, would be cool indeed. And it would indeed
allow to avoid using existing multi-texturing nodes in some cases.

>
> What I'm leaning toward is a syntax which is XML-compliant that would allow
> easy binding to custom shaders. I think x3dom is close to that, but if I'm
> not mistaken, the way textures are supplied to a shader is a) order
> dependent, and b) not at all explicit. So I'd like to add a couple of fields
> to take away that ambiguity, or at least, make it more obvious (that is,
> easier to follow) for the author.

X3D "Programmable shaders" component already gives you a full-featured
way to use custom shaders. Including passing textures to them. You
pass textures the shaders by name, order doesn't matter in that case.
Many of the multi-texturing specification problems disappear in that
case, since it's the shader that 100% determines how colors are mixed.

The only downside of X3D "programmable shaders" component that I see
is that it's all-or-nothing --- if you want to use shaders, you have
to implement all the shading by your own shader code. My personal
solution is that is
http://castle-engine.sourceforge.net/compositing_shaders.php , but
that's only Castle Game Engine extension for now.

Michalis



More information about the x3d-public mailing list