Skip to content

Commit

Permalink
feat: loader add enableTransparentShadow (#2263)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuxudong authored Jul 24, 2024
1 parent 5f9709c commit d16d668
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/loader/src/SceneLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ class SceneLoader extends Loader<Scene> {
if (shadow.shadowResolution != undefined) scene.shadowResolution = shadow.shadowResolution;
if (shadow.shadowDistance != undefined) scene.shadowDistance = shadow.shadowDistance;
if (shadow.shadowCascades != undefined) scene.shadowCascades = shadow.shadowCascades;
if (shadow.enableTransparentShadow != undefined) {
scene.enableTransparentShadow = shadow.enableTransparentShadow;
}
scene.shadowTwoCascadeSplits = shadow.shadowTwoCascadeSplits ?? scene.shadowTwoCascadeSplits;
shadow.shadowFourCascadeSplits && scene.shadowFourCascadeSplits.copyFrom(shadow.shadowFourCascadeSplits);
scene.shadowFadeBorder = shadow.shadowFadeBorder ?? scene.shadowFadeBorder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export interface IScene extends IHierarchyFile {
};
shadow?: {
castShadows: boolean;
enableTransparentShadow: boolean;
shadowResolution: ShadowResolution;
shadowDistance: number;
shadowCascades: ShadowCascadesMode;
Expand Down

0 comments on commit d16d668

Please sign in to comment.