-
- char buf[256];
- sprintf(buf, "const vec3 PREFIX(offset) = vec3(%.8f, %.8f, %.8f);\n",
- offset[0], offset[1], offset[2]);
- frag_shader += buf;
-
- sprintf(buf, "const vec3 PREFIX(scale) = vec3(%.8f, %.8f, %.8f);\n",
- scale[0], scale[1], scale[2]);
- frag_shader += buf;
+ frag_shader += output_glsl_vec3("PREFIX(offset)", offset[0], offset[1], offset[2]);