fix csm ubo data in custom pipeline (#15502)

This commit is contained in:
troublemaker52025
2023-06-21 11:46:20 +08:00
committed by GitHub
parent 3bb0abd274
commit 34e6f8900a
8 changed files with 72 additions and 35 deletions
@@ -183,7 +183,7 @@ void setCameraUBOValues(
setVec4Impl(data, layoutGraph, "cc_surfaceTransform",
Vec4(
static_cast<float>(camera.getSurfaceTransform()),
0.0F,
static_cast<float>(camera.getCameraUsage()),
cosf(static_cast<float>(mathutils::toRadian(skybox.getRotationAngle()))),
sinf(static_cast<float>(mathutils::toRadian(skybox.getRotationAngle())))));
setVec4Impl(data, layoutGraph, "cc_screenScale",
@@ -1165,8 +1165,8 @@ float getPCFRadius(
return 1.0F / (shadowMapSize * 0.5F);
case scene::PCFType::SOFT_2X:
return 2.0F / (shadowMapSize * 0.5F);
// case PCFType.SOFT_4X:
// return 3.0F / (shadowMapSize * 0.5F);
case scene::PCFType::SOFT_4X:
return 3.0F / (shadowMapSize * 0.5F);
default:
break;
}