View grey2rgb.hlsl
float interpolate(float val, float y0, float x0, float y1, float x1) {
return (val - x0)*(y1 - y0) / (x1 - x0) + y0;
}
float blue(float grayscale) {
if (grayscale < -0.33) return 1.0;
else if (grayscale < 0.33) return interpolate(grayscale, 1.0, -0.33, 0.0, 0.33);
else return 0.0;
}
float green(float grayscale) {
if (grayscale < -1.0) return 0.0; // unexpected grayscale value
View bokehsplatting.shader
/*
DX11 Bokeh splatting
basic algorithm:
* find bright spots
* verify high frequency (otherwise dont care)
* if possitive, replace with black pixel and add to append buffer
* blend bokeh texture sprites via append buffer on top of blurred buffer
*/
View run compute shader.cs
RenderTexture RunShader()
{
int kernelHandle = shader.FindKernel("CSMain");
RenderTexture tex = new RenderTexture(256, 256, 24);
tex.enableRandomWrite = true;
tex.Create();
shader.SetTexture(kernelHandle, "Result", tex);
shader.Dispatch(kernelHandle, 32, 32, 1);
View lab ip config.txt
ip 202.120.38.35
mask 255.255.255.0
gateway 202.120.38.254
DNS 202.120.1.101
202.120.1.100
MAC 000874:149325
View cholupdate.py
from __future__ import division
import numpy as np
from numpy.random import randn
from scipy.linalg.blas import drot, drotg
# references for updates:
# - Golub and van Loan (4th ed.) Section 6.5.4
# - http://mathoverflow.net/questions/30162/is-there-a-way-to-simplify-block-cholesky-decomposition-if-you-already-have-deco
#
# references for downdates: