Fix sampling textures in decals to use custom mip-level

#3599
This commit is contained in:
Wojtek Figat
2025-08-14 22:14:03 +02:00
parent cb92a2b8cb
commit bf9ca14deb
3 changed files with 72 additions and 12 deletions

View File

@@ -16,7 +16,7 @@
PACK_STRUCT(struct DecalMaterialShaderData {
Matrix WorldMatrix;
Matrix InvWorld;
Matrix SVPositionToWorld;
Matrix SvPositionToWorld;
});
DrawPass DecalMaterialShader::GetDrawModes() const
@@ -67,7 +67,7 @@ void DecalMaterialShader::Bind(BindParameters& params)
0, 0, 1, 0,
-1.0f, 1.0f, 0, 1);
const Matrix svPositionToWorld = offsetMatrix * view.IVP;
Matrix::Transpose(svPositionToWorld, materialData->SVPositionToWorld);
Matrix::Transpose(svPositionToWorld, materialData->SvPositionToWorld);
}
// Bind constants