mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-03 12:30:31 +00:00
renderPrePassMgr.cpp related: A) shifting .addFeature( MFT_XYZ); calls from ProcessedShaderMaterial::_determineFeatures to ProcessedPrePassMaterial::_determineFeatures B) mimicking the "// set the XXX if different" entries from RenderMeshMgr::render in RenderPrePassMgr::render C) fleshing out ProcessedPrePassMaterial::getNumStages() so that it shares a 1:1 correlation with ProcessedShaderMaterial::getNumStages() D) causing inline void Swizzle<T, mapLength>::ToBuffer( void *destination, const void *source, const dsize_t size ) to silently fail rather than fatally assert if a source or destination buffer is not yet ready to be filled. (support for #customTarget scripted render targets) Reflections: A) removing reflectRenderState.disableAdvancedLightingBins(true); entries. this would otherwise early out from prepass and provide no color data whatsoever. B) removing the fd.features.addFeature( MFT_ForwardShading ); entry forcing all materials to be forward lit when reflected. C) 2 things best described bluntly as working hacks: C1) when reflected, a scattersky is rotated PI along it's z then x axis in order to draw properly. C2) along similar lines, in terraincellmaterial, we shut off culling if it's a prepass material. Skies: scattersky is given a pair of rotations for reflection purposes, all sky objects are given a z value for depth testing.
49 lines
1.3 KiB
Text
49 lines
1.3 KiB
Text
//--- OBJECT WRITE BEGIN ---
|
|
$ThisPrefab = new SimGroup() {
|
|
canSave = "1";
|
|
canSaveDynamicFields = "1";
|
|
|
|
new ParticleEmitterNode() {
|
|
active = "1";
|
|
emitter = "FireEmitter";
|
|
velocity = "1";
|
|
dataBlock = "EmberNode";
|
|
position = "0 0 0";
|
|
rotation = "1 0 0 0";
|
|
scale = "1 1 1";
|
|
canSave = "1";
|
|
canSaveDynamicFields = "1";
|
|
};
|
|
new PointLight() {
|
|
radius = "10";
|
|
isEnabled = "1";
|
|
color = "1 0.603922 0 1";
|
|
brightness = "1";
|
|
castShadows = "1";
|
|
staticRefreshFreq = "250";
|
|
dynamicRefreshFreq = "8";
|
|
priority = "1";
|
|
animate = "1";
|
|
animationPeriod = "1";
|
|
animationPhase = "1";
|
|
flareScale = "1";
|
|
attenuationRatio = "0 1 1";
|
|
shadowType = "DualParaboloidSinglePass";
|
|
texSize = "512";
|
|
overDarkFactor = "2000 1000 500 100";
|
|
shadowDistance = "400";
|
|
shadowSoftness = "0.15";
|
|
numSplits = "1";
|
|
logWeight = "0.91";
|
|
fadeStartDistance = "0";
|
|
lastSplitTerrainOnly = "0";
|
|
representedInLightmap = "0";
|
|
shadowDarkenColor = "0 0 0 -1";
|
|
includeLightmappedGeometryInShadow = "0";
|
|
position = "0 0 0";
|
|
rotation = "1 0 0 0";
|
|
canSave = "1";
|
|
canSaveDynamicFields = "1";
|
|
};
|
|
};
|
|
//--- OBJECT WRITE END ---
|