Categories: hobby projects research university work FLOSS other
Other Links: blog, github, freedesktop gitlab, shadertoy



Hair simulation using a mass-spring system

A mass-spring based system to simulate mohawk-like hair. (Linux) More...
BootBoot: a boot effect

BootBoot is my x86 assembly helloworld. A program that boots from a floppy (or flash disk) displays an effect and loads the first sector of the first hard disk (grub). Code is on github. More...
Winnie (libwinnie): a framebuffer window system

Winnie is a framebuffer window system I write for fun and to familiarize myself with the concepts of device handling, event management, window management, memory management etc on Linux. Winnie can handle the mouse and keyboard events (/dev/psaux, /dev/tty) and render to the Linux framebuffer device (/dev/fb0). It has a minimal window manager that can handle the frames using reparenting. (Linux) More...
Sdrviewer

A minimal pixel shader viewer that can instantly show the changes made in a pixel shader. (Linux) More...
3D texture-based volume rendering: a CT scan viewer

3D texture based volume rendering of 2D computed tomography slices. It uses a sigmoid-based transfer function. (Linux) More...
VKeyb: A motion driven virtual keyboard application

Vkeyb is an optical flow driven keyboard for Linux that allows the user to type by moving his body in front of a web camera. More...
A meadow with cows

A demo OpenGL program I've written when I joined Igalia. It's a procedural terrain with uniformly distributed cows, where the size, the number of polygons, and the number of cows are configurable. I experimented with graphics concepts like environment mapping, image based lighting, simple morphing, surface subdivision and the Poisson distribution (to uniformly spread the cows on the terrain).
DTMS ("Don't touch my screen!")

DTMS is a short program that shouts "Don't touch my screen bro!" whenever someone touches my screen and leaves a fingerprint on it. More...
Pixel Shaders Various effects in pixel shaders from my shadertoy

Shaders I've written for fun in Shadertoy. More...

psych tunnel plasma overflow foobar creatures xor based patterns
An intro inspired by the XDC 2018 logo

An animated intro inspired by the lighthouse of A Coruña that was used in the XDC 2018 logo. More...
Experimental helloworld kernel module

A quick experiment to understand the Linux kernel basics. More...
An augmented reality effect: AR Snakeball

This is a small program, similar to the snakeball game. It can be "played" using a webcam and a flashlight. The player collects virtual balls that appear on a window in random positions using a flashlight. (Linux, Windows, Mac OS X) More...
Kinect helloworld: Invisible

A quick hack for kinect to play with libfreenect on linux. The texture is distorted using a GLSL shader and takes the shape and depth of my silhouette. Code: here

Morphing objects

Another quick OpenGL experiment where I tried to morph a 3D object to another 3D object. For the code and more details you can take a look at the relevant blog post.
An animated tentacle...

A small contribution to the 46th Ludum Dare jam... Our game was titled "Save the penguin", we've never finished it, and it was full of funny bugs. My contribution was the initial implementation of the b-splines moving tentacles, and I am still wowed by how other people manage to write full games from scratch in only one weekend! Credits, code, and details in my blog post on the jam! More...
A system to reject phone calls from my laptop

A system we devised and set up at home for me to be able to reject annoying phone calls from my laptop. I used it More...
An OpenGL experiment in Rust

As people praise Rust a lot and I was curious about it, I've written a small Rust/OpenGL/SDL2 test program to familiarize myself with the language syntax. I wrote it during a Rust/Gtk workshop in GUADEC (a conference about technologies used in Gnome desktop) that was sponsored by Igalia, the company I was working for at the time. The demo fits in a gist as it simply toggles the logos of Igalia and GUADEC when a key is pressed.

Read more in my blog post on the conference.
An infrared receiver

An infrared receiver circuit to remote control programs with lirc support such as mplayer. (Linux) More...




Depth Aware upscaling experiments

A depth-aware algorithm to upscale lower resolution textures (Vulkan):
The pixel neighborhoods of the downscaled image are classified to surface neighborhoods and neighborhoods that contain discontinuities using information from a downscaled normal buffer. Linear interpolation is used to upscale the pixels of the surface neighborhoods (smooth colors) and the most representative depth is used to upscale the pixels where discontinuities are detected (reduces the artifacts). I've written a series of blog posts where I compare various depth aware algorithms and in part 6 I describe the new algorithm in detail. More...
Depth aware upsampling experiments blog posts:
Comparisons: [part 4]
Tweaks: [part 5]

Videos:
[ssao], [discontinuity detection], [result]





Head detection and tracking using depth information from Kinect frames (Adapt4EEE)

As part of my work for ITI, a research institute, I've implemented a head detection tool that can be used for human detection on Kinect frames (without the Kinect SDK). The implementation was based in the following paper (I borrowed the hemisphere projection detection) but some steps were modified or tweaked and the video is from an early development stage. Unfortunately the code is not free software.

[1] "Human Detection Using Depth Information by Kinect", Lu Xia, Chia-Chih Chen and J. K. Aggarwal






Mesa3D ecosystem highlights:


When I joined Igalia in 2017, I've written some code for the Mesa3D drivers and other tools. Soon, I was addicted to that, and continued sending patches while I had been moved to the browsers team and then finally stopped working for Igalia.

Patches and/or blog posts that aren't mentioned below can be found in the following links:





ETC2/EAC formats emulation improvements (i965 driver)

That was to allow Intel Gen7 GPUs to be compatible with modern OpenGL standards. After the modification:
  • OES_copy_image extension could be enabled on Gen7.
  • Gen7 GPUs became conformant with the OpenGL 4.3 standard (148 conformance tests that were failing have passed).
  • Cubemaps and mipmaps of compressed formats could be copied and displayed properly.
  • glGetCompressedTexImage2D, glGetCompressedTextureSubImage2D, glCopyImageSubData and other GetCompressed* functions have the expected behavior.
Only automatically generated mipmaps are not supported for reasons explained in the post.

More...
VK_EXT_sample_locations (Intel Vulkan driver)

This extension allows an application to modify the locations of samples within a pixel used in rasterization. Additionally, it allows applications to specify different sample locations for each pixel in a group of adjacent pixels, which can increase antialiasing quality (particularly if a custom resolve shader is used that takes advantage of these different locations). I've implemented it for the anv Vulkan driver.

More...
GL_EXT_external objects, GL_EXT_external_objects_fd (various drivers)

EXT_external_objects(_fd) are groups of extensions that allow OpenGL and Vulkan interoperability. With them resources like textures and buffers (vertex, depth/stencil, pixel, and more) can be allocated by Vulkan, and then be used by both OpenGL and Vulkan in applications.

I started working on them while I was working for Igalia's graphics team but I continued the work as a hobby. I've implemented the EXT_external_objects group of extensions for the Intel iris driver (with the help of Intel developers: the support for combined depth stencil was implemented by Tapani Pälli, and I helped testing it), and I've extended the radeonsi (AMD) driver to support external buffers. I've also reviewed the i965 implementation.

The trickiest part was to test the extensions implementation as there weren't many examples available (especially for buffers) and there were no VK-GL-CTS conformance tests for them either. In order to debug the drivers, I've written a small Vulkan renderer inside piglit (an OpenGL drivers testing framework) and about a dozen piglit tests for different interoperability use cases using the renderer for the Vulkan parts and the GLUT-like Piglit functions to display the results, and the built-in Piglit callbacks to probe the final image's pixel colors. Testing the semaphore synchronization (required for synchronized access to the shared resources) was also tricky and I explain it in this blog post.

While writing the tests, I've written several blog posts about the different use cases I was testing, to explain the use of those extensions. I've also presented some of them in XDC 2020.

List of blog posts (11 of which are example use cases explained) can be found here in my blog.

More...
Compiling mesa3D stuff on FreeBSD

I've recently installed FreeBSD on my old T430 (IvyBridge GPU) and I am trying to make mesa, drm, i965, crocus, and anv compile and run there. I am also modifying other programs I am using for development (Vulkan loader and validation layers for example). So far I needed small changes as the hard (eg kernel) parts are fixed downstream by active FreeBSD developers, but there are some parts that I'd like to improve if I can. My goal is to be able to use a development environment similar to the one I have on Linux and to use the same OpenGL and Vulkan extensions I use on Linux.

WIP, current and future posts will appear here.
Tools and scripts, gists

Sometimes I write quick scripts and tools to ease the drivers development and debugging. I've written posts about some hacks I do in the graphics driver development category of my blog, but I've also stored some hacks in my gists (search for mesa or simply scroll down my list of public gists).

Some posts on hacks I've used during development:
Other contributions

I've been contributing to various "OpenGL and Vulkan ecosystem" projects, submitting features, and bug-fixes. Some of them are: mesa (i965, iris, crocus, radeonsi, radv), drm, piglit, VK-GL-CTS, Vulkan-Loader, Vulkan-ValidationLayers, and other tools.

You can find them on GitHub, and Freedesktop Gitlab.
Additions to vkrunner

vkrunner is a drivers debugging tool written in Vulkan that allows writing shader tests. While I was working at Igalia I've done some minor contributions to it that can be found in the following blog posts, but I was also using it as an offline shadertoy:







Ubuntu desktop highlights:

See also:
my blog posts on Ubuntu

Gliar (libgliar)

Libgliar is a library that can fake the OpenGL context information returned by most glGet methods. It can be used to fake the GPU capabilities when debugging OpenGL applications on Linux. More...
Compiz/Unity desktop: new moving windows modes

Added outline and rectangle mode in moving windows to increase performance. More...
Compiz/Unity: shadows for shaped windows

Implemented shaped shadows enabling windows of any shape to have shadows on Unity7 desktop.
Compiz/Unity: low graphics mode

Implemented a new low graphics mode for the Ubuntu desktop, where users could configure the visual effects and increase their desktop performance. Added new modes in settings and made easy to enable and disable the Low Graphics Mode dynamically from inside the desktop without logout.

More...
Articles on Unity 7 low graphics mode:
See also:
my blog posts on optimising Unity 7
Compiz: Tutorial plugin and blog posts

After China's decision to use Free/Open Source software compiled in China in every public service, Chinese developers from NUDT (National University of Defense and Technology in Changsha) wanted to modify Ubuntu's Unity-7 based desktop to adapt it to Chinese people's needs.

I've written some blog posts, and an example Compiz plugin to introduce them to the process of writing new features for the Ubuntu desktop, and help them with their training.

Posts:
Desktop maintenance/Bug fixes

During my last years in Canonical I was the sole Compiz developer and I was sporadically helping the Unity7 maintenance team. I've fixed several desktop bugs or bugs in Compiz effects.

I might refer to some big ones in posts of the Ubuntu category in my blog.
More...
Contributions to other Ubuntu DE projects

I've been also contributing to other Ubuntu desktop projects some of which (for example the Ubuntu phone) were never officially released despite them being open source. I've implemented features on nux (a graphics engine), compiz (a compositor window manager), unity (a desktop environment), mir (a window system), some desktop apps and the early (nux-based) ubuntu phone.

More...







Contributions to Stellarium:

3D graphics algorithms: Clouds and Bumps for Stellarium (a PC planetarium)

As part of the ESA Summer of Code in Space, I added shaders and multitexturing support on Stellarium (a planetarium for pc) and I used normal mapping and procedural clouds (Perlin noise) to improve the Stellarium planet rendering. (Linux, Windows, Mac OS X) More...
Blog posts:


Launchpad repository:
https://code.launchpad.net/~hikiko/stellarium/socisplanet







Contributions to Webkit:


I've been contributed to webkit for a very short period of time. My contributions were mostly bug fixes, but I've also investigated if and how we could implement some Igalia's plans related to the use of ANGLE. You can read more about them here. I believe my patches can still be found in WebKit's bugzilla.

Some blog posts about building and debugging ANGLE and WebKit, as well as some experiments I've performed to see if ANGLE and the system driver can be used together in a program, and exchange texture data without copying them can be found in the Graphics for WebKit category of my blog.

More...




Highlights from tasks at Igalia and Canonical:
Code for Igalia

Highlights from my work for Igalia and code I've written for fun while I was at Igalia. More...
Code for Canonical

Screenshots and videos from some graphics features I've added to the Ubuntu Desktop when I was working at Canonical. More...


Previous experience:
Other things I've done professionally can be found in my CV page.




A particle system

Various effects that use particle systems such as fire, smoke and sparkles were implemented as part of a MSc assignment using different types of primitives. The particles can change size and position with the mouse and the keyboard and they can have different colors and textures. The user can select the effect to display (fire, smoke or fireworks). Used C++, and OpenGL. More...

A CPU Path Tracer

A path tracer that can load complex scenes (with quad and triangle meshes) and perform global illumination using both area and point lights. Software rendering. (Linux, Windows, Mac OS X) More...

A CPU Ray Tracer

A ray tracer that can render spheres and sphereflakes. Software rendering. (Linux, Windows, Mac OS X) More...

A team project for the CAVE environment: Virtual Anatomy Class

A virtual course for the CAVE environment. Team project, XVR. (Windows) More...

Medical imaging and image processing MSc assignments.

Screenshots from my image processing and medical imaging assignments. Implementation of OCR using morphological operations, implementation of contours (snake), edge detection, and more...
Hierarchical body animation using trigonometric functions

A C++ simulation for my Computer Graphics MSc assignment (and also my first OpenGL program!). A varying number of robots made by transformed cubes walk in different directions without collisions. The robot parts are parts of a transformation hierarchy. Trigonometric functions are used for the animation. More...



Other:
  • Blog: If something is missing from here you might find it in my blog!
  • Blog category Hobby projects and hacks might be slightly more updated too.