Previous 15994 Revisions Next

r11597 Friday 20th May, 2011 at 07:51:16 UTC by MooglyGuy
Quick fix for -noyiq issues, no whatsnew
[hlsl]color.fx
[src/osd/windows]drawd3d.c

hlsl/color.fx
r11596r11597
6969   Output.Position.y -= 0.5f;
7070   Output.Position *= float4(2.0f, 2.0f, 1.0f, 1.0f);
7171   Output.Color = Input.Color;
72   float2 InvTexSize = float2(1.0f / TargetWidth, 1.0f / TargetHeight);
73   float2 TexCoord = (Input.Position.xy * InvTexSize) / float2(WidthRatio, HeightRatio);
74   Output.TexCoord = lerp(Input.TexCoord, TexCoord, YIQEnable);
72   Output.TexCoord = Input.TexCoord;
7573   Output.ExtraInfo = Input.ExtraInfo;
7674
7775   return Output;
r11596r11597
111109
112110float4 ps_main(PS_INPUT Input) : COLOR
113111{
114   float4 BaseTexel = tex2D(DiffuseSampler, Input.TexCoord);
112   float4 BaseTexel = tex2D(DiffuseSampler, Input.TexCoord - 0.5f / float2(RawWidth, RawHeight));
115113   
116114   float3 OutRGB = BaseTexel.rgb;
117115
r11596r11597
138136   // -- Color Compression (increasing the floor of the signal without affecting the ceiling) --
139137   OutRGB = float3(RedFloor + (1.0f - RedFloor) * OutRGB.r, GrnFloor + (1.0f - GrnFloor) * OutRGB.g, BluFloor + (1.0f - BluFloor) * OutRGB.b);
140138
141   // -- Final Pixel --
142   float4 Output = lerp(Input.Color, float4(OutRGB, BaseTexel.a) * Input.Color, Input.ExtraInfo.x);
143
144   return Output;
139   return float4(OutRGB, 1.0f);
145140}
146141
147142//-----------------------------------------------------------------------------
src/osd/windows/drawd3d.c
r11596r11597
24952495            /* Scanlines and shadow mask */
24962496            curr_effect = d3d->post_effect;
24972497
2498            (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", poly->texture->d3dtexture3);
2498            (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", poly->texture->d3dtexture0);
24992499
25002500            result = (*d3dintf->device.set_render_target)(d3d->device, 0, backbuffer);
25012501            if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 5\n", (int)result);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team