Posts

Showing posts from December, 2022

Cool Textures

Image
I have been working hard to make neat textures using shaders. It's not easy! Getting nearby pixels to agree on their parameters can be tricky. I'm not here to complain though. Here are some cool pictures with commentary. It is easy to determine a pixel's column when all columns have the same width. But it becomes harder when columns are allowed to have different widths! For the image below, I require every pair of columns to sum to the same width. This constrains the problem-space enough to make a solution easy-enough.    Hexagon rendering was pretty involved. My solution was to create a voronoi diagram with carefully-selected points. Every pixel has three points that it checks when determining its closest point.    I wrote a function for including only ranges of values around a center point. This is used in the hexagon image above, and also in the brick image below.    I wrote several oscillator functions that mimic the interface of cosine, but that operat...