diff options
Diffstat (limited to 'gfx/wr/swgl')
-rw-r--r-- | gfx/wr/swgl/src/glsl.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gfx/wr/swgl/src/glsl.h b/gfx/wr/swgl/src/glsl.h index 9193c72424..213cdd40b9 100644 --- a/gfx/wr/swgl/src/glsl.h +++ b/gfx/wr/swgl/src/glsl.h @@ -106,6 +106,7 @@ float force_scalar(Float f) { return f[0]; } int32_t force_scalar(I32 i) { return i[0]; } +struct vec3; struct vec4; struct ivec2; @@ -2287,6 +2288,12 @@ bvec2_scalar notEqual(vec2_scalar x, vec2_scalar y) { return bvec2_scalar(notEqual(x.x, y.x), notEqual(x.y, y.y)); } +vec3 floor(vec3 v) { return vec3(floor(v.x), floor(v.y), floor(v.z)); } + +vec4 floor(vec4 v) { + return vec4(floor(v.x), floor(v.y), floor(v.z), floor(v.w)); +} + struct mat4_scalar; struct mat2_scalar { |