publicclassUMetaLodConst{// the bounding volume of the targetpublicconststringFactor_Bounds="Bounds";// currently corresponds to vertex count of the target mesh, would be 0 for particle systempublicconststringFactor_GeomComplexity="GeomComplexity";// currently correspends to particle count of the target particle system, would be 0 for ordinary meshpublicconststringFactor_PSysComplexity="PSysComplexity";// a subjective factor which reveals the visual importance of the target in some degrees// for instance, skill effects casted by player would generally has a // pretty much higher visual impact than a static stone on the groundpublicconststringFactor_VisualImpact="VisualImpact";}
这些影响因子还可以设置不同的 Normalizer 去归一化传进来的值
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
publicdelegatefloatfnFactorNormalize(floatvalue,floatupper,floatlower);...publicstructUImpactFactor{...// customized Normalizer for different Impact Factor publicfnFactorNormalizeNormalizer;}...// use methods like InverseLerp() to transform the parameter value into a valid FOI Normalizer=(value,upper,lower)=>{returnUMetaLodUtil.Percent(lower,upper,value);}
publicstaticclassUMetaLodConfig{// the time interval of an update (could be done discretedly)publicstaticfloatUpdateInterval=0.5f;// the time interval of an FPS update (could be done discretedly)publicstaticfloatFPSUpdateInterval=5.0f;// debug option (would output debugging strings to lod target if enabled)publicstaticboolEnableDebuggingOutput=false;// performance level (target platform horsepower indication)publicstaticUPerfLevelPerformanceLevel=UPerfLevel.Medium;// performance level magnifierpublicstaticDictionary<UPerfLevel,float>PerfLevelScaleLut=newDictionary<UPerfLevel,float>{{UPerfLevel.Highend,0.2f},{UPerfLevel.Medium,0.0f},{UPerfLevel.Lowend,-0.2f},};// heat attenuation parameters overriding (including the formula)publicstaticfloatDistInnerBound=80.0f;publicstaticfloatDistOuterBound=180.0f;publicstaticfloatFpsLowerBound=15.0f;publicstaticfloatFpsStandard=30.0f;publicstaticfloatFpsUpperBound=60.0f;publicstaticfloatFpsMinifyFactor=-0.2f;publicstaticfloatFpsMagnifyFactor=0.2f;publicstaticfnHeatAttenuateHeatAttenuationFormula=UMetaLodDefaults.HeatAttenuation;}