On 16.04.2007 08:06, Sebastien Marchal wrote:
> Hie once more ...
> 
>>> The shader variable can be accessed through the iMaterial interface
>>>     
>>
>> The text doesn't explicitly states that materials are the only container
>> for shader vars; but it doesn't say the opposite either :) Perhaps
>> mention at some point that other places for SVs exists. (Such as mesh
>> wrappers ... which would be useful for your highlighting case: use the
>> same material for all meshes, and just set/unset the highlight color *on
>> the mesh*.)
>>   
> I am modifying the tutorial to use a mesh shader variable. Much more
> logical. But then,
> contrary to what happend with materials, the mesh shader variable is
> never used if my shader include a shader variable.
> Is it the expected behavior ? (Crystal 1.0)

This issue follows from the order in which SV contexts are used (see
http://crystalspace3d.org/docs/online/manual/Shader-System-Overview.html#9):
SVs provided in the shader have higher precedence than SVs provided by
the mesh!
We're aware that this order is rather suboptimal and that the shader SVs
should have a much lower precedence - but we didn't get around to change
that yet.
Most likely this will be changed with the render manager - however that
itself still only exists in the shape of ideas in heads.
The best thing I can offer you is to provide defaults by using shader
conditionals, as you already mentioned that approach in your tutorial.

-f.r.

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to