Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CSM Shader broken #386

Open
Ctrlmonster opened this issue Nov 12, 2024 · 0 comments
Open

CSM Shader broken #386

Ctrlmonster opened this issue Nov 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Ctrlmonster
Copy link

  • three version: 0.170.0
  • @types/three version: 0.170.0
  • three-stdlib version: 2.34.0

Problem description:

Creating the CSM fails with the following error: Can not resolve #include <lights_pars_begin>
The original library broke with three 157, see issue and PR, but isn't receiving updates anymore from what it looks like. Would be nice to have a working version in here, not sure if these fixes apply in the same way (original library errors in a different way).

Relevant code:

const csm = new CSM({
            maxFar: camera.far,
            cascades: 4,
            shadowMapSize: 1024,
            lightDirection: new Vector3(0, -1, 0).normalize(),
            camera: camera,
            parent: scene
});

const material = new THREE.MeshStandardMaterial(); // works with Phong and Standard materials
csm.setupMaterial(material); // must be called to pass all CSM-related uniforms to the shader
@Ctrlmonster Ctrlmonster added the bug Something isn't working label Nov 12, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant