Hand optimized mod operations for some speedup

This commit is contained in:
stegu 2011-08-13 22:03:51 +02:00
parent 8b5011d7ef
commit fbfcc21fbe
3 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@
// Lastmod : 20110813 (stegu)
// License : Copyright (C) 2011 Ashima Arts. All rights reserved.
// Distributed under the MIT License. See LICENSE file.
//
//
vec3 mod289(vec3 x) {
return x - floor(x * (1.0 / 289.0)) * 289.0;

View File

@ -6,7 +6,7 @@
// Lastmod : 20110813 (stegu)
// License : Copyright (C) 2011 Ashima Arts. All rights reserved.
// Distributed under the MIT License. See LICENSE file.
//
//
vec3 mod289(vec3 x) {
return x - floor(x * (1.0 / 289.0)) * 289.0;

View File

@ -6,7 +6,7 @@
// Lastmod : 20110813 (stegu)
// License : Copyright (C) 2011 Ashima Arts. All rights reserved.
// Distributed under the MIT License. See LICENSE file.
//
//
vec4 mod289(vec4 x) {
return x - floor(x * (1.0 / 289.0)) * 289.0; }