Add resolveBoxVolumeRenderPaths function in advanced-rendering.js and advanced-rendering.ts
This commit is contained in:
@@ -1,5 +1,17 @@
|
||||
import { BasicShadowMap, DirectionalLight, HalfFloatType, Mesh, NoToneMapping, PCFShadowMap, PCFSoftShadowMap, PointLight, SpotLight, UnsignedByteType } from "three";
|
||||
import { BloomEffect, DepthOfFieldEffect, EffectComposer, EffectPass, RenderPass, SMAAEffect, SMAAPreset, SSAOEffect, ToneMappingEffect, ToneMappingMode } from "postprocessing";
|
||||
export function resolveBoxVolumeRenderPaths(settings) {
|
||||
if (!settings.enabled) {
|
||||
return {
|
||||
fog: "performance",
|
||||
water: "performance"
|
||||
};
|
||||
}
|
||||
return {
|
||||
fog: settings.fogPath,
|
||||
water: settings.waterPath
|
||||
};
|
||||
}
|
||||
export function getAdvancedRenderingShadowMapType(shadowType) {
|
||||
switch (shadowType) {
|
||||
case "basic":
|
||||
|
||||
@@ -30,10 +30,30 @@ import {
|
||||
|
||||
import type {
|
||||
AdvancedRenderingSettings,
|
||||
BoxVolumeRenderPath,
|
||||
AdvancedRenderingShadowType,
|
||||
AdvancedRenderingToneMappingMode
|
||||
} from "../document/world-settings";
|
||||
|
||||
export interface ResolvedBoxVolumeRenderPaths {
|
||||
fog: BoxVolumeRenderPath;
|
||||
water: BoxVolumeRenderPath;
|
||||
}
|
||||
|
||||
export function resolveBoxVolumeRenderPaths(settings: AdvancedRenderingSettings): ResolvedBoxVolumeRenderPaths {
|
||||
if (!settings.enabled) {
|
||||
return {
|
||||
fog: "performance",
|
||||
water: "performance"
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
fog: settings.fogPath,
|
||||
water: settings.waterPath
|
||||
};
|
||||
}
|
||||
|
||||
export function getAdvancedRenderingShadowMapType(shadowType: AdvancedRenderingShadowType) {
|
||||
switch (shadowType) {
|
||||
case "basic":
|
||||
|
||||
Reference in New Issue
Block a user