Skip to content

Enhance image sampled blocks to be more translucent and glass-like - #471

Merged
ford442 merged 1 commit into
mainfrom
feat/glass-like-sampled-blocks-8655165164921342192
Aug 5, 2026
Merged

Enhance image sampled blocks to be more translucent and glass-like#471
ford442 merged 1 commit into
mainfrom
feat/glass-like-sampled-blocks-8655165164921342192

Conversation

@ford442

@ford442 ford442 commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Improved the "JUICE" of the image sampled blocks by enhancing their glass-like visual properties.

  • Lowered base glass opacity (authoredGlassMin from 0.30/0.38 to 0.15, authoredGlassMax from 0.78 to 0.70).
  • Added an environment refraction calculation to the useAuthoredSampling block shader path to simulate realistic glass light bending.

PR created automatically by Jules for task 8655165164921342192 started by @ford442

Summary by CodeRabbit

  • New Features

    • Added environment-based glass refraction with tinted blending for more realistic glass rendering.
  • Improvements

    • Reduced glass opacity ranges for block and image-based materials, creating a clearer appearance.
    • Refreshed the video asset manifest timestamp.

Lowered the `authoredGlassMin` and `authoredGlassMax` values in both
`blockTexture.ts` and `materials.ts` to make the inner part of image sampled
blocks more translucent, allowing the background to show through clearly.
Additionally, updated the fragment shader (`fragmentMain.wgsl`) to simulate actual
glass refraction on the `useAuthoredSampling` path, providing a high-quality glass
effect similar to the PBR shader path.

Co-authored-by: ford442 <9397845+ford442@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 811db696-fac0-4ae0-8214-bb157b92dfec

📥 Commits

Reviewing files that changed from the base of the PR and between c1b0e63 and 9a7fe65.

📒 Files selected for processing (5)
  • patch_wgsl.js
  • public/assets/video/manifest.json
  • src/webgpu/blockTexture.ts
  • src/webgpu/materials.ts
  • src/webgpu/shaders/wgsl/block/fragmentMain.wgsl

📝 Walkthrough

Walkthrough

The change deletes the WGSL patch script, lowers authored glass opacity ranges, adds tinted environment refraction to the block shader, and updates the video manifest build timestamp.

Changes

Authored glass rendering

Layer / File(s) Summary
Glass opacity inputs
src/webgpu/blockTexture.ts, src/webgpu/materials.ts
Block textures and the imageSampled material now use authored glass opacity bounds of 0.150.70.
Glass refraction shader path
src/webgpu/shaders/wgsl/block/fragmentMain.wgsl, patch_wgsl.js
The shader samples the procedural environment along a refracted direction, applies glass tint, and blends the result using glassMask. The shader patch script was deleted.

Asset metadata

Layer / File(s) Summary
Video manifest timestamp
public/assets/video/manifest.json
The builtAt timestamp is updated to August 5, 2026.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: cursoragent, claude

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/glass-like-sampled-blocks-8655165164921342192

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ford442
ford442 marked this pull request as ready for review August 5, 2026 16:03
@ford442
ford442 merged commit 539b932 into main Aug 5, 2026
3 checks passed
@ford442
ford442 deleted the feat/glass-like-sampled-blocks-8655165164921342192 branch August 5, 2026 16:03
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