Fix: only use preserveInvariance for Z fighting when supported by macOS
Pull Request: https://projects.blender.org/blender/blender/pulls/117484
This commit is contained in:
parent
6fc7f99a95
commit
ae27daf834
|
@ -314,9 +314,10 @@ bool MTLShader::finalize(const shader::ShaderCreateInfo *info)
|
||||||
MTLCompileOptions *options = [[[MTLCompileOptions alloc] init] autorelease];
|
MTLCompileOptions *options = [[[MTLCompileOptions alloc] init] autorelease];
|
||||||
options.languageVersion = MTLLanguageVersion2_2;
|
options.languageVersion = MTLLanguageVersion2_2;
|
||||||
options.fastMathEnabled = YES;
|
options.fastMathEnabled = YES;
|
||||||
options.preserveInvariance = YES;
|
|
||||||
|
|
||||||
if (@available(macOS 11.00, *)) {
|
if (@available(macOS 11.00, *)) {
|
||||||
|
options.preserveInvariance = YES;
|
||||||
|
|
||||||
/* Raster order groups for tile data in struct require Metal 2.3.
|
/* Raster order groups for tile data in struct require Metal 2.3.
|
||||||
* Retaining Metal 2.2. for old shaders to maintain backwards
|
* Retaining Metal 2.2. for old shaders to maintain backwards
|
||||||
* compatibility for existing features. */
|
* compatibility for existing features. */
|
||||||
|
|
Loading…
Reference in New Issue