<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Fragment Shack</title><link>https://fragmentshack.com/</link><description>Recent content on Fragment Shack</description><image><title>Fragment Shack</title><url>https://fragmentshack.com/images/og-image.png</url><link>https://fragmentshack.com/images/og-image.png</link></image><generator>Hugo</generator><language>en-GB</language><lastBuildDate>Sun, 22 Nov 2026 12:50:00 +0000</lastBuildDate><atom:link href="https://fragmentshack.com/index.xml" rel="self" type="application/rss+xml"/><item><title>🎯 Rays and Intersections: Does This Line Hit That Shape?</title><link>https://fragmentshack.com/posts/rays-intersections/</link><pubDate>Sun, 22 Nov 2026 12:50:00 +0000</pubDate><guid>https://fragmentshack.com/posts/rays-intersections/</guid><description>A ray is a starting point and a direction. Asking where it hits something powers mouse picking, bullets, shadows and ray tracing. Build a ray-circle test from what you already know, then trace a tiny picture.</description></item><item><title>🎚️ Interpolation: Lerp, Smoothstep and Easing</title><link>https://fragmentshack.com/posts/interpolation-lerp-smoothstep/</link><pubDate>Sun, 22 Nov 2026 12:40:00 +0000</pubDate><guid>https://fragmentshack.com/posts/interpolation-lerp-smoothstep/</guid><description>Blending smoothly from one value to another is everywhere in graphics: colours, positions, textures, animation. Meet lerp, its reverse, remapping, smoothstep and easing curves.</description></item><item><title>〰️ Angles, Sine and Cosine: Going Round in Circles</title><link>https://fragmentshack.com/posts/sine-cosine-angles/</link><pubDate>Sun, 22 Nov 2026 12:30:00 +0000</pubDate><guid>https://fragmentshack.com/posts/sine-cosine-angles/</guid><description>Sine and cosine are just the x and y of a point going round a circle. That simple idea gives you rotation, smooth waves, orbits and animation. Spin the point and shape a wave.</description></item><item><title>✖️ The Cross Product: Finding the Direction at Right Angles</title><link>https://fragmentshack.com/posts/cross-product/</link><pubDate>Sun, 22 Nov 2026 12:20:00 +0000</pubDate><guid>https://fragmentshack.com/posts/cross-product/</guid><description>Give the cross product two directions and it hands back a third, at right angles to both. It&amp;rsquo;s how graphics finds which way a triangle faces, which side of a line a point is on, and how cameras get their axes.</description></item><item><title>⚫ The Dot Product: How Much Do Two Directions Agree?</title><link>https://fragmentshack.com/posts/dot-product/</link><pubDate>Sun, 22 Nov 2026 12:10:00 +0000</pubDate><guid>https://fragmentshack.com/posts/dot-product/</guid><description>One tiny calculation, three multiplications and two additions, answers &amp;lsquo;do these point the same way?&amp;rsquo;. It&amp;rsquo;s behind lighting, field-of-view checks and much more. Drag two arrows and see.</description></item><item><title>🧭 Coordinates and Vectors: Arrows That Describe Space</title><link>https://fragmentshack.com/posts/vectors-coordinates/</link><pubDate>Sun, 22 Nov 2026 12:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/vectors-coordinates/</guid><description>Nearly every number in graphics is a position or a direction. Learn what coordinates and vectors are, and how to add, subtract, scale and measure them, by dragging arrows around.</description></item><item><title>👻 Helper Pixels: The Hidden Cost of ddx and ddy</title><link>https://fragmentshack.com/posts/helper-pixels-ddx-ddy/</link><pubDate>Sun, 22 Nov 2026 09:20:00 +0000</pubDate><guid>https://fragmentshack.com/posts/helper-pixels-ddx-ddy/</guid><description>The rules for using ddx and ddy safely, and helper pixels: the extra, invisible fragment shader runs that 2×2 groups need. See them on your own GPU.</description></item><item><title>💎 Flat Shading with ddx and ddy: Normals from Nowhere</title><link>https://fragmentshack.com/posts/flat-shading-ddx-ddy/</link><pubDate>Sun, 22 Nov 2026 09:15:00 +0000</pubDate><guid>https://fragmentshack.com/posts/flat-shading-ddx-ddy/</guid><description>Build each triangle&amp;rsquo;s normal in the fragment shader from ddx and ddy of its position: a faceted, low-poly look with no extra mesh data. Plus more uses for derivatives.</description></item><item><title>🧰 Using ddx and ddy: Mipmaps and Smooth Edges</title><link>https://fragmentshack.com/posts/ddx-ddy-mipmaps-fwidth/</link><pubDate>Sun, 22 Nov 2026 09:10:00 +0000</pubDate><guid>https://fragmentshack.com/posts/ddx-ddy-mipmaps-fwidth/</guid><description>The two uses of ddx and ddy you&amp;rsquo;ll meet most: choosing a texture&amp;rsquo;s mipmap level, and smooth edges at any zoom with fwidth. With live WebGL demos.</description></item><item><title>📐 ddx and ddy Explained: Shader Derivatives, Pixel by Pixel</title><link>https://fragmentshack.com/posts/ddx-ddy-shader-derivatives-explained/</link><pubDate>Sun, 22 Nov 2026 09:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/ddx-ddy-shader-derivatives-explained/</guid><description>What ddx and ddy (dFdx and dFdy in GLSL) tell a shader, and how the graphics card works them out by comparing neighbouring pixels in 2×2 groups, with interactive WebGL demos.</description></item><item><title>Privacy Policy</title><link>https://fragmentshack.com/privacy/</link><pubDate>Sun, 22 Nov 2026 00:00:00 +0000</pubDate><guid>https://fragmentshack.com/privacy/</guid><description>What Fragment Shack stores, what it doesn&amp;#39;t, and your rights. In short: no cookies, no accounts, no adverts and no tracking.</description></item><item><title>🖌️ Overdraw: The Cost of Painting the Same Pixel Twice</title><link>https://fragmentshack.com/posts/overdraw-early-depth/</link><pubDate>Sat, 21 Nov 2026 10:20:00 +0000</pubDate><guid>https://fragmentshack.com/posts/overdraw-early-depth/</guid><description>In a busy scene, many pixels get shaded several times before the final colour wins. See a heat map of how often each pixel&amp;rsquo;s shader runs, and how draw order and a depth pre-pass cut the waste.</description></item><item><title>🪚 Anti-Aliasing: SSAA, MSAA and FXAA Compared</title><link>https://fragmentshack.com/posts/anti-aliasing-msaa-fxaa/</link><pubDate>Sat, 21 Nov 2026 10:10:00 +0000</pubDate><guid>https://fragmentshack.com/posts/anti-aliasing-msaa-fxaa/</guid><description>Why edges look like staircases, and the three classic fixes: draw more pixels (SSAA), test more points but shade once (MSAA), or blur the edges afterwards (FXAA). Compare them on your own GPU.</description></item><item><title>⚙️ How GPUs Run Shaders: Lockstep, Divergence and Hiding Latency</title><link>https://fragmentshack.com/posts/gpu-shader-execution/</link><pubDate>Sat, 21 Nov 2026 10:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/gpu-shader-execution/</guid><description>A graphics card runs shaders in groups of 32 or 64 that all execute the same instruction at once. See what that means for if statements, and how GPUs hide slow memory by juggling groups.</description></item><item><title>🌀 Ray Marching: Drawing 3D Worlds with Distance Functions</title><link>https://fragmentshack.com/posts/sdf-ray-marching/</link><pubDate>Sat, 21 Nov 2026 09:35:00 +0000</pubDate><guid>https://fragmentshack.com/posts/sdf-ray-marching/</guid><description>With a 3D distance function, a fragment shader can draw a whole scene without a single triangle: march a ray from each pixel, jumping as far as the distance allows. Watch the jumps, then explore a live scene. Part 4 of the signed distance fields series.</description></item><item><title>🔤 SDF Text: Crisp Letters from Tiny Textures</title><link>https://fragmentshack.com/posts/sdf-text/</link><pubDate>Sat, 21 Nov 2026 09:30:00 +0000</pubDate><guid>https://fragmentshack.com/posts/sdf-text/</guid><description>Store the distance to a letter&amp;rsquo;s edge in a texture instead of the letter itself, and it stays razor sharp when magnified, with outlines, glows and bold text for free. Part 3 of the signed distance fields series.</description></item><item><title>🫠 Combining SDFs: Unions, Smooth Blends and Bending Space</title><link>https://fragmentshack.com/posts/sdf-combining-shapes/</link><pubDate>Sat, 21 Nov 2026 09:25:00 +0000</pubDate><guid>https://fragmentshack.com/posts/sdf-combining-shapes/</guid><description>Two lines of maths join, cut and melt shapes together, and a few more repeat, mirror and twist them, endlessly, for free. Part 2 of the signed distance fields series.</description></item><item><title>🔵 Signed Distance Fields: Shapes Made of Distances</title><link>https://fragmentshack.com/posts/signed-distance-fields/</link><pubDate>Sat, 21 Nov 2026 09:20:00 +0000</pubDate><guid>https://fragmentshack.com/posts/signed-distance-fields/</guid><description>Describe a shape by how far every point is from its edge, and you get crisp edges at any size, easy outlines and much more. See how circles, boxes, lines and polygons are written as distance functions.</description></item><item><title>🌑 Shadow Mapping: Seeing the Scene from the Light</title><link>https://fragmentshack.com/posts/shadow-mapping/</link><pubDate>Sat, 21 Nov 2026 09:10:00 +0000</pubDate><guid>https://fragmentshack.com/posts/shadow-mapping/</guid><description>How games draw shadows: render the scene&amp;rsquo;s depth from the light&amp;rsquo;s point of view, then check every pixel against it. See the shadow map itself, and the acne, jaggies and blur that come with it.</description></item><item><title>🧱 Normal Mapping: Detail Without Triangles</title><link>https://fragmentshack.com/posts/normal-mapping/</link><pubDate>Sat, 21 Nov 2026 09:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/normal-mapping/</guid><description>A flat square can look like a bumpy brick wall if each pixel lies about which way it faces. See how normal maps store those directions, and why they&amp;rsquo;re always blue.</description></item><item><title>☀️ HDR, Tone Mapping and Bloom: Making Bright Things Look Bright</title><link>https://fragmentshack.com/posts/hdr-tone-mapping-bloom/</link><pubDate>Fri, 20 Nov 2026 10:30:00 +0000</pubDate><guid>https://fragmentshack.com/posts/hdr-tone-mapping-bloom/</guid><description>Real light ranges from starlight to the sun, but a screen only goes from 0 to 1. See how games keep the full range, squeeze it onto the screen with tone mapping, and fake glare with bloom.</description></item><item><title>🌫️ Blur and Convolution: Post-Processing with Kernels</title><link>https://fragmentshack.com/posts/blur-convolution/</link><pubDate>Fri, 20 Nov 2026 10:20:00 +0000</pubDate><guid>https://fragmentshack.com/posts/blur-convolution/</guid><description>Blur, sharpen, edge detection and emboss are all the same trick: a weighted sum of neighbouring pixels. Edit a kernel live, then see why games blur in two passes instead of one.</description></item><item><title>🫧 Alpha Blending: Why Transparency Is Hard</title><link>https://fragmentshack.com/posts/alpha-blending-transparency/</link><pubDate>Fri, 20 Nov 2026 10:10:00 +0000</pubDate><guid>https://fragmentshack.com/posts/alpha-blending-transparency/</guid><description>How the graphics card mixes a see-through surface with what&amp;rsquo;s behind it, the blend modes games use, and why transparent objects must be drawn in the right order.</description></item><item><title>🖼️ Render Targets: Drawing into Textures</title><link>https://fragmentshack.com/posts/render-targets/</link><pubDate>Fri, 20 Nov 2026 10:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/render-targets/</guid><description>The graphics card doesn&amp;rsquo;t have to draw to the screen. Draw into a texture instead, and you get security cameras, mirrors, shadows and every post-processing effect in modern games.</description></item><item><title>🌗 sRGB and Gamma: Why 50% Grey Isn’t Half as Bright</title><link>https://fragmentshack.com/posts/srgb-gamma/</link><pubDate>Fri, 20 Nov 2026 09:40:00 +0000</pubDate><guid>https://fragmentshack.com/posts/srgb-gamma/</guid><description>The numbers in an image aren&amp;rsquo;t amounts of light. Find the grey that really is half as bright, then see what goes wrong when blending and lighting ignore it.</description></item><item><title>🛤️ Anisotropic Filtering: Sharp Textures at Steep Angles</title><link>https://fragmentshack.com/posts/anisotropic-filtering/</link><pubDate>Fri, 20 Nov 2026 09:30:00 +0000</pubDate><guid>https://fragmentshack.com/posts/anisotropic-filtering/</guid><description>Trilinear filtering turns floors and roads seen at a low angle into blur. Anisotropic filtering fixes it by sampling along the pixel&amp;rsquo;s stretched footprint. Compare them side by side.</description></item><item><title>🪆 Mipmaps and Trilinear Filtering: Stopping Distant Textures from Shimmering</title><link>https://fragmentshack.com/posts/mipmaps-trilinear-filtering/</link><pubDate>Fri, 20 Nov 2026 09:20:00 +0000</pubDate><guid>https://fragmentshack.com/posts/mipmaps-trilinear-filtering/</guid><description>Distant textures sparkle and swirl because each pixel covers many texels. Mipmaps fix it with pre-shrunk copies of the texture. Build a mip chain, then drive over a floor with and without one.</description></item><item><title>🔍 Texture Filtering: Nearest and Bilinear</title><link>https://fragmentshack.com/posts/texture-filtering-nearest-bilinear/</link><pubDate>Fri, 20 Nov 2026 09:10:00 +0000</pubDate><guid>https://fragmentshack.com/posts/texture-filtering-nearest-bilinear/</guid><description>A pixel&amp;rsquo;s UV almost never lands exactly on a texel. Nearest filtering picks one; bilinear blends four. Zoom into a tiny texture and see exactly which texels are mixed, and by how much.</description></item><item><title>🧵 Textures and UV Coordinates: Wrapping Images onto Shapes</title><link>https://fragmentshack.com/posts/textures-uv-coordinates/</link><pubDate>Fri, 20 Nov 2026 09:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/textures-uv-coordinates/</guid><description>How a flat image gets wrapped onto a 3D surface. Drag a shape&amp;rsquo;s UV coordinates around a texture, and see what happens when they go past the edge.</description></item><item><title>💡 Basic Lighting: Ambient, Diffuse and Specular</title><link>https://fragmentshack.com/posts/basic-lighting/</link><pubDate>Thu, 19 Nov 2026 10:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/basic-lighting/</guid><description>How a shader fakes light with three simple terms: ambient, diffuse and specular. Learn Lambert&amp;rsquo;s cosine law, the Blinn-Phong highlight, and why lighting per pixel beats lighting per vertex.</description></item><item><title>🗂️ The Depth Buffer: Deciding What’s in Front</title><link>https://fragmentshack.com/posts/depth-buffer/</link><pubDate>Wed, 18 Nov 2026 10:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/depth-buffer/</guid><description>When two surfaces cover the same pixel, the depth buffer decides which one you see. Watch it work, look inside it, and find out why distant surfaces flicker through each other.</description></item><item><title>🎨 Fragment Shaders: Colouring Every Pixel</title><link>https://fragmentshack.com/posts/fragment-shaders-interpolation/</link><pubDate>Tue, 17 Nov 2026 10:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/fragment-shaders-interpolation/</guid><description>How values are blended smoothly across a triangle, how a fragment shader turns them into a colour, and why perspective needs special care. Includes a live fragment shader editor.</description></item><item><title>🔳 Rasterisation: Which Pixels Does a Triangle Cover?</title><link>https://fragmentshack.com/posts/rasterisation/</link><pubDate>Mon, 16 Nov 2026 10:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/rasterisation/</guid><description>How the graphics card decides which pixels a triangle covers, using three simple edge tests per pixel, and how it makes sure triangles that share an edge never overlap or leave gaps.</description></item><item><title>🧮 Matrix Conventions: Rows, Columns, Handedness and Depth</title><link>https://fragmentshack.com/posts/matrix-conventions/</link><pubDate>Sun, 15 Nov 2026 10:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/matrix-conventions/</guid><description>Row or column vectors? Row-major or column-major memory? Left- or right-handed? Depth from 0 or −1? Untangle the conventions that trip up everyone, and see which combinations really work.</description></item><item><title>📍 Vertex Shaders: A Tiny Program for Every Corner</title><link>https://fragmentshack.com/posts/vertex-shaders/</link><pubDate>Sat, 14 Nov 2026 10:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/vertex-shaders/</guid><description>The vertex shader runs once for every vertex, placing it on screen and passing data along. Edit one live: make waves, twist shapes and see exactly what it can and can&amp;rsquo;t do.</description></item><item><title>🎥 Cameras: How the View and Projection Matrices Work</title><link>https://fragmentshack.com/posts/cameras-view-projection/</link><pubDate>Fri, 13 Nov 2026 10:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/cameras-view-projection/</guid><description>A game camera is just two matrices. See how the view matrix moves the world, how field of view, near and far shape the frustum, and how perspective differs from orthographic.</description></item><item><title>🌍 Coordinate Spaces: The Journey from Model to Screen</title><link>https://fragmentshack.com/posts/coordinate-spaces-transform-chain/</link><pubDate>Thu, 12 Nov 2026 10:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/coordinate-spaces-transform-chain/</guid><description>Every vertex travels through local, world, view, clip and screen space on its way to a pixel. Watch a whole scene morph through each space, and follow one point&amp;rsquo;s coordinates.</description></item><item><title>🔄 Transformation Matrices: Moving, Rotating and Scaling with Grids of Numbers</title><link>https://fragmentshack.com/posts/transformation-matrices/</link><pubDate>Wed, 11 Nov 2026 10:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/transformation-matrices/</guid><description>How a small grid of numbers can move, turn, stretch and mirror a whole mesh at once, why its columns tell you where the axes go, and why the order you combine them in matters.</description></item><item><title>🔺 Vertices, Triangles and Meshes: The Shapes Games Are Made Of</title><link>https://fragmentshack.com/posts/vertices-triangles-meshes/</link><pubDate>Tue, 10 Nov 2026 10:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/vertices-triangles-meshes/</guid><description>Why every 3D object is built from triangles, what a vertex stores, how index buffers save memory, and how the order of a triangle&amp;rsquo;s corners decides which side is the front.</description></item><item><title>🏭 The Graphics Pipeline: How Triangles Become Pixels</title><link>https://fragmentshack.com/posts/graphics-pipeline/</link><pubDate>Mon, 09 Nov 2026 10:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/graphics-pipeline/</guid><description>The six steps every graphics card follows to turn a list of triangles into a finished image. Step through each one, then count how often each shader really runs.</description></item><item><title>🟥 Pixels and Colour: What Your Screen Is Really Showing</title><link>https://fragmentshack.com/posts/pixels-and-colour/</link><pubDate>Sun, 08 Nov 2026 10:00:00 +0000</pubDate><guid>https://fragmentshack.com/posts/pixels-and-colour/</guid><description>Every image on your screen is a grid of coloured squares made from red, green and blue light. Zoom into one, mix colours, and see where the image lives in memory.</description></item><item><title>Welcome to Fragment Shack</title><link>https://fragmentshack.com/welcome/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://fragmentshack.com/welcome/</guid><description>What Fragment Shack is, who it&amp;#39;s for, and how to get the most out of it.</description></item></channel></rss>