2020年1月12日日曜日

ポータブル Vim

動機

Windows用のポータブルなエディタを用意したい.
ミーティング等でノートをとるときなどに使用したい.

  • ネットワークドライブ越しで使える
  • 簡単にコピーできるようにサイズが小さい
  • テキストエディタの機能だけでよい

Vim

Kaoriya版をベースにする.
vim.exe, gvim.exeの不要な方を削除する.

まず, HOMEの設定をしなければいけないため, vimrc_local.vimで設定する.

let $HOME=expand('%:p:h')

_vimrc, _gvimrcをvimrc, gvimrcの後にロードするため, ここに設定を書く.

プラグイン無効化

vimrcに以下を追加

let plugin_autodate_disable  = 1
let plugin_cmdex_disable     = 1
let plugin_dicwin_disable    = 1
let plugin_format_disable    = 1
let plugin_hz_ja_disable     = 1
let plugin_scrnmode_disable  = 1

vimdoc-jaも無効化して, plugins\vimdoc-jaを削除する.

プラグインインストール

必要なものは手動で行う.

フォント

見やすくないがWindows 7が全て駆逐されるまでは,

set guifont=MS_Mincho:h12:cSHIFTJIS

2019年8月2日金曜日

SIGGRAPH 2019 Ray Tracing Roundup

http://www.realtimerendering.com/raytracing/roundup.html

2019年7月6日土曜日

Pseudo Random Number Generator for GPUs

I slightly modify a method in a Nathan's post.
//From https://stackoverflow.com/questions/664014/what-integer-hash-function-are-good-that-accepts-an-integer-hash-key/12996028#12996028
//It seems that a hash function for seeding don't make an impact.
uint hash(uint x)
{
    x = ((x >> 16) ^ x) * 0x119de1f3;
    x = ((x >> 16) ^ x) * 0x119de1f3;
    x = (x >> 16) ^ x;
    return x;
}

uint xorshift32_state;

void xorshift32_srand(uint seed)
{
    xorshift32_state = hash(seed);
}

uint xorshift32_rand()
{
    xorshift32_state ^= xorshift32_state << 13;
 xorshift32_state ^= xorshift32_state >> 17;
 xorshift32_state ^= xorshift32_state << 5;
 return xorshift32_state;
}

float xorshift32_frand()
{
    return float(xorshift32_rand()) * (1.0 / 4294967296.0);
}

[numthreads(8,8,1)]
void CSMain (uint3 id : SV_DispatchThreadID)
{
    uint width,height;
    textureResult.GetDimensions(width, height);

    xorshift32_srand(id.x+id.y*width);
    textureResult[id.xy] = xorshift32_frand();
}

2019年2月16日土曜日

xoshiro

http://xoshiro.di.unimi.it/
これに一本化して, 他の性質が欲しい場合はxorsfhit系列とは別のアルゴリズムを使おう.

2019年1月20日日曜日

PlantUML

インストール

PlantUMLから, plantuml.jarをダウンロードします.
また, Graphvizもダウンロードしておきます.

Windowsの場合以下のようなバッチを用意します.
plantuml.bat
@set GRAPHVIZ_DOT=<path to graphviz>\bin\dot.exe
@<path to JDK>\bin\java.exe -jar <path to PlantUML>\plantuml.jar -config config.txt -charset UTF-8 %*
設定ファイルでフォントサイズなどを設定します.
クラス図のアイコンは非表示にしました.
config.txt
skinparam classArrowFontSize 14
skinparam classAttributeFontSize 14
skinparam classFontSize 16
skinparam classStereotypeFontSize 16
skinparam classAttributeIconSize 0

2018年6月13日水曜日

Real-Time Rendering, Fourth Edition

Real-Time Renderingの第4版が8月発売です。
Real-Time Rendering, Fourth Edition