aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/scenegraph/rendernode/shader.hlsl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/scenegraph/rendernode/shader.hlsl')
-rw-r--r--examples/quick/scenegraph/rendernode/shader.hlsl7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/quick/scenegraph/rendernode/shader.hlsl b/examples/quick/scenegraph/rendernode/shader.hlsl
index 8b9b9ff9d8..f300fe7aa5 100644
--- a/examples/quick/scenegraph/rendernode/shader.hlsl
+++ b/examples/quick/scenegraph/rendernode/shader.hlsl
@@ -2,15 +2,16 @@ cbuffer ConstantBuffer : register(b0)
{
float4x4 modelview;
float4x4 projection;
+ float opacity;
};
struct PSInput
{
float4 position : SV_POSITION;
- float4 color : COLOR;
+ float3 color : COLOR;
};
-PSInput VS_Simple(float4 position : POSITION, float4 color : COLOR)
+PSInput VS_Simple(float4 position : POSITION, float3 color : COLOR)
{
PSInput result;
@@ -23,5 +24,5 @@ PSInput VS_Simple(float4 position : POSITION, float4 color : COLOR)
float4 PS_Simple(PSInput input) : SV_TARGET
{
- return input.color;
+ return float4(input.color, 1.0) * opacity;
}