I am thrilled to announce that Social Street View has won the Best Paper Award at Web3D 2016, which was held next to SIGGRAPH 2016 in late August! Please visit the project website for more details: http://www.socialstreetview.com I also published my slides and videos.
Dotted Drawing / Sketch Effect
After lunch, I want to replicate the sketch shader I wrote for the PencilvsCamera project. Additionally, I wrote a onepass shader for dotted drawing / sketch post processing effect, which I think is more aesthetically pleasing. Dotted Drawing Demo Click on the play button in the left bottom corner of the embedded ShaderToy window below, to…
Unified Gnomonic and Stereographic Projections
Gnomonic projection, or rectilinear projection, together with stereographic projection, are two most commonly used projection in rendering 360 degree videos, or other VR applications. Recently, I found the inverse converting function from screen coordinates to the two projections can be unified within a single function. It’s not really surprising since both projection uses spherical lens,…
Equirectangular, Gnomonic Projections, and Cubemaps
Background According to MathWorld, the gnomonic projection is a nonconformal map projection obtained by projecting points P_1 (or P_2) on the surface of sphere from a sphere’s center O to point P in a plane that is tangent to a point S (Coxeter 1969, p. 93). In a gnomonic projection, great circles are mapped to…
04 Order of Spherical Harmonics
Spherical Harmonics is widely used in Computer Graphics. They are analogue to Fourier basis on a sphere, consists of a set of orthogonal functions to represent functions defined on the surface of a sphere. However, they are very tricky to implement due to lots of constants and integral functions. Here is a realtime visualization that…
Yet another shader for image fadeIn effect
Taken iq’s background transparent code and Dr. Neyret’s advice: This shader can be used for rendering popup images in a 3D environment.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 
// Image FadeIn Effect, CC0 // Forked from iq's invisible shader with transparent background: [url]https://www.shadertoy.com/view/XljSRK[/url] float backgroundPattern( in vec2 p ) { vec2 uv = p + 0.1*texture2D( iChannel2, 0.05*p ).xy; return texture2D( iChannel1, 16.0*uv ).x; } vec3 getBackground(in vec2 coord) { float fa = backgroundPattern( (coord + 0.0) / iChannelResolution[0].xy ); float fb = backgroundPattern( (coord  0.5) / iChannelResolution[0].xy ); return vec3( 0.822 + 0.4*(fafb) ); } float getFadeInWeight(vec2 uv) { float edge = 0.3 * abs(sin(0.5)); // taken FabriceNeyret2's advice vec4 v = smoothstep(0., edge, vec4(uv, 1.  uv) ); return v.x * v.y * v.z * v.w; } void mainImage( out vec4 fragColor, in vec2 fragCoord ) { vec2 uv = fragCoord.xy / iResolution.xy; vec3 bg = getBackground(fragCoord); vec3 col = texture2D(iChannel0, uv).rgb; float alpha = getFadeInWeight(uv); fragColor = vec4(mix(bg, col, alpha), 1.0); } 
Real Artifacts
An interesting page listing photographys from the real world that seems like computer graphical artifacts 🙂 http://graphics.cs.williams.edu/realartifacts/ Finally catched the SIGGRAPH deadline! Hooray!
[Summary] Dr. Izadi’s Holoportation Talk on UIST 2016
Finally the talk on Holoportation is publicly available on YouTube. This is a very useful talk which gives big pictures of the stateoftheart on realtime 3D reconstruction. For the future? Infrastructure FoV Headset removal Compression Interestingly, someone in the UIST 2016 conference mentioned about the problem of mobility. And this is the mobile Holoportation which…
Foveated Rendering via Quadtree
Today, I wrote a shader for foveated rendering uisng Prof. Neyret’s QuadTree: https://www.shadertoy.com/view/Ml3SDf The basic idea is: Calculate the depth of the QuadTree using the distance between the current coordinate to the foveat region Use the depth as the mipmap level to sample from the texture Code below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 
// forked and remixed from Prof. Neyret's https://www.shadertoy.com/view/ltBSDV // Foveated Rendering via Quadtree: https://www.shadertoy.com/view/Ml3SDf# void mainImage( out vec4 o, vec2 U ) { float r = 0.1, t = iGlobalTime, H = iResolution.y; vec2 V = U.xy / iResolution.xy; U /= H; // foveated region : disc(P,r) vec2 P = .5 + .5 * vec2(cos(t), sin(t * 0.7)), fU; U *= .5; P *= .5; // unzoom for the whole domain falls within [0,1]^n float mipmapLevel = 4.0; for (int i = 0; i < 7; ++i) { // to the infinity, and beyond ! :) //fU = min(U,1.U); if (min(fU.x,fU.y) < 3.*r/H) { o; break; } // cell border if (length(P  vec2(0.5))  r > 0.7) break; // cell is out of the shape //  iterate to child cell fU = step(.5, U); // select child U = 2.0 * U  fU; // go to new local frame P = 2.0 * P  fU; r *= 2.0; mipmapLevel = 0.5; } o = texture2D(iChannel0, V, mipmapLevel); } 
Weta Workshop Made the Magic Leap Demo
A year and a half ago, I wrote a blog post talking about Comparison amongst MagicLeap vs. HoloLens vs. Oculus Rift, in which I said about MagicLeap: Finally, the Magic Leap sounds more promising to me. However, I don’t think the technical product will come until 1~2 years later, let alone the consumer product. All these information…
Bilateral Filter to Look Younger on GPU
Bilateral filter can be used to smooth the texture while preserving significant edges / contrast. Below shows a live demo in ShaderToy. Press mouse for comparison. Thanks to mrharicot’s awesome bilateral filter: https://www.shadertoy.com/view/4dfGDH With performance improvement proposed by athlete. With gamma correction by iq: https://www.shadertoy.com/view/XtsSzH Skin detection forked from carlolsson’s Skin Detection https://www.shadertoy.com/view/MlfSzn#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 
// Bilateral Filter for Younger. starea. // URL: https://www.shadertoy.com/view/XtVGWG // Press mouse for comparison. // Filter forked from mrharicot: https://www.shadertoy.com/view/4dfGDH // Skin detection forked from carlolsson's Skin Detection https://www.shadertoy.com/view/MlfSzn# // With performance improvement by athlete #define SIGMA 10.0 #define BSIGMA 0.1 #define MSIZE 15 #define USE_CONSTANT_KERNEL #define SKIN_DETECTION const bool GAMMA_CORRECTION = true; float kernel[MSIZE]; float normpdf(in float x, in float sigma) { return 0.39894 * exp(0.5 * x * x/ (sigma * sigma)) / sigma; } float normpdf3(in vec3 v, in float sigma) { return 0.39894 * exp(0.5 * dot(v,v) / (sigma * sigma)) / sigma; } float normalizeColorChannel(in float value, in float min, in float max) { return (value  min)/(maxmin); } void mainImage( out vec4 fragColor, in vec2 fragCoord ) { vec3 c = texture2D(iChannel0, (fragCoord.xy / iResolution.xy)).rgb; const int kSize = (MSIZE  1) / 2; vec3 final_colour = vec3(0.0); float Z = 0.0; #ifdef USE_CONSTANT_KERNEL // unfortunately, WebGL 1.0 does not support constant arrays... kernel[0] = kernel[14] = 0.031225216; kernel[1] = kernel[13] = 0.033322271; kernel[2] = kernel[12] = 0.035206333; kernel[3] = kernel[11] = 0.036826804; kernel[4] = kernel[10] = 0.038138565; kernel[5] = kernel[9] = 0.039104044; kernel[6] = kernel[8] = 0.039695028; kernel[7] = 0.039894000; float bZ = 0.2506642602897679; #else //create the 1D kernel for (int j = 0; j <= kSize; ++j) { kernel[kSize+j] = kernel[kSizej] = normpdf(float(j), SIGMA); } float bZ = 1.0 / normpdf(0.0, BSIGMA); #endif vec3 cc; float factor; //read out the texels for (int i=kSize; i <= kSize; ++i) { for (int j=kSize; j <= kSize; ++j) { cc = texture2D(iChannel0, (fragCoord.xy+vec2(float(i),float(j))) / iResolution.xy).rgb; factor = normpdf3(ccc, BSIGMA) * bZ * kernel[kSize+j] * kernel[kSize+i]; Z += factor; if (GAMMA_CORRECTION) { final_colour += factor * pow(cc, vec3(2.2)); } else { final_colour += factor * cc; } } } if (GAMMA_CORRECTION) { fragColor = vec4(pow(final_colour / Z, vec3(1.0/2.2)), 1.0); } else { fragColor = vec4(final_colour / Z, 1.0); } bool isSkin = true; #ifdef SKIN_DETECTION isSkin = false; vec4 rgb = fragColor * 255.0; vec4 ycbcr = rgb; ycbcr.x = 16.0 + rgb.x*0.257 + rgb.y*0.504 + rgb.z*0.098; ycbcr.y = 128.0  rgb.x*0.148  rgb.y*0.291 + rgb.z*0.439; ycbcr.z = 128.0 + rgb.x*0.439  rgb.y*0.368  rgb.z*0.071; if (ycbcr.y > 100.0 && ycbcr.y < 118.0 && ycbcr.z > 121.0 && ycbcr.z < 161.0) { isSkin = true; } #endif if (iMouse.z > 0.0  !isSkin) { fragColor = vec4(texture2D(iChannel0, fragCoord.xy / iResolution.xy).xyz, 1.0); } } 
…
June 2017 M T W T F S S « Apr 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Clock
World
Random Posts
 Statistics of ISMAR 2015 Science & Technology Papers
 [Summary & Joke] What’s Wrong with Deep Learning? – CVPR 2015 Plenary Talk
 HoloLens + Minecraft @ Microsoft E3 Gaming Conference
 Libraries, Textbooks, Courses, Tutorials for WebGL
 [Summary] PhD Proposal: Structured Approaches to Exploring InterPersonal Relationships in Natural Language Text
Share
Slideshow

Recent Posts
Twitter
My TweetsRecent Comments
 Week 5: Being a Digital Curator – Site Title on Quick Tutorial on Refereces Management using Mendeley / Endnote / Word / ShareLaTeX
 starea on Tutorial of Ray Casting, Ray Tracing and Ray Marching
 Ron Francis on Tutorial of Ray Casting, Ray Tracing and Ray Marching
 starea on Tutorial of Ray Casting, Ray Tracing and Ray Marching
 mal on Tutorial of Ray Casting, Ray Tracing and Ray Marching
Archives
Categories
Meta