diff options
author | Ryan Holtz <rholtz@batcountryentertainment.com> | 2013-05-22 01:58:38 +0000 |
---|---|---|
committer | Ryan Holtz <rholtz@batcountryentertainment.com> | 2013-05-22 01:58:38 +0000 |
commit | 35ef098e64a825890a98cec461a955d08f4cdb91 (patch) | |
tree | 6aa3d1038c806f51e5b2eba9b5ecdac810119be7 /hlsl/vector.fx | |
parent | 2d474c6a3bcb7719d438a5f6b5951655351e4518 (diff) |
MAME Testers bugs fixed: 5201, 5202
- HLSL changes: [MooglyGuy]
* Upped vertex buffer size to 64k verts, fixes assert in
starwars and alphaone, please include the printed error
message in any subsequent encounterings of the assert.
* Improved vector rendering (beam width 1.5 suggested)
* Ducked raster bloom default to 0.225 to reduce washout
Diffstat (limited to 'hlsl/vector.fx')
-rw-r--r-- | hlsl/vector.fx | 16 |
1 files changed, 10 insertions, 6 deletions
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; } |