playcanvas / playcanvas/engine

"Cast Shadow" with PCF3x3 fails to render dynamically generated mesh correctly

Open
#4,211 4 comments 0 reactions 1 assignee View on GitHub

@mvaligursky is already working on this.

Since Apr 25, 2022.

area: graphics
Dominant language
JavaScript
Stars
16.8k
Forks
2k
Avg merge
4h 9m
Merged PRs (30d)
218

Description

Posting bug report as instructed from PlayCanvas forum: https://forum.playcanvas.com/t/light-shadow-bug/25343

Use of lights with "Cast Shadow" checked, and using PCF 3x3 shadow map breaks rendering of dynamically generated meshes in Windows/Android +(Firefox). Works fine on iOS (iPad Air).

Test project URL: https://playcanvas.com/editor/project/916295

Steps to Reproduce
  1. Check if both lights have "Cast Shadow" checkbox checked and one uses PCF 3x3 and other one has PCF 5x5.
  2. When 5x5 is used, mesh is visible as expected, when 3x3 is used, texture alpha is respected but color is black.
  3. Lightsources can be toggled by clicking the "Switch lightsource" option and console logs active lightsource.

Screen grabs:
9d2f44bf67adae1db701b8bbfb6b563d9c9323d4_2_592x750
2378768da89abadcc9349abeebdfbef202af64bf_2_640x750

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.