Skip to content

Conversation

hxrshxz
Copy link
Contributor

@hxrshxz hxrshxz commented Oct 18, 2025

Resolves #8160

Changes:

This PR adds support for noiseDetail() in p5.strands by exposing noise parameters to shaders via uniforms.

Screenshots of the change:

PR Checklist

@Copilot Copilot AI review requested due to automatic review settings October 18, 2025 20:14
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for noiseDetail() in p5.strands by exposing noise parameters (octaves and amplitude falloff) from the CPU-side noise implementation to shader uniforms. This allows WebGL strand rendering to respect user-specified noise detail settings.

Key changes:

  • Added getter methods to retrieve current noise octaves and amplitude falloff values
  • Modified noise shader to use uniform values for octaves and amplitude falloff instead of hardcoded values
  • Updated strands API to register noise parameter uniforms when noise is used

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/webgl/shaders/functions/noise3DGLSL.glsl Modified shader loop to support variable octaves and amplitude falloff via uniforms
src/strands/strands_api.js Added logic to register noise parameter uniforms when noise is called in strands context
src/math/noise.js Added private getter methods to expose noise parameters for shader use

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@hxrshxz hxrshxz force-pushed the dev-2.0-noiseDetail branch from 89d82e6 to eb3448c Compare October 19, 2025 10:46
@hxrshxz hxrshxz closed this Oct 19, 2025
@hxrshxz hxrshxz reopened this Oct 19, 2025
@hxrshxz hxrshxz requested a review from davepagurek October 19, 2025 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants