Skip to content

Commit

Permalink
Changed hash
Browse files Browse the repository at this point in the history
  • Loading branch information
GengineJS committed Sep 12, 2024
1 parent 965462b commit 6aeafbe
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cocos/rendering/custom/scene-culling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { CSMLevel, Camera, DirectionalLight, Light, LightType, Model, PointLight
ReflectionProbe, SKYBOX_FLAG, ShadowType, Shadows, SphereLight, SpotLight } from '../../render-scene/scene';
import { Layers, Node } from '../../scene-graph';
import { PipelineSceneData } from '../pipeline-scene-data';
import { getSubpassOrPassID, bool, AlignUp, SetLightUBO } from './define';
import { getSubpassOrPassID, bool, AlignUp, SetLightUBO, hashCombineKey } from './define';
import { LayoutGraphData } from './layout-graph';
import { CullingFlags, RenderGraph, RenderGraphValue, SceneData, RenderQueue as RenderQueue0 } from './render-graph';
import { SceneFlags } from './types';
Expand Down Expand Up @@ -47,13 +47,13 @@ function computeCullingKey (
const lightLevel = sceneData.light.level;
const reflectProbe = sceneData.light.probe!;
const shadeLight = sceneData.shadingLight;
cullingKeys += `${camera ? objectID(camera) : 0}-`;
cullingKeys += `${reflectProbe ? objectID(reflectProbe) : 0}-`;
cullingKeys += `${(refId === -1 && light) ? objectID(light) : 0}-`;
cullingKeys += `${(refId !== -1 && shadeLight) ? objectID(shadeLight) : 0}-`;
cullingKeys += `${refId === -1 ? lightLevel : 0}-`;
cullingKeys += `${castShadows ? 1 : 0}-`;
cullingKeys += `${refId}`;
cullingKeys += hashCombineKey(camera ? objectID(camera) : 0);
cullingKeys += hashCombineKey(reflectProbe ? objectID(reflectProbe) : 0);
cullingKeys += hashCombineKey((refId === -1 && light) ? objectID(light) : 0);
cullingKeys += hashCombineKey((refId !== -1 && shadeLight) ? objectID(shadeLight) : 0);
cullingKeys += hashCombineKey(refId === -1 ? lightLevel : 0);
cullingKeys += hashCombineKey(castShadows ? 1 : 0);
cullingKeys += hashCombineKey(refId);
return cullingKeys;
}

Expand Down

0 comments on commit 6aeafbe

Please sign in to comment.