moveTexture2PosToReal.es6 479 字节
Newer Older
Y
Yanzhan Yang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/* eslint-disable */
/**
 * @file 公共方法
 * @author yangmingming
 */
// TEXTURE_NAME, 材质name
// 材质坐标转化成真实尺寸坐标
export default `

vec2 _2d_shape_TEXTURE_NAME = vec2(float(width_TEXTURE_NAME), float(height_TEXTURE_NAME));

vec2 moveTexture2PosToReal_TEXTURE_NAME(vec2 v) {
    return v * _2d_shape_TEXTURE_NAME;
    // vec2 v2;
    // v2.x = v.x * float(width_TEXTURE_NAME);
    // v2.y = v.y * float(height_TEXTURE_NAME);
    // return v2;
}
`;