Merge branch 'master' of git://github.com/Shyotl/SingularityViewer
Conflicts: indra/newview/skins/default/xui/en-us/floater_post_process.xml - Used Mine, because Shyotl's is the ancient one from "the before time" and because my last commit (worked on motionblur tab, then, too.)
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
|
||||
const S32 LL_VERSION_MAJOR = 1;
|
||||
const S32 LL_VERSION_MINOR = 7;
|
||||
const S32 LL_VERSION_PATCH = 1;
|
||||
const S32 LL_VERSION_PATCH = 2;
|
||||
const S32 LL_VERSION_BUILD = ${vBUILD};
|
||||
|
||||
const char * const LL_CHANNEL = "${VIEWER_CHANNEL}";
|
||||
|
||||
@@ -81,6 +81,33 @@ public:
|
||||
virtual void traverse(const LLOctreeNode<T>* node);
|
||||
};
|
||||
|
||||
struct OctreeGuard
|
||||
{
|
||||
template <typename T>
|
||||
OctreeGuard(const LLOctreeNode<T>* node)
|
||||
{mNode = (void*)node;getNodes().push_back(this);}
|
||||
~OctreeGuard()
|
||||
{llassert_always(getNodes().back() == this); getNodes().pop_back();}
|
||||
template <typename T>
|
||||
static bool checkGuarded(const LLOctreeNode<T>* node)
|
||||
{
|
||||
for(std::vector<OctreeGuard*>::const_iterator it=getNodes().begin();it != getNodes().end();++it)
|
||||
{
|
||||
if((*it)->mNode == node)
|
||||
{
|
||||
OCT_ERRS << "!!! MANIPULATING OCTREE BRANCH DURING ITERATION !!!" << llendl;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
static std::vector<OctreeGuard*>& getNodes()
|
||||
{
|
||||
static std::vector<OctreeGuard*> gNodes;
|
||||
return gNodes;
|
||||
}
|
||||
void* mNode;
|
||||
};
|
||||
template <class T>
|
||||
class LLOctreeNode : public LLTreeNode<T>
|
||||
{
|
||||
@@ -246,8 +273,8 @@ public:
|
||||
|
||||
U32 getElementCount() const { return mElementCount; }
|
||||
bool isEmpty() const { return mElementCount == 0; }
|
||||
element_list& getData() { return mData; }
|
||||
const element_list& getData() const { return mData; }
|
||||
//element_list& getData() { return mData; }
|
||||
//const element_list& getData() const { return mData; }
|
||||
element_iter getDataBegin() { return mData; }
|
||||
element_iter getDataEnd() { return mDataEnd; }
|
||||
const_element_iter getDataBegin() const { return mData; }
|
||||
@@ -317,6 +344,7 @@ public:
|
||||
|
||||
virtual bool insert(T* data)
|
||||
{
|
||||
OctreeGuard::checkGuarded(this);
|
||||
if (data == NULL || data->getBinIndex() != -1)
|
||||
{
|
||||
OCT_ERRS << "!!! INVALID ELEMENT ADDED TO OCTREE BRANCH !!!" << llendl;
|
||||
@@ -433,7 +461,7 @@ public:
|
||||
|
||||
void _remove(T* data, S32 i)
|
||||
{ //precondition -- mElementCount > 0, idx is in range [0, mElementCount)
|
||||
|
||||
OctreeGuard::checkGuarded(this);
|
||||
mElementCount--;
|
||||
data->setBinIndex(-1);
|
||||
|
||||
@@ -463,6 +491,7 @@ public:
|
||||
|
||||
bool remove(T* data)
|
||||
{
|
||||
OctreeGuard::checkGuarded(this);
|
||||
S32 i = data->getBinIndex();
|
||||
|
||||
if (i >= 0 && i < (S32)mElementCount)
|
||||
@@ -508,6 +537,7 @@ public:
|
||||
|
||||
void removeByAddress(T* data)
|
||||
{
|
||||
OctreeGuard::checkGuarded(this);
|
||||
for (U32 i = 0; i < mElementCount; ++i)
|
||||
{
|
||||
if (mData[i] == data)
|
||||
@@ -527,6 +557,7 @@ public:
|
||||
|
||||
void clearChildren()
|
||||
{
|
||||
OctreeGuard::checkGuarded(this);
|
||||
mChildCount = 0;
|
||||
|
||||
U32* foo = (U32*) mChildMap;
|
||||
@@ -587,6 +618,7 @@ public:
|
||||
OCT_ERRS <<"Octree node has too many children... why?" << llendl;
|
||||
}
|
||||
#endif
|
||||
OctreeGuard::checkGuarded(this);
|
||||
|
||||
mChildMap[child->getOctant()] = mChildCount;
|
||||
|
||||
@@ -606,6 +638,8 @@ public:
|
||||
|
||||
void removeChild(S32 index, BOOL destroy = FALSE)
|
||||
{
|
||||
OctreeGuard::checkGuarded(this);
|
||||
|
||||
for (U32 i = 0; i < this->getListenerCount(); i++)
|
||||
{
|
||||
oct_listener* listener = getOctListener(i);
|
||||
|
||||
@@ -52,7 +52,14 @@ add_executable(SLPlugin
|
||||
set_target_properties(SLPlugin
|
||||
PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/slplugin_info.plist
|
||||
)
|
||||
|
||||
if (WINDOWS)
|
||||
set_target_properties(SLPlugin
|
||||
PROPERTIES
|
||||
LINK_FLAGS "/OPT:NOREF"
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(SLPlugin
|
||||
${LLPLUGIN_LIBRARIES}
|
||||
|
||||
@@ -48,6 +48,7 @@ extern LLGLSLShader gPostColorFilterProgram;
|
||||
extern LLGLSLShader gPostNightVisionProgram;
|
||||
extern LLGLSLShader gPostGaussianBlurProgram;
|
||||
extern LLGLSLShader gPostPosterizeProgram;
|
||||
extern LLGLSLShader gPostMotionBlurProgram;
|
||||
|
||||
static const unsigned int NOISE_SIZE = 512;
|
||||
|
||||
@@ -259,6 +260,53 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class LLMotionShader : public LLPostProcessShader
|
||||
{
|
||||
private:
|
||||
LLShaderSetting<bool> mEnabled;
|
||||
LLShaderSetting<S32> mStrength;
|
||||
public:
|
||||
LLMotionShader() :
|
||||
mEnabled("enable_motionblur",false),
|
||||
mStrength("blur_strength",false)
|
||||
{
|
||||
mSettings.push_back(&mEnabled);
|
||||
mSettings.push_back(&mStrength);
|
||||
}
|
||||
bool isEnabled() { return mEnabled && gPostMotionBlurProgram.mProgramObject; }
|
||||
S32 getColorChannel() { return 0; }
|
||||
S32 getDepthChannel() { return 1; }
|
||||
QuadType bind()
|
||||
{
|
||||
if(!isEnabled())
|
||||
{
|
||||
return QUAD_NONE;
|
||||
}
|
||||
|
||||
glh::matrix4f inv_proj(gGLModelView);
|
||||
inv_proj.mult_left(gGLProjection);
|
||||
inv_proj = inv_proj.inverse();
|
||||
glh::matrix4f prev_proj(gGLPreviousModelView);
|
||||
prev_proj.mult_left(gGLProjection);
|
||||
|
||||
LLVector2 screen_rect = LLPostProcess::getInstance()->getDimensions();
|
||||
|
||||
gPostMotionBlurProgram.bind();
|
||||
gPostMotionBlurProgram.uniformMatrix4fv("prev_proj", 1, GL_FALSE, prev_proj.m);
|
||||
gPostMotionBlurProgram.uniformMatrix4fv("inv_proj", 1, GL_FALSE, inv_proj.m);
|
||||
gPostMotionBlurProgram.uniform2fv("screen_res", 1, screen_rect.mV);
|
||||
gPostMotionBlurProgram.uniform1i("blur_strength", mStrength);
|
||||
}
|
||||
bool draw(U32 pass)
|
||||
{
|
||||
return pass == 1;
|
||||
}
|
||||
void unbind()
|
||||
{
|
||||
gPostMotionBlurProgram.unbind();
|
||||
}
|
||||
};
|
||||
|
||||
LLPostProcess::LLPostProcess(void) :
|
||||
mVBO(NULL),
|
||||
mDepthTexture(0),
|
||||
@@ -269,11 +317,13 @@ LLPostProcess::LLPostProcess(void) :
|
||||
mSelectedEffectInfo(LLSD::emptyMap()),
|
||||
mAllEffectInfo(LLSD::emptyMap())
|
||||
{
|
||||
mShaders.push_back(new LLMotionShader());
|
||||
mShaders.push_back(new LLColorFilterShader());
|
||||
mShaders.push_back(new LLNightVisionShader());
|
||||
mShaders.push_back(new LLGaussBlurShader());
|
||||
mShaders.push_back(new LLPosterizeShader());
|
||||
|
||||
|
||||
/* Do nothing. Needs to be updated to use our current shader system, and to work with the move into llrender.*/
|
||||
std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", XML_FILENAME));
|
||||
LL_DEBUGS2("AppInit", "Shaders") << "Loading PostProcess Effects settings from " << pathName << LL_ENDL;
|
||||
|
||||
@@ -142,6 +142,9 @@ private:
|
||||
void drawOrthoQuad(QuadType type); //Finally draws fullscreen quad with the shader currently bound.
|
||||
|
||||
public:
|
||||
LLVector2 getDimensions() { return LLVector2(mScreenWidth,mScreenHeight); }
|
||||
|
||||
|
||||
// UI interaction
|
||||
// Getters
|
||||
inline LLSD const & getAllEffectInfo(void) const { return mAllEffectInfo; }
|
||||
|
||||
@@ -42,6 +42,7 @@ LLRender gGL;
|
||||
//Would be best to migrate these to LLMatrix4a and LLVector4a, but that's too divergent right now.
|
||||
LL_ALIGN_16(F32 gGLModelView[16]);
|
||||
LL_ALIGN_16(F32 gGLLastModelView[16]);
|
||||
LL_ALIGN_16(F32 gGLPreviousModelView[16]);
|
||||
LL_ALIGN_16(F32 gGLLastProjection[16]);
|
||||
LL_ALIGN_16(F32 gGLProjection[16]);
|
||||
LL_ALIGN_16(S32 gGLViewport[4]);
|
||||
|
||||
@@ -474,6 +474,7 @@ private:
|
||||
extern F32 gGLModelView[16];
|
||||
extern F32 gGLLastModelView[16];
|
||||
extern F32 gGLLastProjection[16];
|
||||
extern F32 gGLPreviousModelView[16];
|
||||
extern F32 gGLProjection[16];
|
||||
extern S32 gGLViewport[4];
|
||||
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* @file colorFilterF.glsl
|
||||
*
|
||||
* Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
#ifdef DEFINE_GL_FRAGCOLOR
|
||||
out vec4 frag_color;
|
||||
#else
|
||||
#define frag_color gl_FragColor
|
||||
#endif
|
||||
|
||||
uniform sampler2DRect tex0;
|
||||
uniform sampler2DRect tex1;
|
||||
uniform mat4 inv_proj;
|
||||
uniform mat4 prev_proj;
|
||||
uniform vec2 screen_res;
|
||||
uniform int blur_strength;
|
||||
|
||||
VARYING vec2 vary_texcoord0;
|
||||
|
||||
#define SAMPLE_COUNT 10
|
||||
|
||||
vec4 getPosition(vec2 pos_screen, out vec4 ndc)
|
||||
{
|
||||
float depth = texture2DRect(tex1, pos_screen.xy).r;
|
||||
vec2 sc = pos_screen.xy*2.0;
|
||||
sc /= screen_res;
|
||||
sc -= vec2(1.0,1.0);
|
||||
ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
|
||||
vec4 pos = inv_proj * ndc;
|
||||
pos /= pos.w;
|
||||
pos.w = 1.0;
|
||||
return pos;
|
||||
}
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 ndc;
|
||||
vec4 pos = getPosition(vary_texcoord0,ndc);
|
||||
vec4 prev_pos = prev_proj * pos;
|
||||
prev_pos/=prev_pos.w;
|
||||
prev_pos.w = 1.0;
|
||||
vec2 vel = ((ndc.xy-prev_pos.xy) * .5) * screen_res * .001 * blur_strength;
|
||||
vec3 color = texture2DRect(tex0, vary_texcoord0.st).rgb;
|
||||
vec2 texcoord = vary_texcoord0 + vel;
|
||||
for(int i = 1; i < SAMPLE_COUNT; ++i, texcoord += vel)
|
||||
{
|
||||
color += texture2DRect(tex0, texcoord.st).rgb;
|
||||
}
|
||||
frag_color = vec4(color / SAMPLE_COUNT, 1.0);
|
||||
}
|
||||
@@ -175,6 +175,8 @@
|
||||
<key>enable_gauss_blur</key>
|
||||
<boolean>0</boolean>
|
||||
<key>enable_posterize</key>
|
||||
<boolean>0</boolean>
|
||||
<key>enable_motionblur</key>
|
||||
<boolean>0</boolean>
|
||||
<key>gauss_blur_passes</key>
|
||||
<integer>2</integer>
|
||||
@@ -190,6 +192,8 @@
|
||||
<real>1</real>
|
||||
<key>posterize_layers</key>
|
||||
<real>10</real>
|
||||
<key>blur_strength</key>
|
||||
<real>10</real>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
@@ -1276,6 +1276,7 @@ void LLSpatialGroup::handleDestruction(const TreeNode* node)
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
setState(DEAD);
|
||||
|
||||
{OctreeGuard guard(mOctreeNode);
|
||||
for (element_iter i = getDataBegin(); i != getDataEnd(); ++i)
|
||||
{
|
||||
LLDrawable* drawable = *i;
|
||||
@@ -1284,6 +1285,7 @@ void LLSpatialGroup::handleDestruction(const TreeNode* node)
|
||||
drawable->setSpatialGroup(NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//clean up avatar attachment stats
|
||||
LLSpatialBridge* bridge = mSpatialPartition->asBridge();
|
||||
@@ -1363,6 +1365,7 @@ void LLSpatialGroup::destroyGL(bool keep_occlusion)
|
||||
}
|
||||
|
||||
|
||||
OctreeGuard guard(mOctreeNode);
|
||||
for (LLSpatialGroup::element_iter i = getDataBegin(); i != getDataEnd(); ++i)
|
||||
{
|
||||
LLDrawable* drawable = *i;
|
||||
@@ -2065,6 +2068,7 @@ public:
|
||||
{
|
||||
LLSpatialGroup::OctreeNode* branch = group->mOctreeNode;
|
||||
|
||||
OctreeGuard guard(branch);
|
||||
for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i)
|
||||
{
|
||||
LLDrawable* drawable = *i;
|
||||
@@ -2189,6 +2193,7 @@ public:
|
||||
LLSpatialGroup* group = (LLSpatialGroup*) state->getListener(0);
|
||||
group->destroyGL();
|
||||
|
||||
{OctreeGuard guard(group->mOctreeNode);
|
||||
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
|
||||
{
|
||||
LLDrawable* drawable = *i;
|
||||
@@ -2197,6 +2202,7 @@ public:
|
||||
gPipeline.markRebuild(drawable, LLDrawable::REBUILD_ALL, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (LLSpatialGroup::bridge_list_t::iterator i = group->mBridgeList.begin(); i != group->mBridgeList.end(); ++i)
|
||||
{
|
||||
@@ -2502,6 +2508,7 @@ void renderOctree(LLSpatialGroup* group)
|
||||
gGL.flush();
|
||||
glLineWidth(1.f);
|
||||
gGL.flush();
|
||||
OctreeGuard guard(group->mOctreeNode);
|
||||
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
|
||||
{
|
||||
LLDrawable* drawable = *i;
|
||||
@@ -3358,6 +3365,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
|
||||
|
||||
void renderPhysicsShapes(LLSpatialGroup* group)
|
||||
{
|
||||
OctreeGuard guard(group->mOctreeNode);
|
||||
for (LLSpatialGroup::OctreeNode::const_element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
|
||||
{
|
||||
LLDrawable* drawable = *i;
|
||||
@@ -3885,6 +3893,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
{OctreeGuard guard(branch);
|
||||
for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i)
|
||||
{
|
||||
LLDrawable* drawable = *i;
|
||||
@@ -3980,7 +3989,7 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
|
||||
{
|
||||
@@ -4070,6 +4079,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
OctreeGuard guard(branch);
|
||||
for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i)
|
||||
{
|
||||
LLDrawable* drawable = *i;
|
||||
@@ -4293,6 +4303,7 @@ public:
|
||||
|
||||
virtual void visit(const LLSpatialGroup::OctreeNode* branch)
|
||||
{
|
||||
OctreeGuard guard(branch);
|
||||
for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i)
|
||||
{
|
||||
check(*i);
|
||||
@@ -4303,6 +4314,7 @@ public:
|
||||
{
|
||||
node->accept(this);
|
||||
|
||||
OctreeGuard guard(node);
|
||||
for (U32 i = 0; i < node->getChildCount(); i++)
|
||||
{
|
||||
const LLSpatialGroup::OctreeNode* child = node->getChild(i);
|
||||
|
||||
@@ -332,7 +332,7 @@ public:
|
||||
void dirtyMesh() { setState(MESH_DIRTY); }
|
||||
|
||||
//octree wrappers to make code more readable
|
||||
element_list& getData() { return mOctreeNode->getData(); }
|
||||
//element_list& getData() { return mOctreeNode->getData(); }
|
||||
element_iter getDataBegin() { return mOctreeNode->getDataBegin(); }
|
||||
element_iter getDataEnd() { return mOctreeNode->getDataEnd(); }
|
||||
U32 getElementCount() const { return mOctreeNode->getElementCount(); }
|
||||
|
||||
@@ -1025,6 +1025,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot, boo
|
||||
//when rendering next frame's occlusion queries
|
||||
for (U32 i = 0; i < 16; i++)
|
||||
{
|
||||
gGLPreviousModelView[i] = gGLLastModelView[i];
|
||||
gGLLastModelView[i] = gGLModelView[i];
|
||||
gGLLastProjection[i] = gGLProjection[i];
|
||||
}
|
||||
|
||||
@@ -873,11 +873,14 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
|
||||
LLMemType mt(LLMemType::MTYPE_OBJECT);
|
||||
|
||||
// Update globals
|
||||
LLViewerObject::setVelocityInterpolate( gSavedSettings.getBOOL("VelocityInterpolate") );
|
||||
LLViewerObject::setPingInterpolate( gSavedSettings.getBOOL("PingInterpolate") );
|
||||
static const LLCachedControl<bool> VelocityInterpolate("VelocityInterpolate");
|
||||
static const LLCachedControl<bool> PingInterpolate("PingInterpolate");
|
||||
LLViewerObject::setVelocityInterpolate( VelocityInterpolate );
|
||||
LLViewerObject::setPingInterpolate( PingInterpolate );
|
||||
|
||||
F32 interp_time = gSavedSettings.getF32("InterpolationTime");
|
||||
F32 phase_out_time = gSavedSettings.getF32("InterpolationPhaseOut");
|
||||
static LLCachedControl<F32> interp_time("InterpolationTime");
|
||||
static LLCachedControl<F32> phase_out_time("InterpolationPhaseOut");
|
||||
|
||||
if (interp_time < 0.0 ||
|
||||
phase_out_time < 0.0 ||
|
||||
phase_out_time > interp_time)
|
||||
@@ -889,7 +892,8 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
|
||||
LLViewerObject::setPhaseOutUpdateInterpolationTime( interp_time );
|
||||
LLViewerObject::setMaxUpdateInterpolationTime( phase_out_time );
|
||||
|
||||
gAnimateTextures = gSavedSettings.getBOOL("AnimateTextures");
|
||||
static const LLCachedControl<bool> AnimateTextures("AnimateTextures");
|
||||
gAnimateTextures = AnimateTextures;
|
||||
|
||||
// update global timer
|
||||
F32 last_time = gFrameTimeSeconds;
|
||||
|
||||
@@ -171,6 +171,7 @@ LLGLSLShader gPostColorFilterProgram(LLViewerShaderMgr::SHADER_EFFECT); //Not
|
||||
LLGLSLShader gPostNightVisionProgram(LLViewerShaderMgr::SHADER_EFFECT); //Not in mShaderList
|
||||
LLGLSLShader gPostGaussianBlurProgram(LLViewerShaderMgr::SHADER_EFFECT); //Not in mShaderList
|
||||
LLGLSLShader gPostPosterizeProgram(LLViewerShaderMgr::SHADER_EFFECT); //Not in mShaderList
|
||||
LLGLSLShader gPostMotionBlurProgram(LLViewerShaderMgr::SHADER_EFFECT); //Not in mShaderList
|
||||
|
||||
// Deferred rendering shaders
|
||||
LLGLSLShader gDeferredImpostorProgram(LLViewerShaderMgr::SHADER_DEFERRED);
|
||||
@@ -977,6 +978,26 @@ BOOL LLViewerShaderMgr::loadShadersEffects()
|
||||
gPostPosterizeProgram.uniform1i("tex0", 0);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
vector<string> shaderUniforms;
|
||||
shaderUniforms.reserve(3);
|
||||
shaderUniforms.push_back("inv_proj");
|
||||
shaderUniforms.push_back("prev_proj");
|
||||
shaderUniforms.push_back("screen_res");
|
||||
|
||||
gPostMotionBlurProgram.mName = "Motion Blur Shader (Post)";
|
||||
gPostMotionBlurProgram.mShaderFiles.clear();
|
||||
gPostMotionBlurProgram.mShaderFiles.push_back(make_pair("effects/MotionBlurF.glsl", GL_FRAGMENT_SHADER_ARB));
|
||||
gPostMotionBlurProgram.mShaderFiles.push_back(make_pair("interface/onetexturenocolorV.glsl", GL_VERTEX_SHADER_ARB));
|
||||
gPostMotionBlurProgram.mShaderLevel = mVertexShaderLevel[SHADER_EFFECT];
|
||||
if(gPostMotionBlurProgram.createShader(NULL, &shaderUniforms))
|
||||
{
|
||||
gPostMotionBlurProgram.bind();
|
||||
gPostMotionBlurProgram.uniform1i("tex0", 0);
|
||||
gPostMotionBlurProgram.uniform1i("tex1", 1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return success;
|
||||
|
||||
@@ -645,6 +645,7 @@ void LLGrassPartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_count
|
||||
mFaceList.clear();
|
||||
|
||||
LLViewerCamera* camera = LLViewerCamera::getInstance();
|
||||
OctreeGuard guard(group->mOctreeNode);
|
||||
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
|
||||
{
|
||||
LLDrawable* drawablep = *i;
|
||||
|
||||
@@ -557,6 +557,7 @@ void LLParticlePartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_co
|
||||
mFaceList.clear();
|
||||
|
||||
LLViewerCamera* camera = LLViewerCamera::getInstance();
|
||||
OctreeGuard guard(group->mOctreeNode);
|
||||
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
|
||||
{
|
||||
LLDrawable* drawablep = *i;
|
||||
|
||||
@@ -3494,6 +3494,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
|
||||
LLFastTimer t(FTM_REBUILD_VOLUME_FACE_LIST);
|
||||
|
||||
//get all the faces into a list
|
||||
OctreeGuard guard(group->mOctreeNode);
|
||||
for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter)
|
||||
{
|
||||
LLDrawable* drawablep = *drawable_iter;
|
||||
@@ -3900,6 +3901,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
|
||||
if (!LLPipeline::sDelayVBUpdate)
|
||||
{
|
||||
//drawables have been rebuilt, clear rebuild status
|
||||
OctreeGuard guard(group->mOctreeNode);
|
||||
for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter)
|
||||
{
|
||||
LLDrawable* drawablep = *drawable_iter;
|
||||
@@ -3940,6 +3942,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
|
||||
|
||||
std::set<LLVertexBuffer*> mapped_buffers;
|
||||
|
||||
OctreeGuard guard(group->mOctreeNode);
|
||||
for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter)
|
||||
{
|
||||
LLDrawable* drawablep = *drawable_iter;
|
||||
@@ -4012,6 +4015,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
|
||||
llwarns << "Not all mapped vertex buffers are unmapped!" << llendl ;
|
||||
warningsCount = 1;
|
||||
}
|
||||
OctreeGuard guard(group->mOctreeNode);
|
||||
for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter)
|
||||
{
|
||||
LLDrawable* drawablep = *drawable_iter;
|
||||
@@ -4484,6 +4488,7 @@ void LLGeometryManager::addGeometryCount(LLSpatialGroup* group, U32 &vertex_coun
|
||||
|
||||
//for each drawable
|
||||
|
||||
OctreeGuard guard(group->mOctreeNode);
|
||||
for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter)
|
||||
{
|
||||
LLDrawable* drawablep = *drawable_iter;
|
||||
|
||||
@@ -2820,6 +2820,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
|
||||
else
|
||||
{
|
||||
group->setVisible();
|
||||
OctreeGuard guard(group->mOctreeNode);
|
||||
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
|
||||
{
|
||||
markVisible(*i, camera);
|
||||
@@ -2908,6 +2909,7 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera)
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
|
||||
if (!sSkipUpdate && group->changeLOD())
|
||||
{
|
||||
OctreeGuard guard(group->mOctreeNode);
|
||||
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
|
||||
{
|
||||
LLDrawable* drawablep = *i;
|
||||
@@ -3044,6 +3046,7 @@ void forAllDrawables(LLCullResult::sg_iterator begin,
|
||||
{
|
||||
for (LLCullResult::sg_iterator i = begin; i != end; ++i)
|
||||
{
|
||||
OctreeGuard guard((*i)->mOctreeNode);
|
||||
for (LLSpatialGroup::element_iter j = (*i)->getDataBegin(); j != (*i)->getDataEnd(); ++j)
|
||||
{
|
||||
func(*j);
|
||||
|
||||
@@ -165,6 +165,25 @@
|
||||
max_val="20" min_val="1" mouse_opaque="true"
|
||||
name="posterize_layers" show_text="true" value="10" width="200" />
|
||||
</panel>
|
||||
<panel border="true" bottom="-180" follows="left|top|right|bottom" height="384"
|
||||
label="MotionBlur" left="1" mouse_opaque="false"
|
||||
name="MotionBlurPanel" width="398">
|
||||
<check_box follows="left|top"
|
||||
font="SansSerifSmall" height="16" initial_value="false" label="Enable"
|
||||
left="4" mouse_opaque="true" name="enable_motionblur" width="200" />
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom_delta="-21" drop_shadow_visible="true" follows="left|top|right"
|
||||
font="SansSerif" h_pad="0" halign="left" height="16"
|
||||
left="10" mouse_opaque="true" name="MotionBlurText" v_pad="0"
|
||||
width="355">
|
||||
Motionblur Strength
|
||||
</text>
|
||||
<slider bottom_delta="-19" can_edit_text="true"
|
||||
decimal_digits="0" follows="left"
|
||||
height="18" increment="1" initial_val="8" label="" left="14"
|
||||
max_val="30" min_val="1" mouse_opaque="true"
|
||||
name="blur_strength" show_text="true" value="0.7" width="200" />
|
||||
</panel>
|
||||
<!--<panel border="true" bottom="-180" follows="left|top|right|bottom" height="400"
|
||||
label="Bloom" left="1" mouse_opaque="true"
|
||||
name="BloomPanel" width="398">
|
||||
|
||||
Reference in New Issue
Block a user