diff options
author | 2015-10-25 11:02:52 +0100 | |
---|---|---|
committer | 2015-10-25 11:02:52 +0100 | |
commit | 0ad0e5548efd6c82d62058c92ae381fa51932a2a (patch) | |
tree | edee0bed60dd2c44863f9a9acbb0786766f85c07 /hlsl | |
parent | a7b8acbe3eebcf17367baa642375cfa47ae4ea85 (diff) |
Fixed Vector Intensity and Flicker
- fixed vector intensity in vector.fx
- fixed vector flicker in vector.c
- change range of vector flicker option from 0 - 100 to 0.00 - 1.00
Diffstat (limited to 'hlsl')
-rw-r--r-- | hlsl/vector.fx | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/hlsl/vector.fx b/hlsl/vector.fx index 0e5f2ac314c..5b2df81758b 100644 --- a/hlsl/vector.fx +++ b/hlsl/vector.fx @@ -42,15 +42,19 @@ uniform float3 LengthParams; VS_OUTPUT vs_main(VS_INPUT Input) { VS_OUTPUT Output = (VS_OUTPUT)0; - + Output.Position = float4(Input.Position.xyz, 1.0f); Output.Position.xy /= ScreenDims; - Output.Position.y = 1.0f - Output.Position.y; - Output.Position.xy -= 0.5f; - Output.Position *= float4(2.0f, 2.0f, 1.0f, 1.0f); - Output.Color = Input.Color; + Output.Position.y = 1.0f - Output.Position.y; // flip y + Output.Position.xy -= 0.5f; // center + Output.Position.xy *= 2.0f; // zoom + Output.TexCoord = Input.Position.xy / ScreenDims; + + Output.Color = Input.Color; + Output.LineInfo = Input.LineInfo; + return Output; } @@ -64,14 +68,14 @@ VS_OUTPUT vs_main(VS_INPUT Input) // LengthParams.z: Size at which fade is maximum float4 ps_main(PS_INPUT Input) : COLOR { - float timeModulate = lerp(1.0f, TimeParams.x, TimeParams.y) * 1.0; + float timeModulate = lerp(1.0f, TimeParams.x, TimeParams.y); 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; + lengthModulate = lerp(lengthModulate, 2.0f, minLength * 0.5f); + lengthModulate = lerp(1.0f, timeModulate * lengthModulate, LengthParams.y); - float4 outColor = Input.Color * float4(lengthModulate, lengthModulate, lengthModulate, 1.0f) * 2.0; + float4 outColor = Input.Color * float4(lengthModulate, lengthModulate, lengthModulate, 1.0f); return outColor; } |