I’ve been trying to make an fx that has a bunch of color inputs, I was hoping to be able to input an array from vvvv and access the slices in the tfx using   etc. But I can’t get them to work, floats works but not float4, is this meant to be the case, or is this an issue with dx11?
This is certainly not the case, but asking matters as I can learn something too.
Are you feeding 4 values to the float4?
If I’m not mistaken, there’s something like,
float4 var = 1.0, then
var equals to
(1.0,1.0,1.0,1.0). What I mean, are you feeding the color array with the correct amount of data?
This would obviously happen only if you feed values [0.0…1.0] directly to the shader. Feeding colors should give you a correctly populated
Sorry if I made anyone dumber.
hmm…i get it to work in dx9 like so:
float4 myColors : COLOR;
and in dx11 the pin appears with an extra bin-size pin:
float4 myColors <bool color=true;String uiname="Colors";>;
but accessing individual array entries for me only works in dx9…
global variable / cbuffer arrays in DX11 can only be accessed with constant indexer, meaning the indexer value needs to be known at compile time. if you want to have dynamic indexer you need to use
StructuredBuffer<T> where T is float4 in your case.
Ok, not thought about structured buffers in tfx, that will tidy it up nicely, Thanks!
if you generate the colors in VL you can save the integration pin overhead by using this:
What do you mean by integration pin overhead? Theres only 6 or 7 colours…
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.