Enable fast math

This commit is contained in:
Lior Halphon 2018-06-16 00:08:24 +03:00
parent 1c1cddb53e
commit 968ff4879a

View File

@ -89,8 +89,10 @@ static const vector_float2 rect[] =
shader_source = [shader_source stringByReplacingOccurrencesOfString:@"{filter}"
withString:scaler_source];
MTLCompileOptions *options = [[MTLCompileOptions alloc] init];
options.fastMathEnabled = YES;
id<MTLLibrary> library = [device newLibraryWithSource:shader_source
options:nil
options:options
error:&error];
if (error) {
NSLog(@"Error: %@", error);