Skip to content

Conversation

@marklundin
Copy link
Collaborator

Many examples load a model which require 'requestSceneColorMap' which is throwing the following error.

A uSceneColorMap texture is used by the shader but a scene color texture is not available. Use CameraComponent.requestSceneColorMap / enable Color Grabpass on the Camera Component to enable it. Rendering [Pass:RenderPassForward RT:WebglFramebuffer | Camera: camera, Layer: World(TRANSP) | Node: Object_32, Material: material_5

This PR updates the those examples with <Camera requestSceneColorMap={true] /> which prevents that error.

@marklundin marklundin requested a review from Copilot September 19, 2025 12:22
@marklundin marklundin self-assigned this Sep 19, 2025
@marklundin marklundin added bug Something isn't working documentation Improvements or additions to documentation labels Sep 19, 2025
@changeset-bot
Copy link

changeset-bot bot commented Sep 19, 2025

⚠️ No Changeset found

Latest commit: 115f7f0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@marklundin marklundin requested a review from a team September 19, 2025 12:22
Copy link
Contributor

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 fixes shader errors in example files by adding the renderSceneColorMap property to Camera components. The examples were failing because they load models requiring scene color mapping but weren't configured to provide it.

  • Added renderSceneColorMap={true} to Camera components across multiple example files
  • Prevents shader errors related to missing uSceneColorMap texture
  • Ensures examples function correctly when loading models that require scene color mapping

Reviewed Changes

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

File Description
packages/docs/templates/HomePageExample.jsx Added renderSceneColorMap prop to Camera component
packages/docs/content/examples/scripting.mdx Added renderSceneColorMap prop to Camera component
packages/docs/content/examples/model-viewer.mdx Added renderSceneColorMap prop to Camera component
packages/docs/content/examples/environment.mdx Added renderSceneColorMap prop to Camera component

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 19, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@playcanvas/blocks@249
npm i https://pkg.pr.new/@playcanvas/react@249

commit: 115f7f0

@marklundin marklundin merged commit 1145905 into main Sep 19, 2025
6 checks passed
@marklundin marklundin deleted the fix-request-grab branch September 19, 2025 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants