auto-git:
[change] src/rendering/precomputed-shader-sky-environment-cache.ts
This commit is contained in:
@@ -38,6 +38,7 @@ export interface PrecomputedShaderSkyEnvironmentCacheOptions {
|
|||||||
) => CachedEnvironmentBlendTexture;
|
) => CachedEnvironmentBlendTexture;
|
||||||
disposeBuildResources?: () => void;
|
disposeBuildResources?: () => void;
|
||||||
phaseBlendTextureResolver?: WorldEnvironmentBlendTextureResolver | null;
|
phaseBlendTextureResolver?: WorldEnvironmentBlendTextureResolver | null;
|
||||||
|
clearPhaseBlendTextureResolver?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
function createEmptyPhaseEntries(): ShaderSkyEnvironmentPhaseEntries {
|
function createEmptyPhaseEntries(): ShaderSkyEnvironmentPhaseEntries {
|
||||||
@@ -144,6 +145,7 @@ export class PrecomputedShaderSkyEnvironmentCache
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.options.clearPhaseBlendTextureResolver?.();
|
||||||
this.clear();
|
this.clear();
|
||||||
|
|
||||||
for (const phase of SHADER_SKY_PHASES) {
|
for (const phase of SHADER_SKY_PHASES) {
|
||||||
@@ -228,6 +230,9 @@ export function createRendererPrecomputedShaderSkyEnvironmentCache(
|
|||||||
disposeBuildResources: () => {
|
disposeBuildResources: () => {
|
||||||
builder.dispose();
|
builder.dispose();
|
||||||
},
|
},
|
||||||
phaseBlendTextureResolver: options.phaseBlendTextureResolver ?? null
|
phaseBlendTextureResolver: options.phaseBlendTextureResolver ?? null,
|
||||||
|
clearPhaseBlendTextureResolver: () => {
|
||||||
|
options.phaseBlendTextureResolver?.clear();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user