Hi John
Regarding the Triangle nodes I agree that X3D has sometimes a bit of a
node bloat philosophy.
The IndexedFaceSet could represent handle it all.
On the other hand IFS in its generic form with per face attributes,
creaseAngle and seperate index list into attributes array
doesn't fit the Open GL or Directx layout.
To render an IFS, one need to reformat/copy the data to flattened array
structures.
The Triangle Set nodes are more constrained, they are fitting better
direct the OpenGL geometry mapping.
But for DirectX9 requireing the interleaving of all attributes of a
vertex into one structure, they don't help much.
Hardware Shaders so far operate indepentently on vertices and pixel /
fragments, they can work on all primitives,
I don't see Justins point here, beside there might be differences how
implementations compute normals etc.
This changes with DirectX 10 adding geometry shader capability where the
actual input triangle structure is important.
Unfortunately in DirectX10 you always need to implement all appearance
using a shader,
so the classical OpenGL lighting/material/texture/multitexture/fog
model has been completly removed.
Greetings
Holger
----- Original Message -----
*From:* John A. Stewart <mailto:alex.stewart@crc.ca>
*To:* Justin Couch <mailto:justin@vlc.com.au>
*Cc:* X3D Graphics public mailing list <mailto:x3d-public@web3d.org>
; Web3D Consortium Members <mailto:consortium@web3d.org>
*Sent:* Wednesday, December 20, 2006 9:10 PM
*Subject:* [x3d-public] Shaders and Triangles: was dedicated
working-group focus on X3D interoperability
Justin;
Throwing in some more canadian pennies in the bowl;
I'll go one step further. It's impossible to use Shaders without
the Triangle* nodes. Shaders require direct knowledge of the exact
geometry structure coming at them as well as precise control over
every aspect of the incoming geometry in order to work. Remove the
Triangle nodes and you must also remove Shaders too as they're
pointless without them.
We still don't need the *Triangle nodes for shaders. What the
browser would
need to recognize in your example, is that it should *not* optimize,
and feed
the triangles as encountered. *that* mapping can be specified, and
the browser
certainly would know if a Shader was present, or not.
While shaders are certainly cool, and my GPUGems books reside within an
elbows reach of me, I doubt whether many on this list would choose
to, um,
teach shader programming in high school, for instance.
Shaders are neat, and have their place, but, at the moment, their
application
is rather specialized.