hlsl/color.fx
| r11596 | r11597 | |
| 69 | 69 | Output.Position.y -= 0.5f; |
| 70 | 70 | Output.Position *= float4(2.0f, 2.0f, 1.0f, 1.0f); |
| 71 | 71 | 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; |
| 75 | 73 | Output.ExtraInfo = Input.ExtraInfo; |
| 76 | 74 | |
| 77 | 75 | return Output; |
| r11596 | r11597 | |
| 111 | 109 | |
| 112 | 110 | float4 ps_main(PS_INPUT Input) : COLOR |
| 113 | 111 | { |
| 114 | | float4 BaseTexel = tex2D(DiffuseSampler, Input.TexCoord); |
| 112 | float4 BaseTexel = tex2D(DiffuseSampler, Input.TexCoord - 0.5f / float2(RawWidth, RawHeight)); |
| 115 | 113 | |
| 116 | 114 | float3 OutRGB = BaseTexel.rgb; |
| 117 | 115 | |
| r11596 | r11597 | |
| 138 | 136 | // -- Color Compression (increasing the floor of the signal without affecting the ceiling) -- |
| 139 | 137 | OutRGB = float3(RedFloor + (1.0f - RedFloor) * OutRGB.r, GrnFloor + (1.0f - GrnFloor) * OutRGB.g, BluFloor + (1.0f - BluFloor) * OutRGB.b); |
| 140 | 138 | |
| 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); |
| 145 | 140 | } |
| 146 | 141 | |
| 147 | 142 | //----------------------------------------------------------------------------- |
src/osd/windows/drawd3d.c
| r11596 | r11597 | |
| 2495 | 2495 | /* Scanlines and shadow mask */ |
| 2496 | 2496 | curr_effect = d3d->post_effect; |
| 2497 | 2497 | |
| 2498 | | (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", poly->texture->d3dtexture3); |
| 2498 | (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", poly->texture->d3dtexture0); |
| 2499 | 2499 | |
| 2500 | 2500 | result = (*d3dintf->device.set_render_target)(d3d->device, 0, backbuffer); |
| 2501 | 2501 | if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 5\n", (int)result); |