auto-git:

[change] src/rendering/precomputed-shader-sky-environment-cache.ts
This commit is contained in:
2026-04-22 17:56:13 +02:00
parent d79ab40a29
commit 291b7ffd4f

View File

@@ -38,6 +38,7 @@ export interface PrecomputedShaderSkyEnvironmentCacheOptions {
) => CachedEnvironmentBlendTexture;
disposeBuildResources?: () => void;
phaseBlendTextureResolver?: WorldEnvironmentBlendTextureResolver | null;
clearPhaseBlendTextureResolver?: () => void;
}
function createEmptyPhaseEntries(): ShaderSkyEnvironmentPhaseEntries {
@@ -144,6 +145,7 @@ export class PrecomputedShaderSkyEnvironmentCache
return;
}
this.options.clearPhaseBlendTextureResolver?.();
this.clear();
for (const phase of SHADER_SKY_PHASES) {
@@ -228,6 +230,9 @@ export function createRendererPrecomputedShaderSkyEnvironmentCache(
disposeBuildResources: () => {
builder.dispose();
},
phaseBlendTextureResolver: options.phaseBlendTextureResolver ?? null
phaseBlendTextureResolver: options.phaseBlendTextureResolver ?? null,
clearPhaseBlendTextureResolver: () => {
options.phaseBlendTextureResolver?.clear();
}
});
}