diff --git a/crates/gpui/src/platform/windows/directx_renderer.rs b/crates/gpui/src/platform/windows/directx_renderer.rs index 74c1c6828602392a8b8ab53cfe772e48ffbef99b..47f6f3945da86e7fd3e1beb113679d0c9228a4ae 100644 --- a/crates/gpui/src/platform/windows/directx_renderer.rs +++ b/crates/gpui/src/platform/windows/directx_renderer.rs @@ -19,7 +19,8 @@ use windows::{ use crate::*; const RENDER_TARGET_FORMAT: DXGI_FORMAT = DXGI_FORMAT_B8G8R8A8_UNORM; -const BACK_BUFFER_FORMAT: DXGI_FORMAT = DXGI_FORMAT_B8G8R8A8_UNORM_SRGB; +// const BACK_BUFFER_FORMAT: DXGI_FORMAT = DXGI_FORMAT_B8G8R8A8_UNORM_SRGB; +const BACK_BUFFER_FORMAT: DXGI_FORMAT = DXGI_FORMAT_B8G8R8A8_UNORM; pub(crate) struct DirectXRenderer { atlas: Arc, @@ -1200,7 +1201,6 @@ fn set_rasterizer_state(device: &ID3D11Device, device_context: &ID3D11DeviceCont let desc = D3D11_RASTERIZER_DESC { FillMode: D3D11_FILL_SOLID, CullMode: D3D11_CULL_NONE, - // FrontCounterClockwise: true.into(), FrontCounterClockwise: false.into(), DepthBias: 0, DepthBiasClamp: 0.0, diff --git a/crates/gpui/src/platform/windows/shaders.hlsl b/crates/gpui/src/platform/windows/shaders.hlsl index 7e59bb714e07706ab4f51a0e9ac5a436777c529a..a67e2cde60b6f542caf83902fa1611f399317018 100644 --- a/crates/gpui/src/platform/windows/shaders.hlsl +++ b/crates/gpui/src/platform/windows/shaders.hlsl @@ -342,8 +342,8 @@ float4 gradient_color(Background background, } // Get the t value for the linear gradient with the color stop percentages. - float2 half_size = float2(bounds.size.x, bounds.size.y) / 2.; - float2 center = float2(bounds.origin.x, bounds.origin.y) + half_size; + float2 half_size = bounds.size * 0.5; + float2 center = bounds.origin + half_size; float2 center_to_point = position - center; float t = dot(center_to_point, direction) / length(direction); // Check the direct to determine the use x or y