<aside>

On this page:

</aside>

<aside>

Expanse Docs

đź§  Product Docs

🤖 Prompting Tips

LLM Directory

Prompting Tips & Tricks

Prompt Library

đź’» Use Cases

For Work

For Fun

📚 Resources

Prompt Engineering Resources

🍄 About Expanse

Meet the team

</aside>

What is GLSL?

If you’ve ever wondered how video games or movies create those jaw-dropping effects—like glowing lights or swirling colors—meet GLSL. It’s a coding language that talks to your computer’s graphics chip (the GPU) to make real-time visuals happen fast. Think of it like a paintbrush for digital artists, but one that works at lightning speed.

<aside> đź’ˇ

GLSL powers everything from game effects to data maps (like weather visuals). You don’t need to code to enjoy it—just copy, paste, and play around. Whether you use Shadertoy or Expanse, you’ll be creating in no time.

</aside>

GLSL isn’t just for pros—you can try it too, no fancy setup needed! You can play with it online using a site called Shadertoy or even use an AI chat tool like Expanse to generate GLSL code. On Shadertoy, you type a few lines, hit play, and watch the magic unfold. With Expanse, you can ask it to write GLSL for you—perfect if you’re new to coding.

Try It Yourself

Head to Shadertoy and paste one of the examples below. Or, chat with Expanse —set up a Role or use the Prompts below to generate GLSL code—then copy it to Shadertoy to see it in action.

Example Output 1: Spiral Graphics

capture.webm

<aside> đź’ˇ

On the Shadertoy site, paste the GLSL code into the code box then hit the little play button on the bottom left of the code box

image.png

Code

</aside>

https://share.expanse.com/thread/Z0XEZ3

Example Output 2: Real-time Heatmap Generator

heatmap.webm

<aside>

Code

</aside>

Expanse Role for GLSL

Expanse’s Roles are like built-in Prompts that stick with your chat. Here’s one you can set up to make GLSL generation a breeze:

You are an GLSL expert. When I ask for visuals, generate concise GLSL fragment shader code compatible with Shadertoy. Focus on creative, functional output with clear effects—swirls, grids, pulses, etc. Include brief comments explaining key parts. Always format the code ready to copy-paste.

Add this Role in Expanse’s settings, and every chat will automatically tailor responses for GLSL fun, with no need to repeat instructions!

Creative Prompts for Expanse

Copy and paste the results from Expanse into Shadertoy, and tweak to your desire! Here are some Prompts you cant try with your GLSL Role in Expanse:

Write GLSL for a spinning galaxy with twinkling stars.
Create GLSL code for a rippling water surface with blue and green hues.
Generate GLSL that makes a glowing grid pulsing to a beat.

Cool example

Here’s a cool view of a fractal made by Inigo Quilez. This is almost certainly fully manually created by Inigo before AI was available, but you could use this as inspiration for your own art. Thanks to AI, you may be able to create some awesome images even if you don’t have Inigo’s awesome coding skills! Click on the link if you want to see the animation, all credit for this work goes to Inigo.

https://www.shadertoy.com/embed/lsX3W4?gui=true&t=10&paused=true&muted=false

Conclusion

We have only scratched the surface of GLSL in this post. Some of our results are almost comically off-target from our prompts! This post is here to inspire you, if you want to get better results then dive straight in and try it for yourself.


What’s Hot for GLSL on X?

People on X chat about AI models for generating GLSL. Here’s a quick take based on recent buzz:

AI Model GLSL Buzz on X
GPT-4 (OpenAI) Loved for detailed code, but verbose.
Grok (xAI) Fast and creative—a fan favorite!
Claude (Anthropic) Precise, but less flashy output.
Gemini (Google) Mixed reviews—good, but sanitized.

Didn’t find what you were looking for?

**Expanse.com**