vec2 texture_rotate(in vec2 uv,in float radin){
// float radin=radians(90.0); //轉弧度
float s = sin(radin);
float c = cos(radin);
mat2 rotationMatrix = mat2( c, s,-s, c);
vec2 pivot = vec2( 0.5, 0.5);
vec2 result = rotationMatrix * (uv - pivot) + pivot;
return result;
}
沒有留言:
張貼留言