Spreading

Hey,
i try to send a spread of values to a shader.
Inside the shader i have a float array like “float xy9”. but it seems that it dosent work… any suggestions?

best,

ingolf

iiiks. that is not yet implemented. the largest spread you can get into a shader via values is a float4. for larger spreads you have to take the workaround via dynamic textures (which only works for pixelshaders of course, for now).

an incoming spreadcount that exceeds 4 (on a float4 pin) causes the effect to be drawn multiple times using different slices each time.

hmm the problem is to run through a float4 value via a for loop, cause it only accepts floatname.rgb or .xyz … maybe i have to use another array for the indexing…
whats about 3x3 matrices? is there a way to run trough it via a for loop?

best,

ingolf

.w is for the 4th value…
but all multiple value types are arrays, so the access is with:
floatname~91~i~93~
in general. with the SetMatrix node you can pass 16 values to your shader. accessing matrix elements has 3 methods, for example the first element:
m~91~0~93~~91~0~93~
m._m00 (starting at 0)
m._11 (starting at 1)

oh thanks, i´ll try this

ingolf