summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl
diff options
context:
space:
mode:
Diffstat (limited to 'hlsl')
-rw-r--r--hlsl/bloom.fx1
-rw-r--r--hlsl/color.fx1
-rw-r--r--hlsl/deconverge.fx1
-rw-r--r--hlsl/downsample.fx21
-rw-r--r--hlsl/focus.fx1
-rw-r--r--hlsl/phosphor.fx1
-rw-r--r--hlsl/pincushion.fx1
-rw-r--r--hlsl/post.fx1
-rw-r--r--hlsl/prescale.fx1
-rw-r--r--hlsl/primary.fx1
-rw-r--r--hlsl/vector.fx16
-rw-r--r--hlsl/yiq_decode.fx1
-rw-r--r--hlsl/yiq_encode.fx1
13 files changed, 33 insertions, 15 deletions
diff --git a/hlsl/bloom.fx b/hlsl/bloom.fx
index a39657c2d9f..83f87a2961d 100644
--- a/hlsl/bloom.fx
+++ b/hlsl/bloom.fx
@@ -156,6 +156,7 @@ struct VS_INPUT
float3 Position : POSITION;
float4 Color : COLOR0;
float2 TexCoord : TEXCOORD0;
+ float2 Unused : TEXCOORD1;
};
struct PS_INPUT
diff --git a/hlsl/color.fx b/hlsl/color.fx
index e22bd17634b..95881d71c2c 100644
--- a/hlsl/color.fx
+++ b/hlsl/color.fx
@@ -31,6 +31,7 @@ struct VS_INPUT
float4 Position : POSITION;
float4 Color : COLOR0;
float2 TexCoord : TEXCOORD0;
+ float2 Unused : TEXCOORD1;
};
struct PS_INPUT
diff --git a/hlsl/deconverge.fx b/hlsl/deconverge.fx
index 3943b2666cd..1478dd23418 100644
--- a/hlsl/deconverge.fx
+++ b/hlsl/deconverge.fx
@@ -36,6 +36,7 @@ struct VS_INPUT
float4 Position : POSITION;
float4 Color : COLOR0;
float2 TexCoord : TEXCOORD0;
+ float2 Unused : TEXCOORD1;
};
struct PS_INPUT
diff --git a/hlsl/downsample.fx b/hlsl/downsample.fx
index 9790af2b4a5..e4e3b400ee7 100644
--- a/hlsl/downsample.fx
+++ b/hlsl/downsample.fx
@@ -32,6 +32,7 @@ struct VS_INPUT
float3 Position : POSITION;
float4 Color : COLOR0;
float2 TexCoord : TEXCOORD0;
+ float2 Unused : TEXCOORD1;
};
struct PS_INPUT
@@ -62,10 +63,11 @@ VS_OUTPUT vs_main(VS_INPUT Input)
Output.Position.xy *= float2(2.0f, 2.0f);
Output.Color = Input.Color;
float2 inversePixel = 1.0f / ScreenSize;
- Output.TexCoord01.xy = Input.Position.xy / ScreenSize + float2(0.5f, 0.5f) / TargetSize;
- Output.TexCoord01.zw = Input.Position.xy / ScreenSize + float2(1.5f, 0.5f) / TargetSize;
- Output.TexCoord23.xy = Input.Position.xy / ScreenSize + float2(0.5f, 1.5f) / TargetSize;
- Output.TexCoord23.zw = Input.Position.xy / ScreenSize + float2(1.5f, 1.5f) / TargetSize;
+ Output.TexCoord01.xy = Input.Position.xy / ScreenSize + float2(1.0f, 1.0f) / TargetSize;
+ //Output.TexCoord01.xy = Input.Position.xy / ScreenSize + float2(0.5f, 0.5f) / TargetSize;
+ //Output.TexCoord01.zw = Input.Position.xy / ScreenSize + float2(1.5f, 0.5f) / TargetSize;
+ //Output.TexCoord23.xy = Input.Position.xy / ScreenSize + float2(0.5f, 1.5f) / TargetSize;
+ //Output.TexCoord23.zw = Input.Position.xy / ScreenSize + float2(1.5f, 1.5f) / TargetSize;
return Output;
}
@@ -77,11 +79,12 @@ VS_OUTPUT vs_main(VS_INPUT Input)
float4 ps_main(PS_INPUT Input) : COLOR
{
float4 texel0 = tex2D(DiffuseSampler, Input.TexCoord01.xy);
- float4 texel1 = tex2D(DiffuseSampler, Input.TexCoord01.zw);
- float4 texel2 = tex2D(DiffuseSampler, Input.TexCoord23.xy);
- float4 texel3 = tex2D(DiffuseSampler, Input.TexCoord23.zw);
- float4 outTexel = (texel0 + texel1 + texel2 + texel3) * BloomRescale;
- return float4(outTexel.rgb, 1.0f);
+ //float4 texel1 = tex2D(DiffuseSampler, Input.TexCoord01.zw);
+ //float4 texel2 = tex2D(DiffuseSampler, Input.TexCoord23.xy);
+ //float4 texel3 = tex2D(DiffuseSampler, Input.TexCoord23.zw);
+ //float4 outTexel = (texel0 + texel1 + texel2 + texel3) * BloomRescale;
+ //return float4(outTexel.rgb, 1.0f);
+ return float4(texel0.rgb, 1.0f);
}
//-----------------------------------------------------------------------------
diff --git a/hlsl/focus.fx b/hlsl/focus.fx
index 0df9c876b2b..f51957d630c 100644
--- a/hlsl/focus.fx
+++ b/hlsl/focus.fx
@@ -38,6 +38,7 @@ struct VS_INPUT
float3 Position : POSITION;
float4 Color : COLOR0;
float2 TexCoord : TEXCOORD0;
+ float2 Unused : TEXCOORD1;
};
struct PS_INPUT
diff --git a/hlsl/phosphor.fx b/hlsl/phosphor.fx
index b1a7f983435..b1842fdf02a 100644
--- a/hlsl/phosphor.fx
+++ b/hlsl/phosphor.fx
@@ -45,6 +45,7 @@ struct VS_INPUT
float3 Position : POSITION;
float4 Color : COLOR0;
float2 TexCoord : TEXCOORD0;
+ float2 Unused : TEXCOORD1;
};
struct PS_INPUT
diff --git a/hlsl/pincushion.fx b/hlsl/pincushion.fx
index 03f4dbc278d..7e856c6ca26 100644
--- a/hlsl/pincushion.fx
+++ b/hlsl/pincushion.fx
@@ -34,6 +34,7 @@ struct VS_INPUT
float3 Position : POSITION;
float4 Color : COLOR0;
float2 TexCoord : TEXCOORD0;
+ float2 Unused : TEXCOORD1;
};
struct PS_INPUT
diff --git a/hlsl/post.fx b/hlsl/post.fx
index 5b4640db496..7bbda640dcf 100644
--- a/hlsl/post.fx
+++ b/hlsl/post.fx
@@ -44,6 +44,7 @@ struct VS_INPUT
float4 Position : POSITION;
float4 Color : COLOR0;
float2 TexCoord : TEXCOORD0;
+ float2 Unused : TEXCOORD1;
};
struct PS_INPUT
diff --git a/hlsl/prescale.fx b/hlsl/prescale.fx
index 965d89691f8..3c207875ca2 100644
--- a/hlsl/prescale.fx
+++ b/hlsl/prescale.fx
@@ -30,6 +30,7 @@ struct VS_INPUT
float4 Position : POSITION;
float4 Color : COLOR0;
float2 TexCoord : TEXCOORD0;
+ float2 Unused : TEXCOORD1;
};
struct PS_INPUT
diff --git a/hlsl/primary.fx b/hlsl/primary.fx
index 53653cfba16..472c2dc4692 100644
--- a/hlsl/primary.fx
+++ b/hlsl/primary.fx
@@ -31,6 +31,7 @@ struct VS_INPUT
float3 Position : POSITION;
float4 Color : COLOR0;
float2 TexCoord : TEXCOORD0;
+ float2 Unused : TEXCOORD1;
};
struct PS_INPUT
diff --git a/hlsl/vector.fx b/hlsl/vector.fx
index e93d8dee4cf..89072253e88 100644
--- a/hlsl/vector.fx
+++ b/hlsl/vector.fx
@@ -11,6 +11,7 @@ struct VS_OUTPUT
float4 Position : POSITION;
float4 Color : COLOR0;
float2 TexCoord : TEXCOORD0;
+ float2 LineInfo : TEXCOORD1;
};
struct VS_INPUT
@@ -18,12 +19,14 @@ struct VS_INPUT
float3 Position : POSITION;
float4 Color : COLOR0;
float2 TexCoord : TEXCOORD0;
+ float2 LineInfo : TEXCOORD1;
};
struct PS_INPUT
{
float4 Color : COLOR0;
float2 TexCoord : TEXCOORD0;
+ float2 LineInfo : TEXCOORD1;
};
//-----------------------------------------------------------------------------
@@ -48,7 +51,7 @@ VS_OUTPUT vs_main(VS_INPUT Input)
Output.Position *= float4(2.0f, 2.0f, 1.0f, 1.0f);
Output.Color = Input.Color;
Output.TexCoord = Input.Position.xy / float2(TargetWidth, TargetHeight);
-
+ Output.LineInfo = Input.LineInfo;
return Output;
}
@@ -58,17 +61,18 @@ VS_OUTPUT vs_main(VS_INPUT Input)
// TimeParams.x: Frame time of the vector
// TimeParams.y: How much frame time affects the vector's fade
-// LengthParams.x: Length of the vector
// LengthParams.y: How much length affects the vector's fade
// LengthParams.z: Size at which fade is maximum
float4 ps_main(PS_INPUT Input) : COLOR
{
- float timeModulate = lerp(1.0f, TimeParams.x, TimeParams.y) * 2.0;
+ float timeModulate = lerp(1.0f, TimeParams.x, TimeParams.y) * 1.0;
- float lengthModulate = clamp(1.0f - LengthParams.x / LengthParams.z, 0.0f, 1.0f);
- lengthModulate = lerp(1.0f, timeModulate * lengthModulate, LengthParams.y) * 2.0;
+ float lengthModulate = 1.0f - clamp(Input.LineInfo.x / LengthParams.z, 0.0f, 1.0f);
+ float minLength = 2.0f - clamp(Input.LineInfo.x - 1.0f, 0.0f, 2.0f);
+ lengthModulate = lerp(lengthModulate, 4.0f, minLength * 0.5f);
+ lengthModulate = lerp(1.0f, timeModulate * lengthModulate, LengthParams.y) * 1.0;
- float4 outColor = Input.Color * float4(lengthModulate, lengthModulate, lengthModulate, 1.0f) * 8.0;
+ float4 outColor = Input.Color * float4(lengthModulate, lengthModulate, lengthModulate, 1.0f) * 2.0;
return outColor;
}
diff --git a/hlsl/yiq_decode.fx b/hlsl/yiq_decode.fx
index af3c01c34ab..afbdb98e528 100644
--- a/hlsl/yiq_decode.fx
+++ b/hlsl/yiq_decode.fx
@@ -43,6 +43,7 @@ struct VS_INPUT
float4 Position : POSITION;
float4 Color : COLOR0;
float2 TexCoord : TEXCOORD0;
+ float2 Unused : TEXCOORD1;
};
struct PS_INPUT
diff --git a/hlsl/yiq_encode.fx b/hlsl/yiq_encode.fx
index 2a2a1e40851..8793bfbb633 100644
--- a/hlsl/yiq_encode.fx
+++ b/hlsl/yiq_encode.fx
@@ -34,6 +34,7 @@ struct VS_INPUT
float4 Position : POSITION;
float4 Color : COLOR0;
float2 TexCoord : TEXCOORD0;
+ float2 Unused : TEXCOORD1;
};
struct PS_INPUT