An open API service indexing awesome lists of open source software.

https://github.com/emackey/slang-playground-samples

A collection of samples for the Slang Playground
https://github.com/emackey/slang-playground-samples

Last synced: 4 months ago
JSON representation

A collection of samples for the Slang Playground

Awesome Lists containing this project

README

          

# Slang Playground Examples

This is an unofficial collection of assorted samples written in the [Slang Shading Language](https://shader-slang.org/) that are intended to run directly in the [Slang Playground](https://shader-slang.org/slang-playground/).

If you open this repository with [VSCode](https://code.visualstudio.com/), install the [Slang Extension](https://marketplace.visualstudio.com/items?itemName=shader-slang.slang-language-extension) to run and interact with these samples directly in your editor, even while offline.

## Samples

### Alan's Abstract "Art"

You have to click and drag the mouse all around before this one really gets going.

[![screenshot](Samples/AlsAbstractArt.png)](Samples/AlsAbstractArt.slang)

### Alan's Sandbox

Sand, Air, Plant, Fire, and Water, in a sandbox. Sand and water fall in air. Sand sinks in water. Plants grow in water. Fire burns plants. Paint your scene with the mouse.

[![screenshot](Samples/AlsSandbox.png)](Samples/AlsSandbox.slang)

### IQ's Better Voronoi Edges

The amazing Inigo Quilez demonstrates (originally on Shadertoy) how to calculate Voronoi cells without degenerate edges, by calculating the edge distance.

[![screenshot](Samples/BetterVoronoiEdges.png)](Samples/BetterVoronoiEdges.slang)

### Doomed City

Defend your city. Time for some panicked clicking! And explosions.

[![screenshot](Samples/DoomedCity.png)](Samples/DoomedCity.slang)

### IQ's Filtering Procedurals

Inigo Quilez demonstrates (originally on Shadertoy) a method for filtering of procedurally-generated textures.

[![screenshot](Samples/FilteringProcedurals.png)](Samples/FilteringProcedurals.slang)

### Holiday Gifts

Don't open until the holidays.

[![screenshot](Samples/HolidayGifts.png)](Samples/HolidayGifts.slang)

### Life with Trails

Conway's Game of Life, implemented in Slang, with adjustable trail and decay colors. Click and drag to place more life.

[![screenshot](Samples/LifeWithTrails.png)](Samples/LifeWithTrails.slang)

### Mini City

Just a few lines of shader code get you a whole city!

[![screenshot](Samples/MiniCity.png)](Samples/MiniCity.slang)

### Spirals

Lines swirl around while being drawn.

[![screenshot](Samples/Spirals.png)](Samples/Spirals.slang)

### Wiggle Rings

Some kinda funky fun shader with the wiggles.

[![screenshot](Samples/WiggleRings.png)](Samples/WiggleRings.slang)