R
Richy
Hi,
This is a Direct3D-related question but I am posting it in here as it
is more VB-specific.
I have an effect file that I am trying to set the values for. For
example:
fx.SetValue("matView", _viewMatrix)
fx.SetValue("matViewProjection", _projectionMatrix)
fx.SetValue("fSpecularPower", 25)
fx.SetValue("base_Tex", t._texture(0))
That all works fine, but I cannot for the life of me get a float3 or
float4 across, example:
Dim diffuse(3) As Single
diffuse(0) = 0 : diffuse(1) = 1 : diffuse(2) = 0 : diffuse(3) = 0
fx.SetValue("fvDiffuse", diffuse)
I've also tried setting diffuse to an upperbound of 4.
This all fails with the meaningless "Error in the application". I
thought a Float4 was simply an array of four floating point (type
Single) numbers? I have the same issue with a Float3, I've tried all
I
can think of to pass the information over but no luck. Here is how
fvDiffuse is set up in the .fx file:
float4 fvDiffuse
<
string UIName = "fvDiffuse";
string UIWidget = "Color";
bool UIVisible = true;
Isn't this just an array of four values of type Single?
Thanks in advance,
Richy
This is a Direct3D-related question but I am posting it in here as it
is more VB-specific.
I have an effect file that I am trying to set the values for. For
example:
fx.SetValue("matView", _viewMatrix)
fx.SetValue("matViewProjection", _projectionMatrix)
fx.SetValue("fSpecularPower", 25)
fx.SetValue("base_Tex", t._texture(0))
That all works fine, but I cannot for the life of me get a float3 or
float4 across, example:
Dim diffuse(3) As Single
diffuse(0) = 0 : diffuse(1) = 1 : diffuse(2) = 0 : diffuse(3) = 0
fx.SetValue("fvDiffuse", diffuse)
I've also tried setting diffuse to an upperbound of 4.
This all fails with the meaningless "Error in the application". I
thought a Float4 was simply an array of four floating point (type
Single) numbers? I have the same issue with a Float3, I've tried all
I
can think of to pass the information over but no luck. Here is how
fvDiffuse is set up in the .fx file:
float4 fvDiffuse
<
string UIName = "fvDiffuse";
string UIWidget = "Color";
bool UIVisible = true;
= float4( 0.89, 0.89, 0.89, 1.00 );
Isn't this just an array of four values of type Single?
Thanks in advance,
Richy