diff --git a/GlitchyEngine/src/Platform/DX11/Renderer/Dx11SamplerState.bf b/GlitchyEngine/src/Platform/DX11/Renderer/Dx11SamplerState.bf index 7aa5918..f29bd17 100644 --- a/GlitchyEngine/src/Platform/DX11/Renderer/Dx11SamplerState.bf +++ b/GlitchyEngine/src/Platform/DX11/Renderer/Dx11SamplerState.bf @@ -40,8 +40,8 @@ namespace DirectX.D3D11 { output = .Anisotropic; } - - // Min filter + + // Mag filter if(samplerDesc.MagFilter == .Linear) { output |= .Min_Point_Mag_Linear_Mip_Point; @@ -51,12 +51,12 @@ namespace DirectX.D3D11 output = .Anisotropic; } - // Mag filter + // Min filter if(samplerDesc.MinFilter == .Linear) { output |= .Min_Linear_Mag_Mip_Point; } - else if(samplerDesc.MagFilter == .Anisotropic) + else if(samplerDesc.MinFilter == .Anisotropic) { output = .Anisotropic; } diff --git a/GlitchyEngine/src/Renderer/SamplerState.bf b/GlitchyEngine/src/Renderer/SamplerState.bf index ab23eef..579924b 100644 --- a/GlitchyEngine/src/Renderer/SamplerState.bf +++ b/GlitchyEngine/src/Renderer/SamplerState.bf @@ -101,10 +101,17 @@ namespace GlitchyEngine.Renderer [BonTarget] public struct SamplerStateDescription : IHashable { + /// Sampling method used for minification. + /// If set to "Anisotropic" all Filters are set to "Anisotropic" internally. public FilterFunction MinFilter = .Linear; + /// Sampling method used for magnification. + /// If set to "Anisotropic" all Filters are set to "Anisotropic" internally. public FilterFunction MagFilter = .Linear; + /// Method used for mip-level sampling. + /// If set to "Anisotropic" all Filters are set to "Anisotropic" internally. public FilterFunction MipFilter = .Linear; + /// Filtering method to use when sampling a texture. public FilterMode FilterMode = .Default; /** @@ -113,8 +120,11 @@ namespace GlitchyEngine.Renderer */ public ComparisonFunction ComparisonFunction = .Never; + /// Method to use for resolving a u texture coordinate that is outside the 0 to 1 range. public TextureAddressMode AddressModeU = .Clamp; + /// Method to use for resolving a v texture coordinate that is outside the 0 to 1 range. public TextureAddressMode AddressModeV = .Clamp; + /// Method to use for resolving a w texture coordinate that is outside the 0 to 1 range. public TextureAddressMode AddressModeW = .Clamp; /**