KodeLifeでMIDIコンを使う例です。詳細は以下の記事を参照してください。
View README.md
Lightning Tunnel
25分でライブコーディングしたシェーダーです。
This shader was coded in 25 minutes.
Shader showdown quarter-final at #TokyoDemoFest
#GLSL #Bonzomatic #Shader #LiveCoding
View zozuar-cloud.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @zozuar さんのシェーダーが凄すぎたのでコードリーディング | |
// https://twitter.com/zozuar/status/1441384708441456651 | |
float i, // レイマーチングのループカウンター | |
e, // ボリュームの密度(値が小さいほど密度が濃くなる) | |
s, // fbmのループカウンター | |
g, // レイの進んだ距離(カメラのパースのためにも利用) | |
k = .01;// 0.01の定数 | |
// レイマーチングのループ |
View tanjiro.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// #つぶやきGLSL で #tan治郎 の解説 | |
// https://twitter.com/gam0022/status/1339584625929175042 | |
// #つぶやきGLSLとは? | |
// 1ツイートに収まる文字数の制限でGLSLのシェーダーを書く遊びです。 | |
// ハッシュタグを考慮すると 270 文字前後のようです。 | |
// @h_doxas さん開発の https://twigl.app/ を使うと、文字数カウントやGIF出力の機能があるため便利です。 | |
// FCは gl_FragCoord の短縮形です。ピクセル単位の座標が入っています。 | |
// r は resolution の短縮形です。ピクセル単位のキャンバスの解像度が入っています。 |
View memo.md
struct GBufferOut
{
half4 diffuse : SV_Target0; // rgb: diffuse, a: occlusion
half4 specular : SV_Target1; // rgb: specular, a: smoothness
half4 normal : SV_Target2; // rgb: normal, a: unused
half4 emission : SV_Target3; // rgb: emission, a: unused
#ifndef DO_NOT_OUTPUT_DEPTH
float depth : SV_Depth;
View vscode-glslfan.md
shadertoy.com 用のVSCode拡張をforkして、 glslfan.com や glslsandbox.com のコードでも動くように改造した。の導入手順です。
# npmをインストール
# 自分はnodeからnpm入れました
cd ~/.vscode/extensions
git clone -b glslsandbox-uniforms git@github.com:gam0022/shader-toy.git
View fragmentShader.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
precision highp float; | |
precision highp int; | |
#define SHADER_NAME ShaderMaterial | |
#define GAMMA_FACTOR 2 | |
#define NUM_CLIPPING_PLANES 0 | |
#define UNION_CLIPPING_PLANES 0 | |
uniform mat4 viewMatrix; | |
uniform vec3 cameraPosition; | |
#define TONE_MAPPING | |
#define saturate(a) clamp( a, 0.0, 1.0 ) |
View file0.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install update-manager-core | |
sudo do-release-upgrade |
View fragmentShader.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
precision highp float; | |
precision highp int; | |
#define SHADER_NAME ShaderMaterial | |
#define GAMMA_FACTOR 2 | |
#define NUM_CLIPPING_PLANES 0 | |
uniform mat4 viewMatrix; | |
uniform vec3 cameraPosition; | |
#define TONE_MAPPING | |
#define saturate(a) clamp( a, 0.0, 1.0 ) | |
uniform float toneMappingExposure; |
View dFdyによる法線の計算
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vec3 getNormal(vec3 p) { | |
vec3 dx = dFdx(p); | |
vec3 dy = dFdy(p); | |
return normalize(cross(dx, dy)); | |
} |
NewerOlder