Skip to content

Instantly share code, notes, and snippets.

View gam0022's full-sized avatar
😇
なの

がむ gam0022

😇
なの
View GitHub Profile
@wotakuro
wotakuro / RenderingGpuWatcher.cs
Last active February 19, 2024 01:07
Unity 2021.2+URPで画面にGPU処理時間を出します
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
using UnityEngine.UI;
#if DEBUG
// Commented version of https://twitter.com/zozuar/status/1441384708441456651
// Google-translated (with some editing) from @gam0022's version
float i, // Ray marching loop counter
e, // Volume density (the smaller the value, the higher the density)
s, // FBM scale (and loop counter)
g, // Ray's distance (also used for tunnel twirl and camera prespective)
k = .01; // Handy constant
// Ray marching loop
@0b5vr
0b5vr / genbun.glsl
Last active August 7, 2021 14:55
prod05 sierpinski chord by 0x4015完全理解した
// https://www.youtube.com/watch?v=H8UqnTE3mUY より引用
#define A for(int i=0;i<9;++i){int y=p>>((p>>19)+i&3),z=p*((878086607>>(i&7)*4)&15)*(510+1%5)>>14;if((p>>15&1<<(i&15))>0)s.y+=float(((y>>7&z*3|y>>11&z*6)&1023)-512)/3e4;}
vec2 mainSound(float t){int p=int(t*144e3);vec2 s;A;s.yx=s;p-=65536;A;return s*mat2(7,1,5,-3);}
#version 410 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
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 texChecker;
uniform sampler2D texNoise;
@bellbind
bellbind / fragment.glsl
Last active January 31, 2024 14:56
[webgl2]example for webgl2 (with glsl3)
#version 300 es
precision highp float;
//invariant gl_FragCoord;
uniform Screen {
vec2 wh;
} screen;
uniform Timer {
int count;
@kaneta1992
kaneta1992 / three.js memo
Created January 10, 2016 10:59
three.js glsl組み込み定義
1: precision highp float;
2: precision highp int;
3: #define SHADER_NAME ShaderMaterial
4: #define VERTEX_TEXTURES
5: #define GAMMA_FACTOR 2
6: #define MAX_DIR_LIGHTS 0
7: #define MAX_POINT_LIGHTS 0
8: #define MAX_SPOT_LIGHTS 0
9: #define MAX_HEMI_LIGHTS 0
10: #define MAX_SHADOWS 0
@azrsjp
azrsjp / dtm.markdown
Last active April 3, 2024 14:11
究極初心者がとりあえず聴けるレベルの曲を作れるようになるまで

究極初心者がとりあえず聴けるレベルの曲を作れるようになるまで

@azrsjp です。これは,DTM Advent Calendar 2015の19日目の記事です。

はじめに

本記事はDTM究極初心者が「こういうことをしたらとりあえず前よりは聞ける曲が完成させられるレベルになれた」という思い出話を綴ります。あくまで思い出話です。思い出話。今現在DTMに興味があるけど,何をしたらいいかわからない,__センスがないのでは…__と悩んでる方に,センスがなくても,まぁ形にはなるということを示し,希望を持って頂くために書きます。

この記事を読んで幸せになる人物像は以下のような方(昔の僕)

  • DTMでオリジナル曲を作りたい
  • DTMによる曲がどういう風にできているか大体の想像はつく(DAWというソフトがあり,ピアノロールで打ち込んで曲を表現する等)
@himaratsu
himaratsu / confwd_ninjinkun.md
Last active May 24, 2020 06:15
GitHub活動を通して個人のキャリアを詰みつつ仕事の成果を出す方法
@tmr111116
tmr111116 / gist:8282663
Created January 6, 2014 13:09
デフォルトの Mac で UTF-8 の BOM をつけるコマンド
cat <(printf "\xEF\xBB\xBF") 元のUTF-8ファイル.txt > BOM付きUTF-8ファイル.txt

C++初心者がC++を使って競技プログラミングするための備忘録のようなもの

この記事は、C++ (fork) Advent Calendar 2013の12日目の記事です。

はじめに

記事を書く人が居ないみたいなので、C++初心者ですが箸休め的な記事を書こうと思い立ち、いざ書き上げてみたら思いの外長くなりました。

この記事は、C++初心者な著者が、C++を用いて競技プログラミングをするために、調べたことや試した事などのまとめです。 記事中に誤り、問題点やご指摘、ご質問等ありましたら、@rigibunまでご連絡下さい(特にpush_bach)

githubのmarkdownを使いたかったことと、変更履歴が見られることからgistで書きました。