• Interactive Poisson Blending on GPU
    Interactive Poisson Blending on GPU
  • 404 Not Found In Two Triangles
    404 Not Found In Two Triangles
  • Simplest and Fastest GLSL Edge Detection using Fwidth
    Simplest and Fastest GLSL Edge Detection using Fwidth
  • Comparison: MagicLeap vs. HoloLens vs. Oculus Rift
    Comparison: MagicLeap vs. HoloLens vs. Oculus Rift

Tag: bilateral

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#


Simplest and Fatest GLSL Edge Detection using Fwidth

Yesterday, I read 834144373’s ShaderToy code which did Edge Detection in 97 chars, it was really simple and fast:

However, the result is astonishingly good: Let’s expand the code a little bit:

According to OpenGL manual: fwidth means  abs(dFdx(p)) + abs(dFdy(p)) and fwidthFine is equivalent to abs(dFdxFine(p)) + abs(dFdyFine(p)). One can use a sigmoid function to increase the…