1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-27 01:24:18 +02:00

refactor(frontend): 既存のGLSLを単独のファイルに移行 (#16677)

* refactor(frontend): 既存のGLSLを単独のファイルに移行

* fix: glslファイルを参照元ファイルと同じ場所に移動
This commit is contained in:
かっこかり
2025-10-23 11:05:21 +09:00
committed by GitHub
parent d203e1a446
commit 2e07e50bb4
6 changed files with 194 additions and 172 deletions

View File

@@ -0,0 +1,23 @@
#version 300 es
precision mediump float;
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
in vec4 v_color;
in float v_rotation;
uniform sampler2D u_texture;
out vec4 out_color;
void main() {
vec2 rotated = vec2(
cos(v_rotation) * (gl_PointCoord.x - 0.5) + sin(v_rotation) * (gl_PointCoord.y - 0.5) + 0.5,
cos(v_rotation) * (gl_PointCoord.y - 0.5) - sin(v_rotation) * (gl_PointCoord.x - 0.5) + 0.5
);
vec4 snowflake = texture(u_texture, rotated);
out_color = vec4(snowflake.rgb * v_color.xyz, snowflake.a * v_color.a);
}