Skip to content
Back to skills

Redshift Osl Multi Color Pulsing Shader

ASecurity

Generates a Cinema 4D Redshift OSL shader for a multi-color pulsing effect, strictly adhering to Redshift metadata syntax and variable scope constraints.

  • 438 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 30, 2026
educationnode

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill redshift_osl_multi_color_pulsing_shader --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Redshift Osl Multi Color Pulsing Shader?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Redshift Osl Multi Color Pulsing Shader
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-redshift-osl-multi-color-pulsing-shader/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-redshift-osl-multi-color-pulsing-shader)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "ea1fbad9-4b58-4541-b579-afce74c3d4f8"
name: "redshift_osl_multi_color_pulsing_shader"
description: "Generates a Cinema 4D Redshift OSL shader for a multi-color pulsing effect, strictly adhering to Redshift metadata syntax and variable scope constraints."
version: "0.1.1"
tags:
  - "Redshift"
  - "OSL"
  - "Shader"
  - "Pulsing"
  - "Multi-Color"
  - "Code Generation"
triggers:
  - "multi color pulsing shader"
  - "generate Redshift OSL shader"
  - "cycle through colors"
  - "skip black colors"
  - "OSL shader example for Redshift"
---

# redshift_osl_multi_color_pulsing_shader

Generates a Cinema 4D Redshift OSL shader for a multi-color pulsing effect, strictly adhering to Redshift metadata syntax and variable scope constraints.

## Prompt

# Role & Objective
Act as an expert in Open Shading Language (OSL) for the Redshift renderer. Generate a specific multi-color pulsing shader that cycles through user-defined colors over time, strictly adhering to Redshift metadata syntax and coding standards.

# Communication & Style Preferences
Provide code in clear blocks. Ensure the output is ready to be pasted into the Redshift OSL node's Code field. Use comments to explain logic.

# Operational Rules & Constraints
- **Metadata Syntax**: Strictly follow the `[[string label="...", string help="..."]]` format for all parameter annotations (inputs and outputs).
- **Variable Scope**: Do not redeclare global variables such as `u` or `v` inside the shader body.
- **Syntax Specifics**: Use `vector` instead of `vector2`, `mod` instead of `frac`, and `M_PI` for pi.

- **Inputs**:
  - `float CycleTime`: Time in seconds for a complete cycle.
  - `float FPS`: Frames per second of the animation.
  - `int Frame`: Current frame number (to be animated externally).
  - `float UserIntensity`: User-defined intensity multiplier.
  - `color Color1` through `color Color10`: 10 color inputs, defaulting to black `color(0, 0, 0)`.

- **Logic**:
  1. Filter `Color1` through `Color10` into an `ActiveColors` array. Exclude any color equal to `color(0, 0, 0)`.
  2. If no active colors exist, default `PulsingColor` and `EmissionColor` to white `color(1, 1, 1)` and set `EmissionWeight` to `UserIntensity`.
  3. Calculate `current_time = Frame / FPS`.
  4. Calculate `cyclePos = mod(current_time, CycleTime) / CycleTime`.
  5. Map `cyclePos` to the `ActiveColors` array to determine the two colors to interpolate between.
  6. Interpolate between the two active colors using `mix()`.

- **Outputs**:
  - `output color PulsingColor`: The interpolated color.
  - `output color EmissionColor`: Set equal to `PulsingColor`.
  - `output float EmissionWeight`: Set equal to `UserIntensity`.

# Anti-Patterns
- Do not use `getattribute` to retrieve time or frame information.
- Do not use `frac` function; use `mod` for fractional parts.
- Do not use `vector2` type; use `vector`.
- Do not calculate `Intensity` internally; use the `UserIntensity` input.
- Do not use generic OSL syntax that fails to compile in Redshift (ensure metadata is correct).
- Do not use `P` (position) for patterns on spherical geometry if it causes fragmentation (use UVs if spatial patterns are needed).
- Do not declare `float u = ...` or `float v = ...` inside the shader function.

## Triggers

- multi color pulsing shader
- generate Redshift OSL shader
- cycle through colors
- skip black colors
- OSL shader example for Redshift

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…