Skip to content

我来告诉你为什么threejs的阴影用透视相机没有出现正确效果 #1

@qq2956218657

Description

@qq2956218657

camera4SM = new THREE.PerspectiveCamera(45, width / height, 10, 1000)//new THREE.OrthographicCamera(-100, 100, 100, -100, 1, 170);
camera4SM.position.set(40, 40, 40);
camera4SM.lookAt(bufferScene.position);
camera4SM.aspect = width / height;

float visibility = (shadowCoord.z > depth + 0.005) ? 0.0 : 1.0;

这样就有效果了.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions