Added ability to pass ints to post effect shader consts

Reorg'd probe init to flow better and be more robust on load
Cleaned up various parts of the probe render manager to be more stable
Fixed issue with crash on release due to numProbe in loops being 0
Updated glsl probe array shader
Beginning of rework of editor settings
Beginning of conversion of asset import config to similar system as editor settings
This commit is contained in:
Areloch 2019-06-13 00:37:12 -05:00
parent b40d33a663
commit dd3422b5a2
21 changed files with 300 additions and 420 deletions

View file

@ -89,7 +89,11 @@ ImplementEnumType(ReflectionModeEnum,
//-----------------------------------------------------------------------------
// Object setup and teardown
//-----------------------------------------------------------------------------
ReflectionProbe::ReflectionProbe()
ReflectionProbe::ReflectionProbe() :
cubeDescId(0),
reflectorDesc(nullptr),
mSphereVertCount(0),
mSpherePrimitiveCount(0)
{
// Flag this object so that it will always
// be sent across the network to clients
@ -247,11 +251,11 @@ bool ReflectionProbe::_setReflectionMode(void *object, const char *index, const
{
ReflectionProbe* probe = reinterpret_cast<ReflectionProbe*>(object);
if (data == "Static Cubemap")
if (!dStrcmp(data,"Static Cubemap"))
{
probe->mReflectionModeType = StaticCubemap;
}
else if (data == "Baked Cubemap")
else if (!dStrcmp(data, "Baked Cubemap"))
{
//Clear our cubemap if we changed it to be baked, just for cleanliness
probe->mReflectionModeType = BakedCubemap;
@ -589,6 +593,8 @@ void ReflectionProbe::processDynamicCubemap()
else
mProbeInfo->mIsEnabled = false;
mCubemapDirty = false;
//Update the probe manager with our new texture!
//if (!mProbeInfo->mIsSkylight && mProbeInfo->mPrefilterCubemap->isInitialized() && mProbeInfo->mIrradianceCubemap->isInitialized())
// PROBEMGR->updateProbeTexture(mProbeInfo->mProbeIdx);
@ -637,8 +643,10 @@ void ReflectionProbe::processBakedCubemap()
{
mProbeInfo->mIsEnabled = true;
mCubemapDirty = false;
//Update the probe manager with our new texture!
PROBEMGR->updateProbeTexture(mProbeInfo->mProbeIdx);
PROBEMGR->updateProbeTexture(mProbeInfo);
}
}
@ -728,8 +736,10 @@ void ReflectionProbe::processStaticCubemap()
{
mProbeInfo->mIsEnabled = true;
mCubemapDirty = false;
//Update the probe manager with our new texture!
PROBEMGR->updateProbeTexture(mProbeInfo->mProbeIdx);
PROBEMGR->updateProbeTexture(mProbeInfo);
}
}

View file

@ -151,9 +151,6 @@ protected:
U32 mDynamicLastBakeMS;
U32 mRefreshRateMS;
GBitmap* mCubeFaceBitmaps[6];
U32 mCubemapResolution;
F32 mMaxDrawDistance;
bool mResourcesCreated;

View file

@ -26,7 +26,7 @@
#include "gfx/D3D11/gfxD3D11EnumTranslate.h"
#include "gfx/bitmap/imageUtils.h"
GFXD3D11Cubemap::GFXD3D11Cubemap() : mTexture(NULL), mSRView(NULL), mDSView(NULL)
GFXD3D11Cubemap::GFXD3D11Cubemap() : mTexture(NULL), mSRView(NULL), mDSView(NULL), mTexSize(0)
{
mDynamic = false;
mAutoGenMips = false;
@ -568,4 +568,4 @@ void GFXD3D11CubemapArray::zombify()
void GFXD3D11CubemapArray::resurrect()
{
// Static cubemaps are handled by D3D
}
}

View file

@ -541,4 +541,4 @@ MaterialParameters* ProcessedCustomMaterial::allocMaterialParameters()
}
}
return ret;
}
}

View file

@ -1360,7 +1360,7 @@ void ProcessedShaderMaterial::setSceneInfo(SceneRenderState * state, const Scene
LIGHTMGR->setLightInfo(this, mMaterial, sgData, state, pass, shaderConsts);
PROBEMGR->setProbeInfo(this, mMaterial, sgData, state, pass, shaderConsts);
//PROBEMGR->setProbeInfo(this, mMaterial, sgData, state, pass, shaderConsts);
}
void ProcessedShaderMaterial::setBuffers( GFXVertexBufferHandleBase *vertBuffer, GFXPrimitiveBufferHandle *primBuffer )

View file

@ -183,6 +183,16 @@ void PostEffect::EffectConst::set(const F32 &newVal)
mValueType = FloatType;
}
void PostEffect::EffectConst::set(const int& newVal)
{
if (mIntVal == newVal)
return;
mIntVal = newVal;
mDirty = true;
mValueType = IntType;
}
void PostEffect::EffectConst::set(const Point4F &newVal)
{
if (mPointVal == newVal)
@ -326,6 +336,21 @@ void PostEffect::EffectConst::setToBuffer( GFXShaderConstBufferRef buff )
const char* err = avar("PostEffect::EffectConst::setToBuffer $s type is not implemented", mName.c_str());
Con::errorf(err);
GFXAssertFatal(0, err);
#endif
}
}
else if (mValueType == IntType)
{
if (type == GFXSCT_Int)
{
buff->set(mHandle, mIntVal);
}
else
{
#if TORQUE_DEBUG
const char* err = avar("PostEffect::EffectConst::setToBuffer $s type is not implemented", mName.c_str());
Con::errorf(err);
GFXAssertFatal(0, err);
#endif
}
}
@ -1676,6 +1701,20 @@ void PostEffect::setShaderConst(const String &name, const F32 &val)
iter->value->set(val);
}
void PostEffect::setShaderConst(const String& name, const int& val)
{
PROFILE_SCOPE(PostEffect_SetShaderConst_Float);
EffectConstTable::Iterator iter = mEffectConsts.find(name);
if (iter == mEffectConsts.end())
{
EffectConst* newConst = new EffectConst(name, val);
iter = mEffectConsts.insertUnique(name, newConst);
}
iter->value->set(val);
}
void PostEffect::setShaderConst(const String &name, const Point4F &val)
{
PROFILE_SCOPE(PostEffect_SetShaderConst_Point);

View file

@ -230,6 +230,14 @@ protected:
set(val);
}
EffectConst(const String& name, const int& val)
: mName(name),
mHandle(NULL),
mDirty(true)
{
set(val);
}
EffectConst(const String &name, const Point4F &val)
: mName(name),
mHandle(NULL),
@ -264,6 +272,7 @@ protected:
void set( const String &newVal );
void set(const F32 &newVal);
void set(const int& newVal);
void set(const Point4F &newVal);
void set(const MatrixF &newVal);
void set(const Vector<Point4F> &newVal);
@ -277,6 +286,7 @@ protected:
String mStringVal;
S32 mIntVal;
F32 mFloatVal;
Point4F mPointVal;
MatrixF mMatrixVal;
@ -287,6 +297,7 @@ protected:
enum
{
StringType,
IntType,
FloatType,
PointType,
MatrixType,
@ -427,6 +438,7 @@ public:
///
void setShaderConst( const String &name, const String &val );
void setShaderConst(const String &name, const F32 &val);
void setShaderConst(const String& name, const int& val);
void setShaderConst(const String &name, const Point4F &val);
void setShaderConst(const String &name, const MatrixF &val);
void setShaderConst(const String &name, const Vector<Point4F> &val);

View file

@ -87,7 +87,8 @@ ProbeRenderInst::ProbeRenderInst() :
mAtten(0.0),
mCubemapIndex(0),
mIsSkylight(false),
mProbeIdx(0)
mProbeIdx(0),
mProbeShapeType(Box)
{
}
@ -132,7 +133,8 @@ ProbeShaderConstants::ProbeShaderConstants()
mBRDFTextureMap(NULL),
mSkylightSpecularMap(NULL),
mSkylightIrradMap(NULL),
mHasSkylight(NULL)
mHasSkylight(NULL),
mWorldToObjArraySC(NULL)
{
}
@ -202,7 +204,10 @@ RenderProbeMgr::RenderProbeMgr()
mLastShader(nullptr),
mLastConstants(nullptr),
mProbesDirty(false),
mHasSkylight(false)
mHasSkylight(false),
mSkylightCubemapIdx(-1),
mCubeMapCount(0),
mDefaultSkyLight(nullptr)
{
mEffectiveProbeCount = 0;
mMipCount = 0;
@ -376,7 +381,7 @@ void RenderProbeMgr::unregisterProbe(U32 probeIdx)
mRegisteredProbes.erase(probeIdx);
//rebuild our probe data
_setupStaticParameters();
mProbesDirty = true;
}
//
@ -409,7 +414,7 @@ void RenderProbeMgr::_setupStaticParameters()
U32 probeCount = mRegisteredProbes.size();
mEffectiveProbeCount = 0;
mMipCount = 0;
mMipCount = 1;
mHasSkylight = false;
mSkylightCubemapIdx = -1;
@ -429,11 +434,7 @@ void RenderProbeMgr::_setupStaticParameters()
probeWorldToObjData.fill(MatrixF::Identity);
probeBBMinData.fill(Point4F::Zero);
probeBBMaxData.fill(Point4F::Zero);
probeConfigData.fill(Point4F::Zero);
Vector<U32> cubemapIdxes;
mMipCount = 1;
probeConfigData.fill(Point4F(-1,0,0,0));
for (U32 i = 0; i < probeCount; i++)
{
@ -444,13 +445,12 @@ void RenderProbeMgr::_setupStaticParameters()
if (!curEntry.mIsEnabled)
continue;
U32 mips = mRegisteredProbes[0].mPrefilterCubemap.getPointer()->getMipMapLevels();
mMipCount = mips != 0 && mips > mMipCount ? mips : 0;
U32 mips = mRegisteredProbes[i].mPrefilterCubemap.getPointer()->getMipMapLevels();
mMipCount = mips != 0 && mips >= mMipCount ? mips : 0;
if (curEntry.mProbeShapeType == ProbeRenderInst::ProbeShapeType::Skylight || curEntry.mIsSkylight)
if (curEntry.mIsSkylight)
{
mSkylightCubemapIdx = curEntry.mCubemapIndex;
mHasSkylight = true;
continue;
}
@ -471,25 +471,32 @@ void RenderProbeMgr::_setupStaticParameters()
curEntry.mAtten,
curEntry.mCubemapIndex);
cubemapIdxes.push_back(i);
mEffectiveProbeCount++;
}
mProbesDirty = false;
}
void RenderProbeMgr::updateProbeTexture(U32 probeIdx)
void RenderProbeMgr::updateProbeTexture(ProbeRenderInst* probeInfo)
{
if (probeIdx >= mRegisteredProbes.size())
if (probeInfo->mIrradianceCubemap.isNull() || !probeInfo->mIrradianceCubemap->isInitialized())
{
Con::errorf("RenderProbeMgr::updateProbeTexture() - tried to update a probe's texture with an invalid or uninitialized irradiance map!");
return;
}
const U32 cubeIndex = mRegisteredProbes[probeIdx].mCubemapIndex;
mIrradianceArray->updateTexture(mRegisteredProbes[probeIdx].mIrradianceCubemap, cubeIndex);
mPrefilterArray->updateTexture(mRegisteredProbes[probeIdx].mPrefilterCubemap, cubeIndex);
if (probeInfo->mPrefilterCubemap.isNull() || !probeInfo->mPrefilterCubemap->isInitialized())
{
Con::errorf("RenderProbeMgr::updateProbeTexture() - tried to update a probe's texture with an invalid or uninitialized specular map!");
return;
}
Con::warnf("UpdatedProbeTexture - probeIdx: %u on cubeIndex %u, Irrad validity: %d, Prefilter validity: %d", probeIdx, cubeIndex,
mRegisteredProbes[probeIdx].mIrradianceCubemap->isInitialized(), mRegisteredProbes[probeIdx].mPrefilterCubemap->isInitialized());
const U32 cubeIndex = probeInfo->mCubemapIndex;
mIrradianceArray->updateTexture(probeInfo->mIrradianceCubemap, cubeIndex);
mPrefilterArray->updateTexture(probeInfo->mPrefilterCubemap, cubeIndex);
Con::warnf("UpdatedProbeTexture - probeIdx: %u on cubeIndex %u, Irrad validity: %d, Prefilter validity: %d", probeInfo->mProbeIdx, cubeIndex,
probeInfo->mIrradianceCubemap->isInitialized(), probeInfo->mPrefilterCubemap->isInitialized());
}
void RenderProbeMgr::_setupPerFrameParameters(const SceneRenderState *state)
@ -669,7 +676,7 @@ void RenderProbeMgr::_update4ProbeConsts(const SceneData &sgData,
if (curEntry.mIsSkylight)
{
if (curEntry.mPrefilterCubemap.isValid() && curEntry.mPrefilterCubemap.isValid())
if (curEntry.mPrefilterCubemap->isInitialized() && curEntry.mIrradianceCubemap->isInitialized())
{
GFX->setCubeTexture(probeShaderConsts->mSkylightSpecularMap->getSamplerRegister(), curEntry.mPrefilterCubemap);
GFX->setCubeTexture(probeShaderConsts->mSkylightIrradMap->getSamplerRegister(), curEntry.mIrradianceCubemap);
@ -739,7 +746,7 @@ void RenderProbeMgr::render( SceneRenderState *state )
_setupStaticParameters();
// Early out if nothing to draw.
if (!RenderProbeMgr::smRenderReflectionProbes || !state->isDiffusePass() || (mRegisteredProbes.size() == 0 || (mEffectiveProbeCount == 0 && !mHasSkylight)))
if (!RenderProbeMgr::smRenderReflectionProbes || !state->isDiffusePass() || (mEffectiveProbeCount == 0 && mSkylightCubemapIdx == -1))
{
getProbeArrayEffect()->setSkip(true);
return;
@ -765,23 +772,24 @@ void RenderProbeMgr::render( SceneRenderState *state )
String useDebugContrib = Con::getVariable("$Probes::showProbeContrib", "0");
mProbeArrayEffect->setShaderMacro("DEBUGVIZ_CONTRIB", useDebugContrib);
if(mHasSkylight && mEffectiveProbeCount == 0)
mProbeArrayEffect->setShaderMacro("SKYLIGHT_ONLY", "1");
if (mHasSkylight || mEffectiveProbeCount != 0)
{
mProbeArrayEffect->setTexture(3, mBRDFTexture);
mProbeArrayEffect->setCubemapArrayTexture(4, mPrefilterArray);
mProbeArrayEffect->setCubemapArrayTexture(5, mIrradianceArray);
}
mProbeArrayEffect->setTexture(3, mBRDFTexture);
mProbeArrayEffect->setCubemapArrayTexture(4, mPrefilterArray);
mProbeArrayEffect->setCubemapArrayTexture(5, mIrradianceArray);
mProbeArrayEffect->setShaderConst("$hasSkylight", (float)mHasSkylight);
if (mHasSkylight)
{
mProbeArrayEffect->setShaderConst("$skylightCubemapIdx", mSkylightCubemapIdx);
}
mProbeArrayEffect->setShaderConst("$numProbes", (float)mEffectiveProbeCount);
mProbeArrayEffect->setShaderConst("$numProbes", (S32)mEffectiveProbeCount);
mProbeArrayEffect->setShaderConst("$skylightCubemapIdx", mSkylightCubemapIdx);
mProbeArrayEffect->setShaderConst("$cubeMips", (float)mMipCount);
//also set up some colors
Vector<Point4F> contribColors;
contribColors.setSize(MAXPROBECOUNT);
if (mEffectiveProbeCount != 0)
{
if (useDebugContrib == String("1"))
@ -789,11 +797,6 @@ void RenderProbeMgr::render( SceneRenderState *state )
MRandomLCG RandomGen;
RandomGen.setSeed(mEffectiveProbeCount);
//also set up some colors
Vector<Point4F> contribColors;
contribColors.setSize(MAXPROBECOUNT);
for (U32 i = 0; i < mEffectiveProbeCount; i++)
{
//we're going to cheat here a little for consistent debugging behavior. The first 3 probes will always have R G and then B for their colors, every other will be random
@ -806,18 +809,18 @@ void RenderProbeMgr::render( SceneRenderState *state )
else
contribColors[i] = Point4F(RandomGen.randF(0, 1), RandomGen.randF(0, 1), RandomGen.randF(0, 1), 1);
}
mProbeArrayEffect->setShaderConst("$probeContribColors", contribColors);
}
mProbeArrayEffect->setShaderConst("$inProbePosArray", probePositionsData);
mProbeArrayEffect->setShaderConst("$inRefPosArray", probeRefPositionsData);
mProbeArrayEffect->setShaderConst("$worldToObjArray", probeWorldToObjData);
mProbeArrayEffect->setShaderConst("$bbMinArray", probeBBMinData);
mProbeArrayEffect->setShaderConst("$bbMaxArray", probeBBMaxData);
mProbeArrayEffect->setShaderConst("$probeConfigData", probeConfigData);
}
mProbeArrayEffect->setShaderConst("$probeContribColors", contribColors);
mProbeArrayEffect->setShaderConst("$inProbePosArray", probePositionsData);
mProbeArrayEffect->setShaderConst("$inRefPosArray", probeRefPositionsData);
mProbeArrayEffect->setShaderConst("$worldToObjArray", probeWorldToObjData);
mProbeArrayEffect->setShaderConst("$bbMinArray", probeBBMinData);
mProbeArrayEffect->setShaderConst("$bbMaxArray", probeBBMaxData);
mProbeArrayEffect->setShaderConst("$probeConfigData", probeConfigData);
// Make sure the effect is gonna render.
getProbeArrayEffect()->setSkip(false);

View file

@ -292,7 +292,7 @@ public:
U32 pass,
GFXShaderConstBuffer *shaderConsts);
void updateProbeTexture(U32 probeIdx);
void updateProbeTexture(ProbeRenderInst* probeInfo);
/// Debug rendering
static bool smRenderReflectionProbes;

View file

@ -709,4 +709,4 @@ DefineEngineMethod(Settings, clearGroups, void, (), , "settingObj.clearGroups();
DefineEngineMethod(Settings, getCurrentGroups, const char*, (), , "settingObj.getCurrentGroups();")
{
return object->getCurrentGroups();
}
}

View file

@ -322,8 +322,6 @@ singleton ShaderData( PFX_ReflectionProbeArray )
samplerNames[3] = "$BRDFTexture";
samplerNames[4] = "$specularCubemapAR";
samplerNames[5] = "$irradianceCubemapAR";
samplerNames[6] = "$skylightSpecularMap";
samplerNames[7] = "$skylightIrradMap";
pixVersion = 2.0;
};
@ -345,7 +343,6 @@ singleton GFXStateBlockData( PFX_ReflectionProbeArrayStateBlock )
zEnable = false;
zWriteEnable = false;
samplersDefined = true;
samplerStates[0] = SamplerClampPoint;
samplerStates[1] = SamplerClampPoint;
@ -353,6 +350,4 @@ singleton GFXStateBlockData( PFX_ReflectionProbeArrayStateBlock )
samplerStates[3] = SamplerClampPoint;
samplerStates[4] = SamplerClampLinear;
samplerStates[5] = SamplerClampLinear;
samplerStates[6] = SamplerClampLinear;
samplerStates[7] = SamplerClampLinear;
};

View file

@ -19,7 +19,8 @@ uniform vec3 eyePosWorld;
//cubemap arrays require all the same size. so shared mips# value
uniform float cubeMips;
uniform float numProbes;
uniform int numProbes;
uniform samplerCubeArray specularCubemapAR;
uniform samplerCubeArray irradianceCubemapAR;
@ -34,9 +35,7 @@ uniform vec4 probeConfigData[MAX_PROBES]; //r,g,b/mode,radius,atten
uniform vec4 probeContribColors[MAX_PROBES];
#endif
uniform samplerCube skylightSpecularMap;
uniform samplerCube skylightIrradMap;
uniform float hasSkylight;
uniform float skylightCubemapIdx;
out vec4 OUT_col;
@ -56,6 +55,7 @@ void main()
float alpha = 1;
#if SKYLIGHT_ONLY == 0
int i = 0;
float blendFactor[MAX_PROBES];
float blendSum = 0;
@ -64,8 +64,9 @@ void main()
float probehits = 0;
//Set up our struct data
float contribution[MAX_PROBES];
if (alpha > 0)
{
//if (alpha > 0)
//{
//Process prooooobes
for (i = 0; i < numProbes; ++i)
{
@ -83,6 +84,8 @@ void main()
if (contribution[i]>0.0)
probehits++;
}
else
continue;
contribution[i] = max(contribution[i],0);
@ -106,20 +109,21 @@ void main()
}
// Normalize blendVal
#if DEBUGVIZ_ATTENUATION == 0 //this can likely be removed when we fix the above normalization behavior
if (blendFacSum == 0.0f) // Possible with custom weight
{
blendFacSum = 1.0f;
}
#endif
if (blendFacSum == 0.0f) // Possible with custom weight
{
blendFacSum = 1.0f;
}
float invBlendSumWeighted = 1.0f / blendFacSum;
for (i = 0; i < numProbes; ++i)
{
blendFactor[i] *= invBlendSumWeighted;
contribution[i] *= blendFactor[i];
alpha -= contribution[i];
}
}
else
alpha -= blendSum;
#if DEBUGVIZ_ATTENUATION == 1
float contribAlpha = 1;
@ -142,12 +146,14 @@ void main()
}
//Skylight coloration for anything not covered by probes above
finalContribColor += vec3(0.3, 0.3, 0.3) * contribAlpha;
if(skylightCubemapIdx != -1)
finalContribColor += vec3(0.3, 0.3, 0.3) * contribAlpha;
OUT_col = vec4(finalContribColor, 1);
return;
#endif
}
//}
#endif
vec3 irradiance = vec3(0, 0, 0);
vec3 specular = vec3(0, 0, 0);
@ -159,27 +165,27 @@ void main()
float lod = 0;
#endif
#if SKYLIGHT_ONLY == 0
alpha = 1;
for (i = 0; i < numProbes; ++i)
{
float contrib = contribution[i];
if (contrib != 0)
{
float cubemapIdx = probeConfigData[i].a;
int cubemapIdx = probeConfigData[i].a;
vec3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], bbMinArray[i].xyz, bbMaxArray[i].xyz, inRefPosArray[i].xyz);
irradiance += textureLod(irradianceCubemapAR, vec4(dir, cubemapIdx), 0).xyz * contrib;
specular += textureLod(specularCubemapAR, vec4(dir, cubemapIdx), lod).xyz * contrib;
//irradiance += vec3(1,1,1) * contrib;
//specular += vec3(1,1,1) * contrib;
alpha -= contrib;
}
}
#endif
if (hasSkylight == 1 && alpha > 0.001)
if (skylightCubemapIdx != -1 && alpha > 0.001)
{
irradiance += textureLod(skylightIrradMap, surface.R, 0).xyz * alpha;
specular += textureLod(skylightSpecularMap, surface.R, lod).xyz * alpha;
irradiance += textureLod(irradianceCubemapAR, vec4(surface.R, skylightCubemapIdx), 0).xyz * alpha;
specular += textureLod(specularCubemapAR, vec4(surface.R, skylightCubemapIdx), lod).xyz * alpha;
}
#if DEBUGVIZ_SPECCUBEMAP == 1 && DEBUGVIZ_DIFFCUBEMAP == 0

View file

@ -1,162 +0,0 @@
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#include "../../../gl/hlslCompat.glsl"
#include "shadergen:/autogenConditioners.h"
#include "farFrustumQuad.glsl"
#include "../../../gl/torque.glsl"
#include "../../../gl/lighting.glsl"
#line 27
in vec4 pos;
in vec4 wsEyeDir;
in vec4 ssPos;
in vec4 vsEyeDir;
uniform sampler2D deferredBuffer;
uniform sampler2D colorBuffer;
uniform sampler2D matInfoBuffer;
uniform samplerCube cubeMap;
uniform samplerCube irradianceCubemap;
uniform sampler2D BRDFTexture;
uniform float cubeMips;
uniform vec4 rtParams0;
uniform vec3 probeWSPos;
uniform vec3 probeLSPos;
uniform vec4 vsFarPlane;
uniform float radius;
uniform vec2 attenuation;
uniform mat4 worldToObj;
uniform mat4 cameraToWorld;
uniform vec3 eyePosWorld;
uniform vec3 bbMin;
uniform vec3 bbMax;
uniform float useSphereMode;
// Box Projected IBL Lighting
// Based on: http://www.gamedev.net/topic/568829-box-projected-cubemap-environment-mapping/
// and https://seblagarde.wordpress.com/2012/09/29/image-based-lighting-approaches-and-parallax-corrected-cubemap/
vec3 boxProject(vec3 wsPosition, vec3 reflectDir, vec3 boxWSPos, vec3 boxMin, vec3 boxMax)
{
vec3 nrdir = reflectDir;
vec3 offset = wsPosition;
vec3 plane1vec = (boxMax - offset) / nrdir;
vec3 plane2vec = (boxMin - offset) / nrdir;
vec3 furthestPlane = max(plane1vec, plane2vec);
float dist = min(min(furthestPlane.x, furthestPlane.y), furthestPlane.z);
vec3 posonbox = offset + nrdir * dist;
return posonbox - boxWSPos;
}
vec3 iblBoxSpecular(vec3 normal, vec3 wsPos, float roughness, vec3 surfToEye,
sampler2D brdfTexture,
samplerCube radianceCube,
vec3 boxPos,
vec3 boxMin,
vec3 boxMax)
{
float ndotv = clamp(dot(normal, surfToEye), 0.0, 1.0);
// BRDF
vec2 brdf = textureLod(brdfTexture, vec2(roughness, ndotv),0).xy;
// Radiance (Specular)
float maxmip = pow(cubeMips+1,2);
float lod = roughness*maxmip;
vec3 r = reflect(surfToEye, normal);
vec3 cubeR = normalize(r);
cubeR = boxProject(wsPos, cubeR, boxPos, boxMin, boxMax);
vec3 radiance = textureLod(radianceCube, cubeR, lod).xyz * (brdf.x + brdf.y);
return radiance;
}
float defineBoxSpaceInfluence(vec3 surfPosWS, vec3 probePos, float radius, float atten)
{
vec3 surfPosLS = tMul( worldToObj, vec4(surfPosWS,1.0)).xyz;
vec3 boxMinLS = probePos-(vec3(1,1,1)*radius);
vec3 boxMaxLS = probePos+(vec3(1,1,1)*radius);
float boxOuterRange = length(boxMaxLS - boxMinLS);
float boxInnerRange = boxOuterRange / atten;
vec3 localDir = vec3(abs(surfPosLS.x), abs(surfPosLS.y), abs(surfPosLS.z));
localDir = (localDir - boxInnerRange) / (boxOuterRange - boxInnerRange);
return max(localDir.x, max(localDir.y, localDir.z)) * -1;
}
out vec4 OUT_col;
void main()
{
// Compute scene UV
vec2 uvScene = getUVFromSSPos( ssPos.xyz/ssPos.w, rtParams0 );
//eye ray WS/LS
vec3 vsEyeRay = getDistanceVectorToPlane( -vsFarPlane.w, vsEyeDir.xyz, vsFarPlane );
vec3 wsEyeRay = tMul(cameraToWorld, vec4(vsEyeRay, 0)).xyz;
//unpack normal and linear depth
vec4 normDepth = deferredUncondition(deferredBuffer, uvScene);
//create surface
Surface surface = createSurface( normDepth, colorBuffer, matInfoBuffer,
uvScene, eyePosWorld, wsEyeRay, cameraToWorld);
float blendVal = 1.0;
if(useSphereMode>0)
{
vec3 L = probeWSPos - surface.P;
blendVal = 1.0-length(L)/radius;
clip(blendVal);
}
else
{
float tempAttenVal = 3.5;
blendVal = defineBoxSpaceInfluence(surface.P, probeWSPos, radius, tempAttenVal);
clip(blendVal);
float compression = 0.05;
blendVal=(1.0-compression)+blendVal*compression;
}
//render into the bound space defined above
vec3 surfToEye = normalize(surface.P - eyePosWorld);
vec3 irradiance = textureLod(irradianceCubemap, surface.N,0).xyz;
vec3 specular = iblBoxSpecular(surface.N, surface.P, surface.roughness, surfToEye, BRDFTexture, cubeMap, probeWSPos, bbMin, bbMax);
vec3 F = FresnelSchlickRoughness(surface.NdotV, surface.f0, surface.roughness);
specular *= F;
//energy conservation
vec3 kD = vec3(1.0) - F;
kD *= 1.0 - surface.metalness;
//final diffuse color
vec3 diffuse = kD * irradiance * surface.baseColor.rgb;
OUT_col = vec4(diffuse + specular * surface.ao, blendVal);
}

View file

@ -1,32 +0,0 @@
#include "shadergen:/autogenConditioners.h"
#include "../../torque.hlsl"
// This is the shader input
struct Vert
{
float4 position : POSITION;
float2 uv0 : TEXCOORD0;
float3 wsEyeRay : TEXCOORD1;
};
// This is the shader output data.
struct Conn
{
float4 position : POSITION;
float2 uv0 : TEXCOORD0;
float3 wsEyeRay : TEXCOORD1;
};
// Render Target Paramaters
float4 rtParams0;
Conn main(Vert IN,
uniform float4x4 modelView : register(C0))
{
Conn OUT;
OUT.position = IN.position;
OUT.uv0 = viewportCoordToRenderTarget( IN.uv0, rtParams0 );
OUT.wsEyeRay = IN.wsEyeRay;
return OUT;
}

View file

@ -16,7 +16,8 @@ uniform float3 eyePosWorld;
//cubemap arrays require all the same size. so shared mips# value
uniform float cubeMips;
uniform float numProbes;
uniform int numProbes;
TORQUE_UNIFORM_SAMPLERCUBEARRAY(specularCubemapAR, 4);
TORQUE_UNIFORM_SAMPLERCUBEARRAY(irradianceCubemapAR, 5);
@ -31,7 +32,6 @@ uniform float4 probeConfigData[MAX_PROBES]; //r,g,b/mode,radius,atten
uniform float4 probeContribColors[MAX_PROBES];
#endif
uniform float hasSkylight;
uniform float skylightCubemapIdx;
float4 main(PFXVertToPix IN) : SV_TARGET
@ -46,11 +46,12 @@ float4 main(PFXVertToPix IN) : SV_TARGET
//early out if emissive
if (getFlag(surface.matFlag, 0))
{
discard;
return TORQUE_TEX2D(colorBuffer, IN.uv0.xy);
}
float alpha = 1;
#if SKYLIGHT_ONLY == 0
int i = 0;
float blendFactor[MAX_PROBES];
float blendSum = 0;
@ -59,8 +60,9 @@ float4 main(PFXVertToPix IN) : SV_TARGET
float probehits = 0;
//Set up our struct data
float contribution[MAX_PROBES];
if (alpha > 0)
{
//if (alpha > 0)
//{
//Process prooooobes
for (i = 0; i < numProbes; ++i)
{
@ -78,6 +80,8 @@ float4 main(PFXVertToPix IN) : SV_TARGET
if (contribution[i]>0.0)
probehits++;
}
else
continue;
contribution[i] = max(contribution[i],0);
@ -90,34 +94,32 @@ float4 main(PFXVertToPix IN) : SV_TARGET
// Weight1 = normalized inverted NDF, so we have 1 at center, 0 at boundary
// and respect constraint A.
if (probehits>1.0)
{
for (i = 0; i < numProbes; i++)
{
blendFactor[i] = ((contribution[i] / blendSum)) / probehits;
blendFactor[i] *= ((contribution[i]) / invBlendSum);
blendFactor[i] = saturate(blendFactor[i]);
blendFacSum += blendFactor[i];
}
if (probehits > 1.0)
{
for (i = 0; i < numProbes; i++)
{
blendFactor[i] = ((contribution[i] / blendSum)) / probehits;
blendFactor[i] *= ((contribution[i]) / invBlendSum);
blendFactor[i] = saturate(blendFactor[i]);
blendFacSum += blendFactor[i];
}
// Normalize blendVal
#if DEBUGVIZ_ATTENUATION == 0 //this can likely be removed when we fix the above normalization behavior
if (blendFacSum == 0.0f) // Possible with custom weight
{
blendFacSum = 1.0f;
}
#endif
// Normalize blendVal
if (blendFacSum == 0.0f) // Possible with custom weight
{
blendFacSum = 1.0f;
}
float invBlendSumWeighted = 1.0f / blendFacSum;
for (i = 0; i < numProbes; ++i)
{
blendFactor[i] *= invBlendSumWeighted;
contribution[i] *= blendFactor[i];
alpha -= contribution[i];
}
float invBlendSumWeighted = 1.0f / blendFacSum;
for (i = 0; i < numProbes; ++i)
{
blendFactor[i] *= invBlendSumWeighted;
contribution[i] *= blendFactor[i];
alpha -= contribution[i];
}
}
else
alpha -= blendSum;
alpha -= blendSum;
#if DEBUGVIZ_ATTENUATION == 1
float contribAlpha = 1;
@ -139,11 +141,13 @@ float4 main(PFXVertToPix IN) : SV_TARGET
}
//Skylight coloration for anything not covered by probes above
finalContribColor += float3(0.3, 0.3, 0.3) * contribAlpha;
if(skylightCubemapIdx != -1)
finalContribColor += float3(0.3, 0.3, 0.3) * contribAlpha;
return float4(finalContribColor, 1);
#endif
}
//}
#endif
float3 irradiance = float3(0, 0, 0);
float3 specular = float3(0, 0, 0);
@ -155,6 +159,7 @@ float4 main(PFXVertToPix IN) : SV_TARGET
float lod = 0;
#endif
#if SKYLIGHT_ONLY == 0
alpha = 1;
for (i = 0; i < numProbes; ++i)
{
@ -169,8 +174,9 @@ float4 main(PFXVertToPix IN) : SV_TARGET
alpha -= contrib;
}
}
#endif
if (hasSkylight && alpha > 0.001)
if(skylightCubemapIdx != -1 && alpha >= 0.001)
{
irradiance += TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, surface.R, skylightCubemapIdx, 0).xyz * alpha;
specular += TORQUE_TEXCUBEARRAYLOD(specularCubemapAR, surface.R, skylightCubemapIdx, lod).xyz * alpha;
@ -197,6 +203,5 @@ float4 main(PFXVertToPix IN) : SV_TARGET
float3 diffuse = kD * irradiance * surface.baseColor.rgb;
float4 finalColor = float4(diffuse + specular * surface.ao, 1.0);
//finalColor.rgb += abs(surface.N);
return finalColor;
}

View file

@ -150,7 +150,7 @@ function AssetBrowser::showDialog( %this, %AssetTypeFilter, %selectCallback, %ta
AssetBrowser.fieldTargetObject = %targetObj;
AssetBrowser.fieldTargetName = %fieldName;
Canvas.add(AssetBrowser);
Canvas.pushDialog(AssetBrowser);
AssetBrowser.setVisible(1);
AssetBrowserWindow.setVisible(1);
AssetBrowserWindow.selectWindow();

View file

@ -497,6 +497,9 @@ function ImportAssetWindow::onWake(%this)
return;
$AssetBrowser::importConfigsFile = "tools/assetBrowser/assetImportConfigs.xml";
$AssetBrowser::currentImportConfig = "";
new Settings(AssetImportSettings) { file = $AssetBrowser::importConfigsFile; };
AssetImportSettings.read();
%this.reloadImportOptionConfigs();
}
@ -510,17 +513,15 @@ function ImportAssetWindow::reloadImportOptionConfigs(%this)
if(%xmlDoc.loadFile($AssetBrowser::importConfigsFile))
{
//StateMachine element
%xmlDoc.pushFirstChildElement("AssetImportConfigs");
%xmlDoc.pushFirstChildElement("AssetImportSettings");
//Configs
//Config Groups
%configCount = 0;
while(%xmlDoc.pushChildElement(%configCount))
{
%configObj = new ScriptObject(){};
%configObj.Name = %xmlDoc.attribute("Name");
%configName = %xmlDoc.attribute("name");
%xmlDoc.pushFirstChildElement("Mesh");
/*%xmlDoc.pushFirstChildElement("Mesh");
%configObj.ImportMesh = %xmlDoc.attribute("ImportMesh");
%configObj.DoUpAxisOverride = %xmlDoc.attribute("DoUpAxisOverride");
%configObj.UpAxisOverride = %xmlDoc.attribute("UpAxisOverride");
@ -583,12 +584,12 @@ function ImportAssetWindow::reloadImportOptionConfigs(%this)
%configObj.VolumeAdjust = %xmlDoc.attribute("VolumeAdjust");
%configObj.PitchAdjust = %xmlDoc.attribute("PitchAdjust");
%configObj.Compressed = %xmlDoc.attribute("Compressed");
%xmlDoc.popElement();
%xmlDoc.popElement();*/
%xmlDoc.popElement();
%configCount++;
ImportAssetWindow.importConfigsList.add(%configObj);
ImportAssetWindow.importConfigsList.add(%configName);
}
%xmlDoc.popElement();
@ -596,8 +597,8 @@ function ImportAssetWindow::reloadImportOptionConfigs(%this)
for(%i = 0; %i < ImportAssetWindow.importConfigsList.count(); %i++)
{
%configObj = ImportAssetWindow.importConfigsList.getKey(%i);
ImportAssetConfigList.add(%configObj.Name);
%configName = ImportAssetWindow.importConfigsList.getKey(%i);
ImportAssetConfigList.add(%configName);
}
%importConfigIdx = ImportAssetWindow.activeImportConfigIndex;
@ -607,7 +608,7 @@ function ImportAssetWindow::reloadImportOptionConfigs(%this)
ImportAssetConfigList.setSelected(%importConfigIdx);
}
function ImportAssetWindow::setImportOptions(%this, %optionsObj)
function ImportAssetWindow::setImportOptions(%this, %configName)
{
//Todo, editor + load from files for preconfigs

View file

@ -37,7 +37,7 @@ new GuiControlProfile (ToolsGuiDefaultProfile)
mouseOverSelected = false;
// fill color
opaque = true;
opaque = false;
fillColor = "50 50 50";
fillColorHL = "91 101 116";
fillColorSEL = "91 101 116";

View file

@ -1,94 +1,128 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<EditorSettings>
<Group name="ConvexEditor">
<Setting name="materialName">Grid_512_Orange</Setting>
</Group>
<Group name="LevelInformation">
<Setting name="levelsDirectory">data/FPSGameplay/levels</Setting>
<Group name="levels">
<Group name="PbrMatTest.mis">
<Setting name="cameraSpeed">5</Setting>
</Group>
<Group name="BlankRoom.mis">
<Setting name="cameraSpeed">25</Setting>
</Group>
</Group>
</Group>
<Group name="WorldEditor">
<Setting name="forceLoadDAE">0</Setting>
<Setting name="orthoShowGrid">1</Setting>
<Setting name="dropType">screenCenter</Setting>
<Setting name="displayType">6</Setting>
<Setting name="forceLoadDAE">0</Setting>
<Setting name="currentEditor">WorldEditorInspectorPlugin</Setting>
<Setting name="orthoShowGrid">1</Setting>
<Setting name="undoLimit">40</Setting>
<Setting name="orthoFOV">50</Setting>
<Setting name="torsionPath">AssetWork_Debug.exe</Setting>
<Setting name="displayType">6</Setting>
<Setting name="orthoFOV">50</Setting>
<Group name="Color">
<Setting name="objectTextColor">255 255 255 255</Setting>
<Setting name="popupBackgroundColor">100 100 100 255</Setting>
<Setting name="selectionBoxColor">255 255 0 255</Setting>
<Setting name="dragRectColor">255 255 0 255</Setting>
<Setting name="objMouseOverSelectColor">0 0 255 255</Setting>
<Setting name="objSelectColor">255 0 0 255</Setting>
<Setting name="objMouseOverColor">0 255 0 255</Setting>
</Group>
<Group name="Theme">
<Setting name="windowTitleBGHLColor">48 48 48 255</Setting>
<Setting name="windowTitleFontHLColor">255 255 255 255</Setting>
<Setting name="windowTitleFontColor">215 215 215 255</Setting>
<Setting name="windowTitleBGNAColor">180 180 180 255</Setting>
<Setting name="windowTitleBGColor">50 50 50 255</Setting>
</Group>
<Group name="Tools">
<Setting name="dropAtScreenCenterMax">100</Setting>
<Setting name="snapSoft">0</Setting>
<Setting name="boundingBoxCollision">0</Setting>
<Setting name="snapGround">0</Setting>
<Setting name="objectsUseBoxCenter">1</Setting>
<Setting name="snapSoftSize">2</Setting>
<Setting name="dropAtScreenCenterScalar">1</Setting>
</Group>
<Group name="Grid">
<Setting name="gridMinorColor">51 51 51 100</Setting>
<Setting name="gridColor">102 102 102 100</Setting>
<Setting name="gridSize">1</Setting>
<Setting name="gridOriginColor">255 255 255 100</Setting>
<Setting name="gridSnap">0</Setting>
</Group>
<Group name="Images">
<Setting name="defaultHandle">tools/worldEditor/images/DefaultHandle</Setting>
<Setting name="selectHandle">tools/worldEditor/images/SelectHandle</Setting>
<Setting name="lockedHandle">tools/worldEditor/images/LockedHandle</Setting>
</Group>
<Group name="Docs">
<Setting name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
</Group>
<Group name="ObjectIcons">
<Setting name="fadeIconsStartDist">8</Setting>
<Setting name="fadeIcons">1</Setting>
<Setting name="fadeIconsEndAlpha">0</Setting>
<Setting name="fadeIconsStartAlpha">255</Setting>
<Setting name="fadeIconsEndDist">20</Setting>
</Group>
<Group name="Docs">
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
<Setting name="fadeIconsStartDist">8</Setting>
</Group>
<Group name="Render">
<Setting name="renderObjText">1</Setting>
<Setting name="showMousePopupInfo">1</Setting>
<Setting name="renderSelectionBox">1</Setting>
<Setting name="renderObjText">1</Setting>
<Setting name="renderPopupBackground">1</Setting>
<Setting name="renderObjHandle">1</Setting>
</Group>
</Group>
<Group name="AxisGizmo">
<Setting name="mouseRotateScalar">0.8</Setting>
<Setting name="axisGizmoMaxScreenLen">100</Setting>
<Setting name="mouseScaleScalar">0.8</Setting>
<Setting name="rotationSnap">15</Setting>
<Setting name="renderWhenUsed">0</Setting>
<Setting name="snapRotations">0</Setting>
<Setting name="renderInfoText">1</Setting>
<Group name="Grid">
<Setting name="gridOriginColor">255 255 255 100</Setting>
<Setting name="gridSnap">0</Setting>
<Setting name="gridMinorColor">51 51 51 100</Setting>
<Setting name="gridColor">102 102 102 100</Setting>
<Setting name="gridSize">1</Setting>
</Group>
<Group name="Tools">
<Setting name="snapSoftSize">2</Setting>
<Setting name="snapSoft">0</Setting>
<Setting name="boundingBoxCollision">0</Setting>
<Setting name="dropAtScreenCenterScalar">1</Setting>
<Setting name="objectsUseBoxCenter">1</Setting>
<Setting name="snapGround">0</Setting>
<Setting name="dropAtScreenCenterMax">100</Setting>
</Group>
<Group name="Theme">
<Setting name="windowTitleBGHLColor">48 48 48 255</Setting>
<Setting name="windowTitleFontColor">215 215 215 255</Setting>
<Setting name="windowTitleBGNAColor">180 180 180 255</Setting>
<Setting name="windowTitleFontHLColor">255 255 255 255</Setting>
<Setting name="windowTitleBGColor">50 50 50 255</Setting>
</Group>
<Group name="Color">
<Setting name="objMouseOverSelectColor">0 0 255 255</Setting>
<Setting name="objMouseOverColor">0 255 0 255</Setting>
<Setting name="objSelectColor">255 0 0 255</Setting>
<Setting name="dragRectColor">255 255 0 255</Setting>
<Setting name="popupBackgroundColor">100 100 100 255</Setting>
<Setting name="objectTextColor">255 255 255 255</Setting>
<Setting name="selectionBoxColor">255 255 0 255</Setting>
</Group>
<Group name="Images">
<Setting name="selectHandle">tools/worldEditor/images/SelectHandle</Setting>
<Setting name="lockedHandle">tools/worldEditor/images/LockedHandle</Setting>
<Setting name="defaultHandle">tools/worldEditor/images/DefaultHandle</Setting>
<Setting name="snapToGrid">0</Setting>
<Setting name="gridColor">255 255 255 20</Setting>
<Setting name="renderPlaneHashes">0</Setting>
<Setting name="gridSize">10 10 10</Setting>
<Setting name="renderPlane">0</Setting>
<Setting name="planeDim">500</Setting>
</Group>
</Group>
<Group name="GuiEditor">
<Setting name="previewResolution">1024 768</Setting>
<Setting name="lastPath">tools/gui</Setting>
<Setting name="previewResolution">1024 768</Setting>
<Group name="EngineDevelopment">
<Setting name="showEditorProfiles">0</Setting>
<Setting name="toggleIntoEditor">0</Setting>
<Setting name="showEditorGuis">0</Setting>
</Group>
<Group name="Help">
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
</Group>
<Group name="Snapping">
<Setting name="snapToCanvas">1</Setting>
<Setting name="snapToGuides">1</Setting>
<Setting name="snapToCenters">1</Setting>
<Setting name="snapToControls">1</Setting>
<Setting name="snap2GridSize">8</Setting>
<Setting name="snapToCenters">1</Setting>
<Setting name="snapToGuides">1</Setting>
<Setting name="sensitivity">2</Setting>
<Setting name="snapToEdges">1</Setting>
<Setting name="snap2Grid">0</Setting>
</Group>
<Group name="Help">
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
<Group name="Selection">
<Setting name="fullBox">0</Setting>
</Group>
<Group name="Rendering">
<Setting name="drawGuides">1</Setting>
@ -97,37 +131,6 @@
<Group name="Library">
<Setting name="viewType">Categorized</Setting>
</Group>
<Group name="Selection">
<Setting name="fullBox">0</Setting>
</Group>
</Group>
<Group name="AxisGizmo">
<Setting name="renderWhenUsed">0</Setting>
<Setting name="renderInfoText">1</Setting>
<Setting name="axisGizmoMaxScreenLen">100</Setting>
<Setting name="rotationSnap">15</Setting>
<Setting name="snapRotations">0</Setting>
<Setting name="mouseRotateScalar">0.8</Setting>
<Setting name="mouseScaleScalar">0.8</Setting>
<Group name="Grid">
<Setting name="renderPlane">0</Setting>
<Setting name="planeDim">500</Setting>
<Setting name="renderPlaneHashes">0</Setting>
<Setting name="gridColor">255 255 255 20</Setting>
<Setting name="gridSize">10 10 10</Setting>
<Setting name="snapToGrid">0</Setting>
</Group>
</Group>
<Group name="LevelInformation">
<Setting name="levelsDirectory">data/FPSGameplay/levels</Setting>
<Group name="levels">
<Group name="BlankRoom.mis">
<Setting name="cameraSpeed">25</Setting>
</Group>
</Group>
</Group>
<Group name="ConvexEditor">
<Setting name="materialName">Grid_512_Orange</Setting>
</Group>
<Group name="NavEditor">
<Setting name="SpawnClass">AIPlayer</Setting>

View file

@ -135,7 +135,12 @@ function initializeWorldEditor()
EVisibility.addOption( "Frustum Lock", "$Scene::lockCull", "" );
EVisibility.addOption( "Disable Zone Culling", "$Scene::disableZoneCulling", "" );
EVisibility.addOption( "Disable Terrain Occlusion", "$Scene::disableTerrainOcclusion", "" );
EVisibility.addOption( "Probes: Attenuation", "$Probes::showAttenuation", "" );
EVisibility.addOption( "Probes: Specular Cubemaps", "$Probes::showSpecularCubemaps", "" );
EVisibility.addOption( "Probes: Diffuse Cubemaps", "$Probes::showDiffuseCubemaps", "" );
EVisibility.addOption( "Probes: Contribution", "$Probes::showProbeContrib", "" );
EVisibility.addOption( "Colorblindness: Protanopia", "$CBV_Protanopia", "toggleColorBlindnessViz" );
EVisibility.addOption( "Colorblindness: Protanomaly", "$CBV_Protanomaly", "toggleColorBlindnessViz" );
EVisibility.addOption( "Colorblindness: Deuteranopia", "$CBV_Deuteranopia", "toggleColorBlindnessViz" );

View file

@ -8,13 +8,11 @@
<OpenFiles>
<File ScrollX="0" ScrollY="0">art\main.cs</File>
<File ScrollX="0" ScrollY="9">core\main.cs</File>
<File ScrollX="0" ScrollY="9">..\..\Empty\game\core\main.cs</File>
<File ScrollX="0" ScrollY="15">..\..\BaseGame\game\core\main.cs</File>
<File ScrollX="0" ScrollY="130">core\scripts\client\postFx\MLAA.cs</File>
<File ScrollX="0" ScrollY="228">core\scripts\client\postFx\ssao.cs</File>
<File ScrollX="0" ScrollY="114">core\scripts\client\postFx\hdr.cs</File>
<File ScrollX="0" ScrollY="0">core\scripts\client\postFx\dof.cs</File>
<File ScrollX="0" ScrollY="9">core\scripts\client\postFx\caustics.cs</File>
<File ScrollX="0" ScrollY="0" Active="true">..\..\..\..\..\RnDBuildTest\My Projects\RnDTest\game\modules\TheFactory\components\FakeGISpotlight.cs</File>
<File ScrollX="0" ScrollY="108" Active="true">tools\worldEditor\main.cs</File>
</OpenFiles>
</TorsionProjectOptions>