sRGBからリニアへの変換は, 2乗で近似する.
sRGB to Linear
LinearRGB = sRGB*sRGB;
2015年12月2日水曜日
Unity3D 5 "Enable Internal Profiler"をスクリプトから設定
PlayerSettings.enableInternalProfilerは, iOS用です.
Androidは, プロパティ名 "AndroidProfiler"です.
Androidは, プロパティ名 "AndroidProfiler"です.
//For iOS PlayerSettings.enableInternalProfiler = true; //For Android PlayerSettings[] playerSettings = Resources.FindObjectsOfTypeAll(); foreach(PlayerSettings ps in playerSettings) { SerializedObject serializedObject = new SerializedObject(ps); SerializedProperty enableInternalProfiler = serializedObject.FindProperty("AndroidProfiler"); if(null == enableInternalProfiler) { continue; } enableInternalProfiler.boolValue = true; serializedObject.ApplyModifiedProperties(); }
2015年11月26日木曜日
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
登録:
投稿 (Atom)