Evak
02-07-2007 22:45:20
I'm able to make shaders work with ofusion, but I can't adjust the parameters from my HLSL shaders in ofusion. I get the following popup:
I've tried changing to other shaders and going back to mine again to refresh but it doesn't change. I thought I'd post a simple color shader made in ShaderFX and convertes to ogre. Maybe someone can tell me if they can see what I'm doing wrong.
.Program
.HLSL
The ofusion shader parameters editor is simply empty, I was hoping to have param_named UIColor_8885 float4 .8, 0.3, 0.0, 1.0 display as a editable parameter in ofusions shader editor.
I've tried changing to other shaders and going back to mine again to refresh but it doesn't change. I thought I'd post a simple color shader made in ShaderFX and convertes to ogre. Maybe someone can tell me if they can see what I'm doing wrong.
.Program
vertex_program orange_vs hlsl
{
source orange.hlsl
entry_point v
target vs_2_0
default_params
{
param_named_auto lightPosition LIGHT_POSITION 0
param_named_auto wvp WORLDVIEWPROJ_MATRIX
param_named_auto worldI INVERSE_WORLD_MATRIX
}
}
fragment_program orange_ps hlsl
{
source orange.hlsl
entry_point f
target ps_2_0
default_params
{
param_named_auto lightColor LIGHT_DIFFUSE_COLOUR 0
param_named UIColor_8885 float4 .8, 0.3, 0.0, 1.0
}
}
.HLSL
// input from application
struct a2v {
float4 position : POSITION;
};
// output to fragment program
struct v2f {
float4 position : POSITION;
};
//Ambient and Self-Illum Pass Vertex Shader
v2f v(a2v In, uniform float4 lightPosition, uniform float4x4 wvp, uniform float4x4 worldI)
{
v2f Out = (v2f)0;
Out.position = mul(wvp, In.position); //transform vert position to homogeneous clip space
return Out;
}
//Ambient and Self-Illum Pass Pixel Shader
float4 f(v2f In, uniform float4 lightColor, uniform float4 UIColor_8885) : COLOR
{
float3 input1 = UIColor_8885;
float4 ret = float4(0,0,0,1);
ret = float4(input1, 1);
return ret;
}
The ofusion shader parameters editor is simply empty, I was hoping to have param_named UIColor_8885 float4 .8, 0.3, 0.0, 1.0 display as a editable parameter in ofusions shader editor.