Blog

Integrating DiffMerge with Git Bash

Here’s the configuration I use to get DiffMerge working with Git Bash.

DiffMerge should already be installed into its default directory (otherwise you will have to edit the shell files available below).

If it doesn’t already exist, create the file .gitconfig in C:/Users/<your username>/ and copy the following content:

Change the name to your name and the email to the email you use for your repository.

Next download and unzip these wrapper files into C:/Program Files/git/cmd/

And you should be good to go!

Machine Learning’s “Hello, World!”

My implementation of Machine Learning’s “Hello, World!” program, training a neural network to recognize hand-written digits from the MNIST (Modified National Institute of Standards and Technology) database. Built in Python using Tensorflow.

I followed the MNIST For ML Beginners tutorial.

In case you’re wondering, the script above is a Jupyter Notebook, hosted on GitHubGist

If you’re interested in Machine Learning, before you do anything else, I highly recommend watching these two videos from 3Blue1Brown.

I’m also keeping all my notes on Machine Learning in a shared Google doc, Implement Machine Learning.

Volumetric Sphere Shader

This is my implementation of Alan Zucconi’s tutorial on Volumetric Rendering.

This is a vertex and fragment shader.

An important observation I made is the order of declaring functions is important. A function must be declared before it can be called by another function.

I expanded on the tutorial by declaring Properties, making the center of the sphere and its size available from Unity’s inspector. This way I could play with values without updating the shader each time.

In the vertex function I get the world position of the vertex for use in the fragment function.

The fragment function is where most of the work in this shader happens.

Full listing:

Wavy Ocean Shader

Let me explain my Wavy Ocean Shader available from my Shader Gallery on GitHub.

This is a vertex and fragment shader.

The vertex function shifts the UV map along the x-axis in proportion to the sine of the y-axis plus time.

The fragment function just gets the color from the texture based on the new UV map coordinate.

Full listing: