Pat1
Original picture:
Fetures implemeted:
- Image negative: vec3(1.0) - rgb
- Gaussian blur: GaussianBlurMatrix = 1/16[[1 2 1][2 4 2][1 2 1]]
- Grayscale: vec3 w = vec3(0.2125, 0.7154, 0.0721); luminace = dot(rgb, W);
- Edge Detection: Sobel-horizontal = [[-1 -2 -1][0 0 0 ][1 2 1]]; Sobel-vertical = [[-1 0 1][-2 0 2 ][-1 0 1]].
- Toon shading
Optional features:
- Pixelate: define the pixel size(by using the picture size); Get the new coordinates by6 multiply the pixel size with the pixel index. Pixel indices are calculated by dived the original texture coordinates by pixel size.
- Brightness: u = (rgb.r + rgb.g + rgb.b)/3;
- Contrast: (m-a)/(n-a) vs m/n
- Night Vision: Only multiplied by green color;
Part2:
Sea wave:
float s = sin(pos.x*2PI + time);float t = cos(pos.y*2PI + time);height = sin(sqrt(s^2 + t^2 ))/sqrt(s^2 +t^2 );
No comments:
Post a Comment