Skip to content

Paper texture 2.0 - #220

Open
uuuulala wants to merge 190 commits into
mainfrom
paper-texture-adjustments
Open

Paper texture 2.0#220
uuuulala wants to merge 190 commits into
mainfrom
paper-texture-adjustments

Conversation

@uuuulala

@uuuulala uuuulala commented Oct 31, 2025

Copy link
Copy Markdown
Member

Note

High Risk
Breaking public API and visual output for PaperTexture consumers; large shader change needs regression on image filter paths and presets. The unreferenced paper-texture---.ts scratch file should be confirmed intentional or removed before merge.

Overview
Paper Texture 2.0 replaces the previous paper effect with a new shader, public API, presets, and docs controls.

The color model moves from colorFront / colorBack + contrast to colorBack, colorPaper, and colorShadow, with image controls blending, distortion, and clip. Surface detail params change: crumpleCount (capped via exported paperTextureMeta.maxCrumpleCount), wrinkles / wrinkleSize, roughnessSize / roughnessRows, directional angle lighting, and per-axis folds foldSizeX/Y and foldOffsetX/Y. Removed uniforms include fade, crumpleSize, and foldCount.

The fragment shader is rewritten around relief lighting, new crumple/wrinkle/fold math, and updated image compositing (u_isImage). React PaperTexture maps the new props; deprecated aliases shrink to foldsNumbercrumpleCount (and fiberScale). Presets are now Default, Spread, Creased, and Flat (replacing Abstract, Cardboard, Details).

Docs Leva panel and paperTextureDef mirror the new parameter set.

Reviewed by Cursor Bugbot for commit 55a3ef1. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Oct 31, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
shaders-docs Ready Ready Preview Sep 1, 2026 3:17pm UTC

Request Review

Comment thread packages/shaders/src/shaders/paper-texture.ts Outdated
Comment thread packages/shaders/src/shaders/paper-texture.ts Outdated
Comment thread packages/shaders/src/shaders/paper-texture.ts Outdated
Comment thread packages/shaders/src/shaders/paper-texture.ts Outdated
Comment thread packages/shaders/src/shaders/paper-texture.ts Outdated
Comment thread packages/shaders/src/shaders/paper-texture.ts Outdated
Comment thread packages/shaders-react/src/shaders/paper-texture.tsx

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

There are 6 total unresolved issues (including 5 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 127f8e3. Configure here.

Comment thread packages/shaders/src/shaders/paper-texture.ts
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.

1 participant