mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
fix csm effect error at metal v3.6.0 (#11931)
This commit is contained in:
committed by
GitHub
parent
32c99d1ca3
commit
efada734d6
@@ -100,9 +100,9 @@ void ShadowStage::render(scene::Camera *camera) {
|
||||
_renderArea.height = static_cast<uint32_t>(shadowMapSize.y);
|
||||
} else {
|
||||
const gfx::Device *device = gfx::Device::getInstance();
|
||||
const float clipSpaceSignY = device->getCapabilities().clipSpaceSignY;
|
||||
const float screenSpaceSignY = device->getCapabilities().screenSpaceSignY;
|
||||
_renderArea.x = static_cast<int>(static_cast<float>(_level % 2) * 0.5F * shadowMapSize.x);
|
||||
if (clipSpaceSignY > 0.0F) {
|
||||
if (screenSpaceSignY > 0.0F) {
|
||||
_renderArea.y = static_cast<int>((1 - floorf(static_cast<float>(_level) / 2)) * 0.5F * shadowMapSize.y);
|
||||
} else {
|
||||
_renderArea.y = static_cast<int>((floorf(static_cast<float>(_level) / 2)) * 0.5F * shadowMapSize.y);
|
||||
|
||||
Reference in New Issue
Block a user