Browse Source

metal: fix depth texture compare mode setting.

Sasha Szpakowski 1 year ago
parent
commit
b99fce2425
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/graphics/metal/Graphics.mm

+ 1 - 1
src/modules/graphics/metal/Graphics.mm

@@ -850,7 +850,7 @@ id<MTLSamplerState> Graphics::getCachedSampler(const SamplerState &s)
 
 
 	// This isn't supported on some older iOS devices. Texture code checks for support.
 	// This isn't supported on some older iOS devices. Texture code checks for support.
 	if (s.depthSampleMode.hasValue)
 	if (s.depthSampleMode.hasValue)
-		desc.compareFunction = getMTLCompareFunction(s.depthSampleMode.value);
+		desc.compareFunction = getMTLCompareFunction(getReversedCompareMode(s.depthSampleMode.value));
 
 
 	id<MTLSamplerState> sampler = [device newSamplerStateWithDescriptor:desc];
 	id<MTLSamplerState> sampler = [device newSamplerStateWithDescriptor:desc];