I'm still desperately seeking help with this
By tweaking the basic HLSL node, I've solved one element of this project (a simple blue rectangle which needs to
multiply the grayscale underlying layer)...
Code: Select all
float4x4 WorldViewProjection : WORLDVIEWPROJECTION;
// Vertex shader program input
struct VS_INPUT
{
float4 Position : POSITION;
};
// Vertex shader program output
struct VS_OUTPUT
{
float4 Position : POSITION;
};
// Vertex Shader Program
VS_OUTPUT VS( VS_INPUT Input )
{
VS_OUTPUT Output;
// Transform the vertex from 3D object space to 2D screen space.
Output.Position = mul(Input.Position, WorldViewProjection);
return Output;
}
// Pixel Shader Program
float4 PS( VS_OUTPUT Input ) : COLOR
{
return float4(0.1f, 0.15f, 0.4f, 0.1f);
}
technique Tech1
{
pass pass0
{
vertexshader = compile vs_3_0 VS();
pixelshader = compile ps_3_0 PS();
srcBlend = destColor;
destBlend = srcAlpha;
}
}
But I still need a shader that will not generate the blue colour itself (as the above code does), but instead it needs to use the colours of the existing texture which is next in the node tree (logo with alpha) to
multiply the underlying layer... Can someone please help me get this working?!