lumpin
1
hello if got a question regarding the
and <v> elements
How does the offset work, where are the indices ?
example
<mesh>
<source id="position"/>
<source id="texcoord0"/>
<source id="texcoord1"/>
<vertices id="verts">
<input semantic="POSITION" source="#position"/>
</vertices>
<lines count="2">
<input semantic="VERTEX" source="#verts" offset="0"/>
<input semantic="TEXCOORD" source="#texcoord0" offset="1"/>
<input semantic="TEXCOORD" source="#texcoord1" offset="1"/>
10 10 11 11 21 21 22 22</p>
</lines>
</mesh>
do i , for the first input, use (10,10) as start point and (11,11) as ending ? where does offset one start for input 2 and 3?
thank you.
marcus
2
Yes. From your example, the samples are: line1[p(10,10), p(11,11)], line2[p(21,21), p(22,22)].
lumpin
3
thanks.
but what about the offset? do i for offset = 1 start with [11,11] ?
marcus
4
Given two inputs:
input A, offset=0
input B, offset=1
… then count=3 samplings go like this:
0 1 2 3 4 5
… producing p1[0,1], p2[2,3], p3[4,5].
Add a third input with a shared offset:
input A, offset=0
input B, offset=1
input C, offset=1
… produces p1[0,1,1], p2[2,3,3], p3[4,5,5].