セカント法(Secant Method)
$x_{n+1}=x_n - f(x_n)\frac{x_n - x_{n-1}}{f(x_n)-f(x_{n-1})}$
で逆関数の値を事前に計算し, 後に線形補間で求めるメモ.
2015年11月23日月曜日
2015年11月17日火曜日
Unity3D RenderTextureから, RenderTargetIdentifierを作成
renderTexture = new RenderTexture(
width,
height,
24,
RenderTextureFormat.Default,
RenderTextureReadWrite.Default);
CommandBuffer commandBuffer = new CommandBuffer();
int screenCopyID1 = Shader.PropertyToID("_Temp1");
commandBuffer.GetTemporaryRT(
screenCopyID1,
width, height, 0,
FilterMode.Bilinear);
RenderTargetIdentifier renderTargetId = new RenderTargetIdentifier(renderTexture);
commandBuffer.Blit(renderTargetId, screenCopyID1);
てな感じで, コマンドバッファに組み込んでいける.
2015年10月30日金曜日
2015年10月18日日曜日
Unity3D 16bit ディザリング
テクスチャリソースのインポート処理時に,
ディザリング処理して16ビットに変換する.
Contrast Aware Halftoningを実装.
https://github.com/taqu/Dither
ディザリング処理して16ビットに変換する.
Contrast Aware Halftoningを実装.
https://github.com/taqu/Dither
2015年9月14日月曜日
Bounding Volume Hierarchy 01
既存のコードはQBVHだが, すでに古いらしいので, 古典から順番に作成中.
- SAHBVH
- Surface Area Heuristic (SAH)をがっつりまじめに計算.
- BinBVH
- Highly Parallel Fast KD-tree Construction for Interactive Ray Tracing of Dynamic Scenes
- SAH計算をbinningで高速化.
- QBVH
- Shallow Bounding Volume Hierarchies for Fast SIMD Ray Tracing of Incoherent Rays
- Bounding Boxを節ノードに4つ作る, 4分木を構成.
- トラバースの際に, 4つのBounding BoxとレイをSIMDで同時交差判定.
2015年9月5日土曜日
チューリング先生のマラソン記録
チューリング先生のマラソンベストタイムは, 2時間46分だそうです.
1940年前後のオリンピックマラソン金メダリストの記録は, 2時間30分前後でした.
世のプログラマは斯くあるべきと思う.
私は現在のシューズや舗装路の進化がありながら, 約30分離されている.
登録:
投稿 (Atom)