Skip to content

Instantly share code, notes, and snippets.

View gam0022's full-sized avatar
😇
なの

がむ gam0022

😇
なの
View GitHub Profile
@gam0022
gam0022 / video_under_20MB.bat
Last active September 5, 2026 15:38
Discordにアップロードするために20MB以内に収まるように動画をエンコードするbat(mp4をbatにドラッグ&ドロップして使用)
@echo off
setlocal EnableExtensions DisableDelayedExpansion
if "%~1"=="" (
echo.
echo Drag and drop one or more video files onto this BAT file.
echo.
pause
exit /b 1
)
@gam0022
gam0022 / google-ime-keymap.txt
Last active December 17, 2024 03:35
google-ime-keymap.txt
status key command
Composition Backspace Backspace
Composition Ctrl ; DisplayAsHalfWidth
Composition Ctrl : DisplayAsHalfAlphanumeric
Composition Ctrl ' DisplayAsHalfAlphanumeric
Composition Ctrl a MoveCursorToBeginning
Composition Ctrl b MoveCursorLeft
Composition Ctrl d Delete
Composition Ctrl e MoveCursorToEnd
Composition Ctrl f MoveCursorRight
#version 410 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
uniform float fFrameTime; // duration of the last frame, in seconds
uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients
uniform sampler1D texFFTIntegrated; // this is continually increasing
uniform sampler2D texPreviousFrame; // screenshot of the previous frame
@gam0022
gam0022 / ShaderKeywordCollector.cs
Last active March 13, 2024 06:33 — forked from rngtm/ShaderKeywordCollector.cs
Unityプロジェクト内に存在するすべてのマテリアルのシェーダーキーワードをShaderVariantCollectionへ登録するツール (Unity2022 / URP14.0.10)
namespace MyTool
{
using System;
using UnityEditor;
using UnityEngine;
using System.Linq;
using UnityEngine.Rendering;
public class ShaderKeywordCollector : EditorWindow
{
@gam0022
gam0022 / sender_inerciaroyale_gam0022.glsl
Created December 2, 2023 00:15
GLSL LiveCoding@Inércia 2023
#version 410 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
uniform float fFrameTime; // duration of the last frame, in seconds
uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients
uniform sampler1D texFFTIntegrated; // this is continually increasing
uniform sampler2D texPreviousFrame; // screenshot of the previous frame
@gam0022
gam0022 / livecoding_2023_11_04.glsl
Created November 8, 2023 13:27
GLSLライブコーディング@新千歳空港国際アニメーション映画祭
#version 410 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
uniform float fFrameTime; // duration of the last frame, in seconds
uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients
uniform sampler1D texFFTIntegrated; // this is continually increasing
uniform sampler2D texPreviousFrame; // screenshot of the previous frame
@gam0022
gam0022 / README.md
Last active December 11, 2021 07:36
[TDF2021] Lightning Tunnel

Lightning Tunnel

25分でライブコーディングしたシェーダーです。

This shader was coded in 25 minutes.

Shader showdown quarter-final at #TokyoDemoFest

#GLSL #Bonzomatic #Shader #LiveCoding

@gam0022
gam0022 / zozuar-cloud.glsl
Last active October 24, 2021 07:07
@zozuar さんのシェーダーが凄すぎたのでコードリーディング
// @zozuar さんのシェーダーが凄すぎたのでコードリーディング
// https://twitter.com/zozuar/status/1441384708441456651
float i, // レイマーチングのループカウンター
e, // ボリュームの密度(値が小さいほど密度が濃くなる)
s, // fbmのループカウンター
g, // レイの進んだ距離(カメラのパースのためにも利用)
k = .01;// 0.01の定数
// レイマーチングのループ
@gam0022
gam0022 / tanjiro.glsl
Last active December 21, 2020 06:22
#つぶやきGLSL で #tan治郎 の解説
// #つぶやきGLSL で #tan治郎 の解説
// https://twitter.com/gam0022/status/1339584625929175042
// #つぶやきGLSLとは?
// 1ツイートに収まる文字数の制限でGLSLのシェーダーを書く遊びです。
// ハッシュタグを考慮すると 270 文字前後のようです。
// @h_doxas さん開発の https://twigl.app/ を使うと、文字数カウントやGIF出力の機能があるため便利です。
// FCは gl_FragCoord の短縮形です。ピクセル単位の座標が入っています。
// r は resolution の短縮形です。ピクセル単位のキャンバスの解像度が入っています。