Graphtoy v0.4 by Inigo Quilez since 2010 (feedback from Rafæl Couto, Florian Mosleh, Nicholas Ralabate, Rich Eakin and Jason Tully). You can support the project in Patreon or PayPal.

by Patricio Gonzalez Vivo and Jen Lowe This is a gentle step-by-step guide through the abstract and complex universe of Fragment Shaders. Contents About this book Getting started What is a shader? “Hello world!” Uniforms Running your shader Algorithmic drawing Shaping functions Colors Shapes Matrices Patterns Generative designs Random Noise Cellular noise Fractional brownian motion Fractals Image
Build and Share your best shaders with the world and get Inspired Latest contributions: "fractal glow 2" by nayk 10 minutes ago, "glow fractal " by nayk 13 minutes ago, "Jitter blend" by fakeljl 55 minutes ago, "Smokey Trail [287 Chars]" by SnoopethDuckDuck 1 hour ago, "infinite nested frame" by yufengjie 2 hours ago
今日は、GLSLによるカートゥーンを紹介しようと思います。割と簡単にでき、それなりに見栄えがするからです。その応用として、輪郭線も描画します。 カートゥーンの原理 カートゥーンはセルアニメ調のレンダリングです。左下の図に示すように、頂点vにおいて、法線と光源ベクトル(頂点から光源へのベクトル)との内積(照度)を、右下の図のようなテクスチャのs座標に当てはめることで簡単に実現できます。 更に、次の図の左のように、視線ベクトルと法線の内積を考えると、輪郭となる部分はほぼ0になります。そのため、その内積をt座標に割り当てることで、輪郭線を実現できます。 s座標もt座標も単位ベクトル同士の内積で計算できますが、その範囲は-1~1になるため、テクスチャマッピング(glTexParameterによる指定)をクランプに設定する必要があります。 バーテックスシェーダ(頂点シェーダ) 今回は、頂点シェーダで
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く