For testing an experience purposes, I've added a mesh (a simple block with brick texture) to the "terrain" example. At first it didn't show at all, until I did some experimentation with the custom renderloop and various shaders (after reading the parallax example). At this point, it all works perfectly, except I can't scale (or tile) the texture that is on the mesh.
Here's a (possibly) pertinent snippet of the world xml:
...
<shader><file>/shader/std_lighting.xml</file></shader>
<shader><file>/shader/parallax/parallax.xml</file></shader>
</shaders>
<materials>
<material name="Brick">
<texture>box</texture>
<shadervar name="tex normal" type="texture">boxn</shadervar>
<shader type="terrain_base">ambient</shader>
<shader type="terrain_splat">parallax</shader>
<shadervar name="texture scale" type="vector2">16,16</shadervar>
</material>
....
The end result (when I put in the mesh and relight the scene) is a correctly positioned box, with the correct texture on each side, but the "texture scale" line doesn't do anything regardless of what numbers I feed it. From experimenting with the same line on the materials used for the terrain, obviously the shader is functional, just not for this mesh.
Does the vector2 scaling and the shader set conflict? Is there a better method to achieve the same goal?
Speaking of shaders, the documentation is pretty scarce. I would be willing to write it, except I don't understand it myself yet. What would be nice is a "documentaton trade" where folks can agree to document the stuff they understand in exchange for someone else documenting something that they want to understand. Probably too complex...





