mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-20 10:35:40 +02:00
Update previewEngine.ts
This commit is contained in:
@@ -256,17 +256,11 @@ export class RoomObjectPreviewEngine {
|
|||||||
if (mesh.material) {
|
if (mesh.material) {
|
||||||
if (mesh.material instanceof BABYLON.MultiMaterial) {
|
if (mesh.material instanceof BABYLON.MultiMaterial) {
|
||||||
for (const subMat of mesh.material.subMaterials) {
|
for (const subMat of mesh.material.subMaterials) {
|
||||||
if ((subMat as BABYLON.PBRMaterial).subSurface.isRefractionEnabled) {
|
|
||||||
(subMat as BABYLON.PBRMaterial).transparencyMode = BABYLON.PBRMaterial.PBRMATERIAL_ALPHABLEND;
|
|
||||||
}
|
|
||||||
(subMat as BABYLON.PBRMaterial).reflectionTexture = this.envMapIndoor;
|
(subMat as BABYLON.PBRMaterial).reflectionTexture = this.envMapIndoor;
|
||||||
(subMat as BABYLON.PBRMaterial).useGLTFLightFalloff = true; // Clustered Lightingではphysical falloffを持つマテリアルはアーチファクトが発生する https://doc.babylonjs.com/features/featuresDeepDive/lights/clusteredLighting/#materials-with-a-physical-falloff-may-cause-artefacts
|
(subMat as BABYLON.PBRMaterial).useGLTFLightFalloff = true; // Clustered Lightingではphysical falloffを持つマテリアルはアーチファクトが発生する https://doc.babylonjs.com/features/featuresDeepDive/lights/clusteredLighting/#materials-with-a-physical-falloff-may-cause-artefacts
|
||||||
(subMat as BABYLON.PBRMaterial).anisotropy.isEnabled = false; // なんかきれいにレンダリングされないため
|
(subMat as BABYLON.PBRMaterial).anisotropy.isEnabled = false; // なんかきれいにレンダリングされないため
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((mesh.material as BABYLON.PBRMaterial).subSurface.isRefractionEnabled) {
|
|
||||||
(mesh.material as BABYLON.PBRMaterial).transparencyMode = BABYLON.PBRMaterial.PBRMATERIAL_ALPHABLEND;
|
|
||||||
}
|
|
||||||
(mesh.material as BABYLON.PBRMaterial).reflectionTexture = this.envMapIndoor;
|
(mesh.material as BABYLON.PBRMaterial).reflectionTexture = this.envMapIndoor;
|
||||||
(mesh.material as BABYLON.PBRMaterial).useGLTFLightFalloff = true; // Clustered Lightingではphysical falloffを持つマテリアルはアーチファクトが発生する https://doc.babylonjs.com/features/featuresDeepDive/lights/clusteredLighting/#materials-with-a-physical-falloff-may-cause-artefacts
|
(mesh.material as BABYLON.PBRMaterial).useGLTFLightFalloff = true; // Clustered Lightingではphysical falloffを持つマテリアルはアーチファクトが発生する https://doc.babylonjs.com/features/featuresDeepDive/lights/clusteredLighting/#materials-with-a-physical-falloff-may-cause-artefacts
|
||||||
(mesh.material as BABYLON.PBRMaterial).anisotropy.isEnabled = false; // なんかきれいにレンダリングされないため
|
(mesh.material as BABYLON.PBRMaterial).anisotropy.isEnabled = false; // なんかきれいにレンダリングされないため
|
||||||
|
|||||||
Reference in New Issue
Block a user