chatgpt-4o-latest-20250326· OpenAI
LMArena Human Preference 140K
please make a shadertoy shader that displays a red spiral that slow forms at the cursors…
- User
please make a shadertoy shader that displays a red spiral that slow forms at the cursors position every 5 seconds
- Assistant
Sure! Here's a Shadertoy GLSL shader that creates a red spiral slowly forming at the cursor's position every 5 seconds.
Paste this into Shadertoy and it will work as expected:
glsl// Shader by ChatGPT // Description: // - Displays a red spiral // - Every 5 seconds, the spiral reinitializes to slowly form at the cursor's position void mainImage(out vec4 fragColor, in vec2 fragCoord) { vec2 uv = fragCoord.xy / iResolution.xy; vec2 centerUV = iMouse.xy / iResolution.xy; // If mouse not clicked, use center of screen if(iMouse.z <= 0.0) { centerUV = vec2(0.5); } // Convert to coordinate space [-1, 1] with aspect ratio correction vec2 pos = (fragCoord.xy - iResolution.xy * centerUV.xy) / iResolution.y; // Time since last spiral reset (every 5 secs) float t = mod(iTime, 5.0); // Generate polar coordinates float r = length(pos); float a = atan(pos.y, pos.x); // Spiral parameters float spiralRate = 2.0; // How tightly the spiral curls float growthSpeed = 0.2; // How fast it grows outward float spiralArm = a + r * spiralRate; // Animate the spiral expanding float spiralProgress = t * growthSpeed; // Create a smooth line float spiralLine = sin(spiralRate * log(r + 0.01) + t * 2.0); // Fade and sharpness float intensity = smoothstep(0.01, 0.0, abs(spiralLine)) * smoothstep(spiralProgress + 0.01, spiralProgress, r); vec3 color = vec3(0.0); color.r = intensity; fragColor = vec4(color, 1.0); }
✅ Features:
- A spiral slowly drawing outward from the cursor location.
- The spiral resets every 5 seconds to start forming again.
- Uses
iMouseinput (cursor position). - If no mouse is clicked/touched, defaults to the center of the screen.
ℹ️ Optional Tips:
- You can customize the
spiralRateandgrowthSpeedto create interesting variations. - Add
iTime + offsetif you want to desync multiple spirals.
Let me know if you want multiple spirals or rainbow coloring, etc!
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.