56 lines
1.2 KiB
HLSL
56 lines
1.2 KiB
HLSL
sampler uImage0 : register(s0);
|
|
sampler uImage1 : register(s1);
|
|
float3 uColor;
|
|
float3 uSecondaryColor;
|
|
float uOpacity;
|
|
float uSaturation;
|
|
float uRotation;
|
|
float uTime;
|
|
float4 uSourceRect;
|
|
float2 uWorldPosition;
|
|
float uDirection;
|
|
float3 uLightSource;
|
|
float2 uImageSize0;
|
|
float2 uImageSize1;
|
|
matrix uWorldViewProjection;
|
|
float4 uShaderSpecificData;
|
|
|
|
struct VertexShaderInput
|
|
{
|
|
float4 Position : POSITION0;
|
|
float4 Color : COLOR0;
|
|
float3 TextureCoordinates : TEXCOORD0;
|
|
};
|
|
|
|
struct VertexShaderOutput
|
|
{
|
|
float4 Position : SV_POSITION;
|
|
float4 Color : COLOR0;
|
|
float3 TextureCoordinates : TEXCOORD0;
|
|
};
|
|
|
|
VertexShaderOutput VertexShaderFunction(in VertexShaderInput input)
|
|
{
|
|
VertexShaderOutput output = (VertexShaderOutput) 0;
|
|
float4 pos = mul(input.Position, uWorldViewProjection);
|
|
output.Position = pos;
|
|
output.Color = input.Color;
|
|
output.TextureCoordinates = input.TextureCoordinates;
|
|
|
|
return output;
|
|
}
|
|
|
|
float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
|
|
{
|
|
return input.Color;
|
|
}
|
|
|
|
technique Technique1
|
|
{
|
|
pass TrailPass
|
|
{
|
|
VertexShader = compile vs_2_0 VertexShaderFunction();
|
|
PixelShader = compile ps_2_0 PixelShaderFunction();
|
|
}
|
|
}
|