diff --git a/projects/apis/metal/src/pipelines/graphics_pipeline/metal_graphics_pipeline.m b/projects/apis/metal/src/pipelines/graphics_pipeline/metal_graphics_pipeline.m index 1f2fe13..5d86749 100644 --- a/projects/apis/metal/src/pipelines/graphics_pipeline/metal_graphics_pipeline.m +++ b/projects/apis/metal/src/pipelines/graphics_pipeline/metal_graphics_pipeline.m @@ -76,7 +76,8 @@ gnReturnCode createMetalGraphicsPipeline(gnGraphicsPipeline graphicsPipeline, gn // printf("shader code: %s\n", shaderCode); NSError* error = nil; - MTLCompileOptions* mtloptions = nil; + MTLCompileOptions* mtloptions = [[MTLCompileOptions alloc] init]; + mtloptions.mathMode = MTLMathModeFast; NSString* sourceCode = [NSString stringWithCString:shaderCode encoding:NSUTF8StringEncoding]; id shaderLib = [device->outputDevice->device newLibraryWithSource:sourceCode options:mtloptions error:&error]; if (!shaderLib) {