1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-04 23:35:38 +02:00
Files
misskey/packages/frontend/src/utility/snowfall-effect.fragment.glsl
かっこかり 2e07e50bb4 refactor(frontend): 既存のGLSLを単独のファイルに移行 (#16677)
* refactor(frontend): 既存のGLSLを単独のファイルに移行

* fix: glslファイルを参照元ファイルと同じ場所に移動
2025-10-23 11:05:21 +09:00

24 lines
587 B
GLSL

#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);
}