summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llprofiler.h1
-rw-r--r--indra/llrender/llrender.cpp61
-rw-r--r--indra/llrender/llrender.h3
-rw-r--r--indra/llrender/llrender2dutils.cpp2
-rw-r--r--indra/llrender/llrendertarget.cpp19
-rw-r--r--indra/llrender/llrendertarget.h4
-rw-r--r--indra/llrender/llshadermgr.cpp6
-rw-r--r--indra/llrender/llvertexbuffer.cpp145
-rw-r--r--indra/llrender/llvertexbuffer.h1
-rw-r--r--indra/llwindow/llopenglview-objc.mm106
-rw-r--r--indra/llwindow/llwindowmacosx.cpp1
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl1
-rw-r--r--indra/newview/llappviewer.cpp2
-rw-r--r--indra/newview/llfasttimerview.cpp2
-rw-r--r--indra/newview/llfloaterpreference.cpp1
-rw-r--r--indra/newview/llgltfmaterialpreviewmgr.cpp6
-rw-r--r--indra/newview/llmodelpreview.cpp12
-rw-r--r--indra/newview/llreflectionmapmanager.cpp181
-rw-r--r--indra/newview/llselectmgr.cpp2
-rw-r--r--indra/newview/llviewerdisplay.cpp5
-rw-r--r--indra/newview/llviewershadermgr.cpp14
-rw-r--r--indra/newview/llviewershadermgr.h607
-rw-r--r--indra/newview/llviewerwindow.cpp9
-rw-r--r--indra/newview/pipeline.cpp728
-rw-r--r--indra/newview/pipeline.h16
-rw-r--r--indra/newview/skins/default/xui/en/floater_about.xml5
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences.xml377
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml12
-rw-r--r--indra/newview/skins/default/xui/en/panel_performance_preferences.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_advanced.xml12
-rw-r--r--indra/newview/skins/default/xui/en/panel_snapshot_local.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_status_bar.xml412
33 files changed, 1397 insertions, 1372 deletions
diff --git a/indra/llcommon/llprofiler.h b/indra/llcommon/llprofiler.h
index d058f50c97..9267c5cbda 100644
--- a/indra/llcommon/llprofiler.h
+++ b/indra/llcommon/llprofiler.h
@@ -88,7 +88,6 @@ extern thread_local bool gProfilerEnabled;
#endif
-
#if LL_PROFILER_CONFIGURATION == LL_PROFILER_CONFIG_TRACY
#define LL_PROFILER_FRAME_END FrameMark
#define LL_PROFILER_SET_THREAD_NAME( name ) tracy::SetThreadName( name ); gProfilerEnabled = true;
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 5d26a69d7b..332d15f76c 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1,4 +1,4 @@
-/**
+ /**
* @file llrender.cpp
* @brief LLRender implementation
*
@@ -139,21 +139,21 @@ U32 LLTexUnit::getInternalType(eTextureType type)
void LLTexUnit::refreshState(void)
{
-// We set dirty to true so that the tex unit knows to ignore caching
-// and we reset the cached tex unit state
+ // We set dirty to true so that the tex unit knows to ignore caching
+ // and we reset the cached tex unit state
-gGL.flush();
+ gGL.flush();
-glActiveTexture(GL_TEXTURE0 + mIndex);
+ glActiveTexture(GL_TEXTURE0 + mIndex);
-if (mCurrTexType != TT_NONE)
-{
- glBindTexture(sGLTextureType[mCurrTexType], mCurrTexture);
-}
-else
-{
- glBindTexture(GL_TEXTURE_2D, 0);
-}
+ if (mCurrTexType != TT_NONE)
+ {
+ glBindTexture(sGLTextureType[mCurrTexType], mCurrTexture);
+ }
+ else
+ {
+ glBindTexture(GL_TEXTURE_2D, 0);
+ }
}
void LLTexUnit::activate(void)
@@ -662,12 +662,12 @@ void LLTexUnit::debugTextureUnit(void)
LLLightState::LLLightState(S32 index)
: mIndex(index),
-mEnabled(false),
-mConstantAtten(1.f),
-mLinearAtten(0.f),
-mQuadraticAtten(0.f),
-mSpotExponent(0.f),
-mSpotCutoff(180.f)
+ mEnabled(false),
+ mConstantAtten(1.f),
+ mLinearAtten(0.f),
+ mQuadraticAtten(0.f),
+ mSpotExponent(0.f),
+ mSpotCutoff(180.f)
{
if (mIndex == 0)
{
@@ -826,7 +826,7 @@ void LLLightState::setSpotDirection(const LLVector3& direction)
}
LLRender::LLRender()
-: mDirty(false),
+ : mDirty(false),
mCount(0),
mMode(LLRender::TRIANGLES),
mCurrTextureUnitIndex(0)
@@ -1457,7 +1457,7 @@ void LLRender::blendFunc(eBlendFactor sfactor, eBlendFactor dfactor)
}
void LLRender::blendFunc(eBlendFactor color_sfactor, eBlendFactor color_dfactor,
- eBlendFactor alpha_sfactor, eBlendFactor alpha_dfactor)
+ eBlendFactor alpha_sfactor, eBlendFactor alpha_dfactor)
{
llassert(color_sfactor < BF_UNDEF);
llassert(color_dfactor < BF_UNDEF);
@@ -1474,7 +1474,7 @@ void LLRender::blendFunc(eBlendFactor color_sfactor, eBlendFactor color_dfactor,
flush();
glBlendFuncSeparate(sGLBlendFactor[color_sfactor], sGLBlendFactor[color_dfactor],
- sGLBlendFactor[alpha_sfactor], sGLBlendFactor[alpha_dfactor]);
+ sGLBlendFactor[alpha_sfactor], sGLBlendFactor[alpha_dfactor]);
}
}
@@ -1612,8 +1612,8 @@ void LLRender::flush(std::string comment_)
{
if (mCount%3 != 0)
{
- count -= (mCount % 3);
- LL_WARNS() << "Incomplete triangle requested." << LL_ENDL;
+ count -= (mCount % 3);
+ LL_WARNS() << "Incomplete triangle requested." << LL_ENDL;
}
}
@@ -1667,6 +1667,11 @@ void LLRender::flush(std::string comment_)
}
}
+void LLRender::flush()
+{
+ flush("");
+}
+
LLVertexBuffer* LLRender::bufferfromCache(U32 attribute_mask, U32 count)
{
LLVertexBuffer *vb = nullptr;
@@ -1763,7 +1768,7 @@ LLVertexBuffer* LLRender::genBuffer(U32 attribute_mask, S32 count)
if(gGLManager.mIsApple && LLVertexBuffer::getVertexBufferMode() == 0)
{
- vb->unmapBuffer();
+ vb->unmapBuffer();
}
vb->unbind();
@@ -2132,9 +2137,9 @@ glm::vec3 mul_mat4_vec3(const glm::mat4& mat, const glm::vec3& vec)
#if 1 // SIMD path results in strange crashes. Fall back to scalar for now.
const float w = vec[0] * mat[0][3] + vec[1] * mat[1][3] + vec[2] * mat[2][3] + mat[3][3];
return glm::vec3(
- (vec[0] * mat[0][0] + vec[1] * mat[1][0] + vec[2] * mat[2][0] + mat[3][0]) / w,
- (vec[0] * mat[0][1] + vec[1] * mat[1][1] + vec[2] * mat[2][1] + mat[3][1]) / w,
- (vec[0] * mat[0][2] + vec[1] * mat[1][2] + vec[2] * mat[2][2] + mat[3][2]) / w
+ (vec[0] * mat[0][0] + vec[1] * mat[1][0] + vec[2] * mat[2][0] + mat[3][0]) / w,
+ (vec[0] * mat[0][1] + vec[1] * mat[1][1] + vec[2] * mat[2][1] + mat[3][1]) / w,
+ (vec[0] * mat[0][2] + vec[1] * mat[1][2] + vec[2] * mat[2][2] + mat[3][2]) / w
);
#else
LLVector4a x, y, z, s, t, p, q;
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index f0f9cd4364..a755ddd2b1 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -421,7 +421,8 @@ public:
LLVector3 getUITranslation();
LLVector3 getUIScale();
- void flush(std::string comment_ = "");
+ void flush(std::string comment_);
+ void flush();
// if list is set, will store buffers in list for later use, if list isn't set, will use cache
void beginList(std::list<LLVertexBufferData> *list);
diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp
index 0ee47dec6d..714df863cd 100644
--- a/indra/llrender/llrender2dutils.cpp
+++ b/indra/llrender/llrender2dutils.cpp
@@ -1801,10 +1801,12 @@ void LLRender2D::setLineWidth(F32 width)
// If outside the allowed range, glLineWidth fails with "invalid value".
// On Darwin, the range is [1, 1].
static GLfloat range[2]{0.0};
+#if GL_VERSION_1_2
if (range[1] == 0)
{
glGetFloatv(GL_SMOOTH_LINE_WIDTH_RANGE, range);
}
+#endif
width *= lerp(LLRender::sUIGLScaleFactor.mV[VX], LLRender::sUIGLScaleFactor.mV[VY], 0.5f);
glLineWidth(llclamp(width, range[0], range[1]));
}
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 4fd32620e1..e898e03feb 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -326,7 +326,6 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt)
{
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_MIRROR);
LOG_GLERROR(mName + " setting address mode to TAM_MIRROR");
-
}
else
#endif
@@ -367,7 +366,6 @@ bool LLRenderTarget::allocateDepth()
gGL.getTexUnit(0)->bindManual(mUsage, mDepth);
U32 internal_type = LLTexUnit::getInternalType(mUsage);
-
LLImageGL::setManualImage(internal_type, 0, GL_DEPTH_COMPONENT24, mResX, mResY, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL, false);
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
@@ -511,18 +509,17 @@ void LLRenderTarget::bindTarget(std::string name_, U32 mode_)
GL_COLOR_ATTACHMENT3};
if (mTex.empty())
- { //no color buffer to draw to
+ { //no color buffer to draw to
if(!mUseDepth) LL_WARNS() << mName << " HAS NO COLOR BUFFER AND NO DEPTH!!" << LL_ENDL;
- glDrawBuffer(GL_NONE);
+ GLenum buffers[] = {GL_NONE};
+ glDrawBuffers(0, buffers);
glReadBuffer(GL_NONE);
}
else if(mMode == 0)
{
glDrawBuffers(static_cast<GLsizei>(mTex.size()), drawbuffers);
glReadBuffer(GL_COLOR_ATTACHMENT0);
-
LOG_GLERROR(mName+" read and write buffers");
-
}
else if(mMode == 1)
{
@@ -532,7 +529,8 @@ void LLRenderTarget::bindTarget(std::string name_, U32 mode_)
}
else if(mMode == 2)
{
- glDrawBuffer(GL_NONE);
+ GLenum buffers[] = {GL_NONE};
+ glDrawBuffers(0, buffers);
glReadBuffer(GL_COLOR_ATTACHMENT0);
LOG_GLERROR(mName+" read buffer");
}
@@ -555,8 +553,11 @@ void LLRenderTarget::clear(U32 mask_in)
U32 mask = 0;
if(!mTex.empty()) mask |= GL_COLOR_BUFFER_BIT;
- if (mUseDepth) mask |= GL_DEPTH_BUFFER_BIT;
+ if (mUseDepth)
+ {
+ mask |= GL_DEPTH_BUFFER_BIT;
+ }
if (mFBO)
{
check_framebuffer_status();
@@ -724,4 +725,4 @@ U32 LLRenderTarget::getTarget()
else if(mMode == 2) target = GL_READ_FRAMEBUFFER;
return target;
-} \ No newline at end of file
+}
diff --git a/indra/llrender/llrendertarget.h b/indra/llrender/llrendertarget.h
index 583d0054ac..ce3025f280 100644
--- a/indra/llrender/llrendertarget.h
+++ b/indra/llrender/llrendertarget.h
@@ -33,9 +33,9 @@
#include "llrender.h"
/*
-Wrapper around OpenGL framebuffer objects for use in render-to-texture
+ Wrapper around OpenGL framebuffer objects for use in render-to-texture
-SAMPLE USAGE:
+ SAMPLE USAGE:
LLRenderTarget target;
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index fa1c686e8e..81d45bc431 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -451,7 +451,7 @@ void LLShaderMgr::dumpObjectLog(GLuint ret, bool warns, const std::string& filen
LL_SHADER_LOADING_WARNS() << "Shader loading from " << fname << LL_ENDL;
LL_SHADER_LOADING_WARNS() << "\n" << log << LL_ENDL;
}
-}
+ }
GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, std::map<std::string, std::string>* defines, S32 texture_index_channels)
{
@@ -740,7 +740,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
//copy file into memory
enum {
- flag_write_to_out_of_extra_block_area = 0x01
+ flag_write_to_out_of_extra_block_area = 0x01
, flag_extra_block_marker_was_found = 0x02
};
@@ -756,7 +756,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
#endif
while(NULL != fgets((char *)buff, 1024, file)
- && shader_code_count < (LL_ARRAY_SIZE(shader_code_text) - LL_ARRAY_SIZE(extra_code_text)))
+ && shader_code_count < (LL_ARRAY_SIZE(shader_code_text) - LL_ARRAY_SIZE(extra_code_text)))
{
file_lines_count++;
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 040dde7317..1bd7a57cd9 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -354,7 +354,6 @@ public:
{ //allocate a new buffer
LL_PROFILE_GPU_ZONE("vbo alloc");
-
data = (U8*) ll_aligned_malloc_16(size);
if (type == GL_ARRAY_BUFFER)
@@ -382,7 +381,6 @@ public:
}
mAllocated -= size;
-
if (name)
{
delete_buffers(1, &name);
@@ -1396,12 +1394,12 @@ void LLVertexBuffer::flush_vbo(GLenum target, U32 start, U32 end, void* data, U8
else
{
//LL_WARNS() << "flush_vbo mode 0" << LL_ENDL;
- // on OS X, flush_vbo doesn't actually write to the GL buffer, so be sure to call
- // _mapBuffer to tag the buffer for flushing to GL
- _mapBuffer();
- LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb memcpy");
- // copy into mapped buffer
- memcpy(dst+start, data, end-start+1);
+ // on OS X, flush_vbo doesn't actually write to the GL buffer, so be sure to call
+ // _mapBuffer to tag the buffer for flushing to GL
+ _mapBuffer();
+ LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb memcpy");
+ // copy into mapped buffer
+ memcpy(dst+start, data, end-start+1);
}
}
else
@@ -1706,7 +1704,9 @@ void LLVertexBuffer::setBuffer()
U32 data_mask = LLGLSLShader::sCurBoundShaderPtr->mAttributeMask;
// this Vertex Buffer must provide all necessary attributes for currently bound shader
- llassert_msg((data_mask & mTypeMask) == data_mask, "Attribute mask mismatch! mTypeMask should be a superset of data_mask. data_mask: 0x" << std::hex << data_mask << " mTypeMask: 0x" << mTypeMask << " Missing: 0x" << (data_mask & ~mTypeMask) << std::dec);
+ llassert_msg((data_mask & mTypeMask) == data_mask,
+ "Attribute mask mismatch! mTypeMask should be a superset of data_mask. data_mask: 0x"
+ << std::hex << data_mask << " mTypeMask: 0x" << mTypeMask << " Missing: 0x" << (data_mask & ~mTypeMask) << std::dec);
if (sGLRenderBuffer != mGLBuffer)
{
@@ -1742,80 +1742,70 @@ void LLVertexBuffer::setupVertexBuffer()
LOG_GLERROR("LLVertexBuffer::setupVertexBuffer()");
U8* base = nullptr;
- AttributeType loc;
- void* ptr = nullptr;
-
U32 data_mask = LLGLSLShader::sCurBoundShaderPtr->mAttributeMask;
- if (data_mask & MAP_VERTEX)
- {
- loc = TYPE_VERTEX;
- ptr = (void*)(base + mOffsets[TYPE_VERTEX]);
- glVertexAttribPointer(loc, 3, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_VERTEX], ptr);
-
- LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_VERTEX");
- }
-
if (data_mask & MAP_NORMAL)
{
- loc = TYPE_NORMAL;
- ptr = (void*)(base + mOffsets[TYPE_NORMAL]);
+ AttributeType loc = TYPE_NORMAL;
+ void* ptr = (void*)(base + mOffsets[TYPE_NORMAL]);
glVertexAttribPointer(loc, 3, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_NORMAL], ptr);
LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_NORMAL");
}
-
- if (data_mask & MAP_TEXCOORD0)
+ if (data_mask & MAP_TEXCOORD3)
{
- loc = TYPE_TEXCOORD0;
- //glEnableVertexAttribArray(loc);
- ptr = (void*)(base + mOffsets[TYPE_TEXCOORD0]);
- glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD0], ptr);
+ AttributeType loc = TYPE_TEXCOORD3;
+ void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD3]);
+ glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD3], ptr);
- LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_TEXCOORD0");
+ LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_TEXCOORD3");
}
+ if (data_mask & MAP_TEXCOORD2)
+ {
+ AttributeType loc = TYPE_TEXCOORD2;
+ void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD2]);
+ glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD2], ptr);
+ LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_TEXCOORD2");
+ }
if (data_mask & MAP_TEXCOORD1)
{
- loc = TYPE_TEXCOORD1;
- ptr = (void*)(base + mOffsets[TYPE_TEXCOORD1]);
+ AttributeType loc = TYPE_TEXCOORD1;
+ void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD1]);
glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD1], ptr);
LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_TEXCOORD1");
}
-
- if (data_mask & MAP_TEXCOORD2)
+ if (data_mask & MAP_TANGENT)
{
- loc = TYPE_TEXCOORD2;
- ptr = (void*)(base + mOffsets[TYPE_TEXCOORD2]);
- glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD2], ptr);
+ AttributeType loc = TYPE_TANGENT;
+ void* ptr = (void*)(base + mOffsets[TYPE_TANGENT]);
+ glVertexAttribPointer(loc, 4, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TANGENT], ptr);
- LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_TEXCOORD2");
+ LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_TANGENT");
}
-
- if (data_mask & MAP_TEXCOORD3)
+ if (data_mask & MAP_TEXCOORD0)
{
- loc = TYPE_TEXCOORD3;
- ptr = (void*)(base + mOffsets[TYPE_TEXCOORD3]);
- glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD3], ptr);
+ AttributeType loc = TYPE_TEXCOORD0;
+ //glEnableVertexAttribArray(loc);
+ void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD0]);
+ glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD0], ptr);
- LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_TEXCOORD3");
+ LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_TEXCOORD0");
}
-
if (data_mask & MAP_COLOR)
{
- loc = TYPE_COLOR;
+ AttributeType loc = TYPE_COLOR;
//bind emissive instead of color pointer if emissive is present
- ptr = (data_mask & MAP_EMISSIVE) ? (void*)(base + mOffsets[TYPE_EMISSIVE]) : (void*)(base + mOffsets[TYPE_COLOR]);
+ void* ptr = (data_mask & MAP_EMISSIVE) ? (void*)(base + mOffsets[TYPE_EMISSIVE]) : (void*)(base + mOffsets[TYPE_COLOR]);
glVertexAttribPointer(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_COLOR], ptr);
LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_COLOR");
}
-
if (data_mask & MAP_EMISSIVE)
{
- loc = TYPE_EMISSIVE;
- ptr = (void*)(base + mOffsets[TYPE_EMISSIVE]);
+ AttributeType loc = TYPE_EMISSIVE;
+ void* ptr = (void*)(base + mOffsets[TYPE_EMISSIVE]);
glVertexAttribPointer(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_EMISSIVE], ptr);
LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_EMISSIVE");
@@ -1828,60 +1818,55 @@ void LLVertexBuffer::setupVertexBuffer()
LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_COLOR");
}
}
-
- if (data_mask & MAP_TANGENT)
- {
- loc = TYPE_TANGENT;
- ptr = (void*)(base + mOffsets[TYPE_TANGENT]);
- glVertexAttribPointer(loc, 4, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TANGENT], ptr);
-
- LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_TANGENT");
- }
-
if (data_mask & MAP_WEIGHT)
{
- loc = TYPE_WEIGHT;
- ptr = (void*)(base + mOffsets[TYPE_WEIGHT]);
+ AttributeType loc = TYPE_WEIGHT;
+ void* ptr = (void*)(base + mOffsets[TYPE_WEIGHT]);
glVertexAttribPointer(loc, 1, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT], ptr);
LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_WEIGHT");
}
-
if (data_mask & MAP_WEIGHT4)
{
- loc = TYPE_WEIGHT4;
- ptr = (void*)(base + mOffsets[TYPE_WEIGHT4]);
+ AttributeType loc = TYPE_WEIGHT4;
+ void* ptr = (void*)(base + mOffsets[TYPE_WEIGHT4]);
glVertexAttribPointer(loc, 4, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT4], ptr);
LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_WEIGHT4");
}
+ if (data_mask & MAP_JOINT)
+ {
+ AttributeType loc = TYPE_JOINT;
+ void* ptr = (void*)(base + mOffsets[TYPE_JOINT]);
+ glVertexAttribIPointer(loc, 4, GL_UNSIGNED_SHORT, LLVertexBuffer::sTypeSize[TYPE_JOINT], ptr);
+ LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_JOINT");
+ }
if (data_mask & MAP_CLOTHWEIGHT)
{
- loc = TYPE_CLOTHWEIGHT;
- ptr = (void*)(base + mOffsets[TYPE_CLOTHWEIGHT]);
+ AttributeType loc = TYPE_CLOTHWEIGHT;
+ void* ptr = (void*)(base + mOffsets[TYPE_CLOTHWEIGHT]);
glVertexAttribPointer(loc, 4, GL_FLOAT, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_CLOTHWEIGHT], ptr);
LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_CLOTHWEIGHT");
}
- if (data_mask & MAP_JOINT)
- {
- loc = TYPE_JOINT;
- ptr = (void*)(base + mOffsets[TYPE_JOINT]);
- glVertexAttribIPointer(loc, 4, GL_UNSIGNED_SHORT, LLVertexBuffer::sTypeSize[TYPE_JOINT], ptr);
-
- LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_JOINT");
- }
-
if (data_mask & MAP_TEXTURE_INDEX)
{
- loc = TYPE_TEXTURE_INDEX;
- ptr = (void*)(base + mOffsets[TYPE_VERTEX] + 12);
+ AttributeType loc = TYPE_TEXTURE_INDEX;
+ void* ptr = (void*)(base + mOffsets[TYPE_VERTEX] + 12);
glVertexAttribIPointer(loc, 1, GL_UNSIGNED_INT, LLVertexBuffer::sTypeSize[TYPE_VERTEX], ptr);
LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_TEXTURE_INDEX");
}
+ if (data_mask & MAP_VERTEX)
+ {
+ AttributeType loc = TYPE_VERTEX;
+ void* ptr = (void*)(base + mOffsets[TYPE_VERTEX]);
+ glVertexAttribPointer(loc, 3, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_VERTEX], ptr);
+
+ LOG_GLERROR("LLVertexBuffer::setupVertexBuffer TYPE_VERTEX");
+ }
}
void LLVertexBuffer::setPositionData(const LLVector4a* data)
@@ -1995,3 +1980,7 @@ void LLVertexBuffer::setIndexData(const U32* data, U32 offset, U32 count)
}
flush_vbo(GL_ELEMENT_ARRAY_BUFFER, offset * sizeof(U32), (offset + count) * sizeof(U32) - 1, (U8*)data, mMappedIndexData);
}
+
+
+
+
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index 4239477b8d..bf5f2b5ab6 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -130,7 +130,6 @@ public:
static U32 getVertexBufferMode();
-
//WARNING -- when updating these enums you MUST
// 1 - update LLVertexBuffer::sTypeSize
// 2 - update LLVertexBuffer::vb_type_name
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm
index 577311bf49..e8276e523f 100644
--- a/indra/llwindow/llopenglview-objc.mm
+++ b/indra/llwindow/llopenglview-objc.mm
@@ -65,16 +65,16 @@ attributedStringInfo getSegments(NSAttributedString *str)
segment_standouts seg_standouts;
NSRange effectiveRange;
NSRange limitRange = NSMakeRange(0, [str length]);
-
+
while (limitRange.length > 0) {
NSNumber *attr = [str attribute:NSUnderlineStyleAttributeName atIndex:limitRange.location longestEffectiveRange:&effectiveRange inRange:limitRange];
limitRange = NSMakeRange(NSMaxRange(effectiveRange), NSMaxRange(limitRange) - NSMaxRange(effectiveRange));
-
+
if (effectiveRange.length <= 0)
{
effectiveRange.length = 1;
}
-
+
if ([attr integerValue] == 2)
{
seg_lengths.push_back(effectiveRange.length);
@@ -97,12 +97,12 @@ attributedStringInfo getSegments(NSAttributedString *str)
+ (NSScreen *)currentScreenForMouseLocation
{
NSPoint mouseLocation = [NSEvent mouseLocation];
-
+
NSEnumerator *screenEnumerator = [[NSScreen screens] objectEnumerator];
NSScreen *screen;
while ((screen = [screenEnumerator nextObject]) && !NSMouseInRect(mouseLocation, screen.frame, NO))
;
-
+
return screen;
}
@@ -111,7 +111,7 @@ attributedStringInfo getSegments(NSAttributedString *str)
{
float normalizedX = fabs(fabs(self.frame.origin.x) - fabs(aPoint.x));
float normalizedY = aPoint.y - self.frame.origin.y;
-
+
return NSMakePoint(normalizedX, normalizedY);
}
@@ -154,7 +154,7 @@ attributedStringInfo getSegments(NSAttributedString *str)
{
vram_megabytes = 256;
}
-
+
return (unsigned long)vram_megabytes; // return value is in megabytes.
}
@@ -169,15 +169,15 @@ attributedStringInfo getSegments(NSAttributedString *str)
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(windowResized:) name:NSWindowDidResizeNotification
object:[self window]];
-
+
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(windowWillMiniaturize:) name:NSWindowWillMiniaturizeNotification
object:[self window]];
-
+
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(windowDidDeminiaturize:) name:NSWindowDidDeminiaturizeNotification
object:[self window]];
-
+
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(windowDidBecomeKey:) name:NSWindowDidBecomeKeyNotification
object:[self window]];
@@ -253,19 +253,21 @@ attributedStringInfo getSegments(NSAttributedString *str)
{
[self registerForDraggedTypes:[NSArray arrayWithObject:NSURLPboardType]];
[self initWithFrame:frame];
-
+
// Initialize with a default "safe" pixel format that will work with versions dating back to OS X 10.6.
// Any specialized pixel formats, i.e. a core profile pixel format, should be initialized through rebuildContextWithFormat.
// 10.7 and 10.8 don't really care if we're defining a profile or not. If we don't explicitly request a core or legacy profile, it'll always assume a legacy profile (for compatibility reasons).
NSOpenGLPixelFormatAttribute SDRAttrs[] = {
- NSOpenGLPFADoubleBuffer,
- NSOpenGLPFASampleBuffers, 0,
- NSOpenGLPFASamples, 0,
- NSOpenGLPFAStencilSize, 8,
- NSOpenGLPFADepthSize, 24,
- NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion4_1Core,
- 0};
-
+ NSOpenGLPFADoubleBuffer,
+ NSOpenGLPFASampleBuffers, 0,
+ NSOpenGLPFASamples, 0,
+ NSOpenGLPFAStencilSize, 8,
+ NSOpenGLPFADepthSize, 24,
+ NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion4_1Core,
+ 0
+ };
+
+
NSOpenGLPixelFormatAttribute HDRAttrs[] = {
NSOpenGLPFADoubleBuffer,
NSOpenGLPFASampleBuffers, 0,
@@ -304,15 +306,15 @@ attributedStringInfo getSegments(NSAttributedString *str)
NSLog(@"Failed to create pixel format!", nil);
return nil;
}
-
+
NSOpenGLContext *glContext = [[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext:nil];
-
+
if (glContext == nil)
{
NSLog(@"Failed to create OpenGL context!", nil);
return nil;
}
-
+
[self setPixelFormat:pixelFormat];
if(mHDRDisplay)
@@ -330,11 +332,11 @@ attributedStringInfo getSegments(NSAttributedString *str)
[self setWantsBestResolutionOpenGLSurface:gHiDPISupport];
[self setOpenGLContext:glContext];
-
+
[glContext setView:self];
-
+
[glContext makeCurrentContext];
-
+
if (vsync)
{
GLint value = 1;
@@ -346,9 +348,9 @@ attributedStringInfo getSegments(NSAttributedString *str)
GLint swapInterval=0;
[glContext setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval];
}
-
+
mOldResize = false;
-
+
return self;
}
@@ -360,16 +362,16 @@ attributedStringInfo getSegments(NSAttributedString *str)
- (BOOL) rebuildContextWithFormat:(NSOpenGLPixelFormat *)format
{
NSOpenGLContext *ctx = [self openGLContext];
-
+
[ctx clearDrawable];
[ctx initWithFormat:format shareContext:nil];
-
+
if (ctx == nil)
{
NSLog(@"Failed to create OpenGL context!", nil);
return false;
}
-
+
[self setOpenGLContext:ctx];
[ctx setView:self];
[ctx makeCurrentContext];
@@ -456,9 +458,9 @@ attributedStringInfo getSegments(NSAttributedString *str)
float(dev_delta.x),
float(dev_delta.y)
};
-
+
callDeltaUpdate(mouseDeltas, 0);
-
+
NSPoint mPoint = gHiDPISupport ? [self convertPointToBacking:[theEvent locationInWindow]] : [theEvent locationInWindow];
mMousePos[0] = mPoint.x;
mMousePos[1] = mPoint.y;
@@ -480,9 +482,9 @@ attributedStringInfo getSegments(NSAttributedString *str)
float(dev_delta.x),
float(dev_delta.y)
};
-
+
callDeltaUpdate(mouseDeltas, 0);
-
+
NSPoint mPoint = gHiDPISupport ? [self convertPointToBacking:[theEvent locationInWindow]] : [theEvent locationInWindow];
mMousePos[0] = mPoint.x;
mMousePos[1] = mPoint.y;
@@ -512,7 +514,7 @@ attributedStringInfo getSegments(NSAttributedString *str)
- (void) otherMouseDragged:(NSEvent *)theEvent
{
- [self mouseDragged:theEvent];
+ [self mouseDragged:theEvent];
}
- (void) scrollWheel:(NSEvent *)theEvent
@@ -536,7 +538,7 @@ attributedStringInfo getSegments(NSAttributedString *str)
{
NativeKeyEventData eventData = extractKeyDataFromKeyEvent(theEvent);
eventData.mKeyEvent = NativeKeyEventData::KEYDOWN;
-
+
uint keycode = [theEvent keyCode];
// We must not depend on flagsChange event to detect modifier flags changed,
// must depend on the modifire flags in the event parameter.
@@ -570,13 +572,13 @@ attributedStringInfo getSegments(NSAttributedString *str)
- (void)flagsChanged:(NSEvent *)theEvent
{
NativeKeyEventData eventData = extractKeyDataFromModifierEvent(theEvent);
-
+
mModifiers = [theEvent modifierFlags];
callModifier([theEvent modifierFlags]);
-
+
NSInteger mask = 0;
switch([theEvent keyCode])
- {
+ {
case 56:
mask = NSShiftKeyMask;
break;
@@ -587,9 +589,9 @@ attributedStringInfo getSegments(NSAttributedString *str)
mask = NSControlKeyMask;
break;
default:
- return;
+ return;
}
-
+
if (mModifiers & mask)
{
eventData.mKeyEvent = NativeKeyEventData::KEYDOWN;
@@ -608,7 +610,7 @@ attributedStringInfo getSegments(NSAttributedString *str)
{
eventData.mKeyEvent = NativeKeyEventData::KEYUP;
callKeyUp(&eventData, [theEvent keyCode], 0);
- }
+ }
}
- (BOOL) acceptsFirstResponder
@@ -620,11 +622,11 @@ attributedStringInfo getSegments(NSAttributedString *str)
{
NSPasteboard *pboard;
NSDragOperation sourceDragMask;
-
+
sourceDragMask = [sender draggingSourceOperationMask];
-
+
pboard = [sender draggingPasteboard];
-
+
if ([[pboard types] containsObject:NSURLPboardType])
{
if (sourceDragMask & NSDragOperationLink) {
@@ -639,7 +641,7 @@ attributedStringInfo getSegments(NSAttributedString *str)
- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender
{
callHandleDragUpdated(mLastDraggedUrl);
-
+
return NSDragOperationLink;
}
@@ -693,12 +695,12 @@ attributedStringInfo getSegments(NSAttributedString *str)
unsigned(selectedRange.location),
unsigned(selectedRange.length)
};
-
+
unsigned int replacement[2] = {
unsigned(replacementRange.location),
unsigned(replacementRange.length)
};
-
+
int string_length = [aString length];
unichar *text = new unichar[string_length];
attributedStringInfo segments;
@@ -799,7 +801,7 @@ attributedStringInfo getSegments(NSAttributedString *str)
return;
}
}
-
+
@try
{
if (!mHasMarkedText)
@@ -812,7 +814,7 @@ attributedStringInfo getSegments(NSAttributedString *str)
resetPreedit();
// We may never get this point since unmarkText may be called before insertText ever gets called once we submit our text.
// But just in case...
-
+
for (NSInteger i = 0; i < [aString length]; i++)
{
handleUnicodeCharacter([aString characterAtIndex:i]);
@@ -958,10 +960,10 @@ attributedStringInfo getSegments(NSAttributedString *str)
NSPoint screenPoint = [[view window] convertBaseToScreen:windowPoint];
NSPoint flippedScreenPoint = [currentScreen flipPoint:screenPoint];
flippedScreenPoint.y += [currentScreen frame].origin.y;
-
+
return flippedScreenPoint;
}
-
+
return NSZeroPoint;
}
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index febb43a49b..3aca4660f3 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -38,7 +38,6 @@
#include "lldir.h"
#include "indra_constants.h"
-
#include <OpenGL/OpenGL.h>
#include <Carbon/Carbon.h>
#include <CoreServices/CoreServices.h>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 297ef0e011..dbd2ddcc3b 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -11565,6 +11565,17 @@
<key>Value</key>
<integer>75</integer>
</map>
+ <key>SnapshotTimestamp</key>
+ <map>
+ <key>Comment</key>
+ <string>Add timestamp to snapshot file names</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>AbuseReportScreenshotDelay</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl
index 8ee53e3ae4..c05b4eed7a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl
@@ -79,7 +79,6 @@ void main()
vec4 diff = texture(diffuseRect, vary_fragcoord.xy);
#ifdef HAS_NOISE
-
vec2 tc = vary_fragcoord.xy*screen_res*4.0;
vec3 seed = (diff.rgb+vec3(1.0))*vec3(tc.xy, tc.x+tc.y);
vec3 nz = vec3(noise(seed.rg), noise(seed.gb), noise(seed.rb));
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index dfffdbf482..48e2631d8b 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1304,7 +1304,7 @@ void LLAppViewer::initMaxHeapSize()
F32Gigabytes max_heap_size_gb = (F32Gigabytes)gSavedSettings.getF32("MaxHeapSize") ;
#else
*/
-F32Gigabytes max_heap_size_gb = (F32Gigabytes)gSavedSettings.getF32("MaxHeapSize64");
+ F32Gigabytes max_heap_size_gb = (F32Gigabytes)gSavedSettings.getF32("MaxHeapSize64");
/*
#endif
*/
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 1618d91b98..ac052d35e4 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -403,7 +403,7 @@ void LLFastTimerView::draw()
legend_panel->localRectToOtherView(legend_panel->getLocalRect(), &mLegendRect, this);
// Draw the window background
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gl_rect_2d(getLocalRect(), LLColor4(0.f, 0.f, 0.f, 0.25f));
drawHelp(getRect().getHeight() - MARGIN);
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index d0d5305b0c..5b94051e33 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -2649,7 +2649,6 @@ void LLPanelPreferenceGraphics3::onMPRecommanded()
gSavedSettings.setBOOL("RenderAnisotropic", false);
-
// Shadows
gSavedSettings.setS32("RenderShadowDetail", 0);
diff --git a/indra/newview/llgltfmaterialpreviewmgr.cpp b/indra/newview/llgltfmaterialpreviewmgr.cpp
index daa3d62efe..0b792efa1f 100644
--- a/indra/newview/llgltfmaterialpreviewmgr.cpp
+++ b/indra/newview/llgltfmaterialpreviewmgr.cpp
@@ -527,9 +527,9 @@ bool LLGLTFPreviewTexture::render()
if (hdr)
{
- gPipeline.copyScreenSpaceReflections(&screen, &gPipeline.mSceneMap);
- gPipeline.generateLuminance(&screen, &gPipeline.mLuminanceMap);
- gPipeline.generateExposure(&gPipeline.mLuminanceMap, &gPipeline.mExposureMap, /*use_history = */ false);
+ gPipeline.copyScreenSpaceReflections(&screen, &gPipeline.mSceneMap);
+ gPipeline.generateLuminance(&screen, &gPipeline.mLuminanceMap);
+ gPipeline.generateExposure(&gPipeline.mLuminanceMap, &gPipeline.mExposureMap, /*use_history = */ false);
}
U16 activeRT = 0;
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp
index 4d27e3d92e..01d4ccecdd 100644
--- a/indra/newview/llmodelpreview.cpp
+++ b/indra/newview/llmodelpreview.cpp
@@ -3717,10 +3717,14 @@ bool LLModelPreview::render()
buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0);
gGL.diffuseColor4fv(PREVIEW_PSYH_EDGE_COL.mV);
+#if GL_VERSION_1_1
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+#endif
buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0);
+#if GL_VERSION_1_1
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+#endif
buffer->unmapBuffer();
}
@@ -3732,7 +3736,9 @@ bool LLModelPreview::render()
// only do this if mDegenerate was set in the preceding mesh checks [Check this if the ordering ever breaks]
if (mHasDegenerate)
{
+#if GL_VERSION_1_1
glPointSize(PREVIEW_DEG_POINT_SIZE);
+#endif
gPipeline.enableLightsFullbright();
//show degenerate triangles
LLGLDepthTest depth(GL_TRUE, GL_TRUE, GL_ALWAYS);
@@ -3802,7 +3808,9 @@ bool LLModelPreview::render()
gGL.popMatrix();
}
//glLineWidth(1.f);
+#if GL_VERSION_1_1
glPointSize(1.f);
+#endif
gPipeline.enableLightsPreview();
gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
@@ -3924,9 +3932,13 @@ bool LLModelPreview::render()
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.diffuseColor4fv(PREVIEW_EDGE_COL.mV);
//glLineWidth(PREVIEW_EDGE_WIDTH);
+#if GL_VERSION_1_1
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+#endif
buffer->draw(LLRender::TRIANGLES, buffer->getNumIndices(), 0);
+#if GL_VERSION_1_1
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+#endif
}
}
}
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp
index 68a849714c..2ddb749141 100644
--- a/indra/newview/llreflectionmapmanager.cpp
+++ b/indra/newview/llreflectionmapmanager.cpp
@@ -445,18 +445,15 @@ void LLReflectionMapManager::update()
d.setSub(camera_pos, probe->mOrigin);
probe->mDistance = d.getLength3().getF32() - probe->mRadius;
}
+ else if (mDefaultProbe->mComplete)
+ {
+ // make default probe have a distance of 64m for the purposes of prioritization (if it's already been generated once)
+ probe->mDistance = 64.f;
+ }
else
{
- if (mDefaultProbe->mComplete)
- {
- // make default probe have a distance of 64m for the purposes of prioritization (if it's already been generated once)
- probe->mDistance = 64.f;
- }
- else
- {
- probe->mNextUpdateTime = 0.f;
- probe->mDistance = -4096.f; //boost priority of default probe when it's not complete
- }
+ probe->mNextUpdateTime = 0.f;
+ probe->mDistance = -4096.f; //boost priority of default probe when it's not complete
}
if (probe->mComplete)
@@ -487,7 +484,7 @@ void LLReflectionMapManager::update()
(oldestProbe == nullptr ||
check_priority(probe, oldestProbe)))
{
- oldestProbe = probe;
+ oldestProbe = probe;
}
}
@@ -541,7 +538,7 @@ void LLReflectionMapManager::update()
}
else if (sLevel > 0)
{ // when probes are enabled don't update the default probe less often than the prescribed update period
- oldestProbe = mDefaultProbe;
+ oldestProbe = mDefaultProbe;
}
// switch to updating the next oldest probe
@@ -559,10 +556,10 @@ void LLReflectionMapManager::update()
if(shouldUpdate)
{
- probe->autoAdjustOrigin();
+ probe->autoAdjustOrigin();
- sUpdateCount++;
- mUpdatingProbe = probe;
+ sUpdateCount++;
+ mUpdatingProbe = probe;
if(probe->mCompletedCount < 2)
{
@@ -573,7 +570,7 @@ void LLReflectionMapManager::update()
probe->mNextUpdateTime = gFrameTimeSeconds + fmax( (F32)sMPUpdatePeriod, 0.25);
}
- doProbeUpdate();
+ doProbeUpdate();
}
}
@@ -813,11 +810,8 @@ void LLReflectionMapManager::doProbeUpdate()
{
mUpdatingProbe->mViewerObject->setDebugText(llformat("%.1f", (F32)gFrameTimeSeconds), LLColor4(1, 1, 1, 1));
}
-
updateNeighbors(mUpdatingProbe);
-
mUpdatingFace = 0;
-
if (isRadiancePass())
{
mUpdatingProbe->mComplete = true;
@@ -836,7 +830,7 @@ void LLReflectionMapManager::doProbeUpdate()
if (debug_updates)
{
- mUpdatingProbe->mViewerObject->setDebugText(llformat("%.1f", (F32)gFrameTimeSeconds), LLColor4(1, 1, 0, 1));
+ mUpdatingProbe->mViewerObject->setDebugText(llformat("%.1f", (F32)gFrameTimeSeconds), LLColor4(1, 1, 0, 1));
}
}
}
@@ -896,7 +890,6 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face, b
LLGLDisable blend(GL_BLEND);
// downsample to placeholder map
-
{
gGL.matrixMode(gGL.MM_MODELVIEW);
gGL.pushMatrix();
@@ -941,10 +934,10 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face, b
screen_rt->flush();
}
+
S32 mips = (S32)(log2((F32)mProbeResolution) + 0.5f);
gReflectionMipProgram.bind();
-
S32 diffuseChannel = gReflectionMipProgram.enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, LLTexUnit::TT_TEXTURE);
for (int i = 0; i < mMipChain.size(); ++i)
@@ -963,6 +956,7 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face, b
gGL.getTexUnit(diffuseChannel)->bind(&(mMipChain[i - 1]));
}
+
gReflectionMipProgram.uniform1f(resScale, 1.f/(mProbeResolution*2));
gPipeline.mScreenTriangleVB->setBuffer();
@@ -1002,8 +996,8 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face, b
if(isRadiancePass()) updateProbeRadianceOnFace(probe, face, sourceIdx);
}
- // if(isRadiancePass()) updateProbeRadianceOnFace(probe, face, sourceIdx);
- //else updateProbeIrradianceOnFace(probe, face, sourceIdx);
+ // if(isRadiancePass()) updateProbeRadianceOnFace(probe, face, sourceIdx);
+ // else updateProbeIrradianceOnFace(probe, face, sourceIdx);
}
// ===================== IRRADIANCE ================================
@@ -1036,8 +1030,10 @@ void LLReflectionMapManager::updateProbeIrradiance(LLReflectionMap* probe)
gIrradianceGenProgram.bind();
+#if GL_VERSION_4_0
S32 channel = gIrradianceGenProgram.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY);
mTexture->bind(channel);
+#endif
gIrradianceGenProgram.uniform1i(sSourceIdx, sourceIdx);
gIrradianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_MAX_LOD, mMaxProbeLOD);
@@ -1072,10 +1068,11 @@ void LLReflectionMapManager::updateProbeIrradiance(LLReflectionMap* probe)
mVertexBuffer->drawArrays(gGL.TRIANGLE_STRIP, 0, 4);
S32 res = mMipChain[i].getWidth();
-
+#if GL_VERSION_4_0
mIrradianceMaps->bind(channel);
glCopyTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, i - start_mip, 0, 0, probe->mCubeIndex * 6 + cf, 0, 0, res, res);
mTexture->bind(channel);
+#endif
//mMipChain[0].clear(0);
}
@@ -1114,46 +1111,48 @@ void LLReflectionMapManager::updateProbeRadiance(LLReflectionMap* probe)
gRadianceGenProgram.bind();
mVertexBuffer->setBuffer();
- S32 channel = gRadianceGenProgram.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY);
- mTexture->bind(channel);
-
- gRadianceGenProgram.uniform1i(sSourceIdx, sourceIdx);
- gRadianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_MAX_LOD, mMaxProbeLOD);
- gRadianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_STRENGTH, 1.f);
- gRadianceGenProgram.uniform1i(sWidth, mProbeResolution);
+#if GL_VERSION_4_0
+ S32 channel = gRadianceGenProgram.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY);
+ mTexture->bind(channel);
+#endif
+ gRadianceGenProgram.uniform1i(sSourceIdx, sourceIdx);
+ gRadianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_MAX_LOD, mMaxProbeLOD);
+ gRadianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_STRENGTH, 1.f);
+ gRadianceGenProgram.uniform1i(sWidth, mProbeResolution);
- U32 res = mMipChain[0].getWidth();
-
- for (int i = 0; i < mMipChain.size(); ++i)
- {
- glViewport(0, 0, res, res);
+ U32 res = mMipChain[0].getWidth();
+ for (int i = 0; i < mMipChain.size(); ++i)
+ {
+ glViewport(0, 0, res, res);
- gRadianceGenProgram.uniform1f(sMipLevel, (GLfloat)i);
- gRadianceGenProgram.uniform1f(sRoughness, (F32)i / (F32)(mMipChain.size() - 1));
+ gRadianceGenProgram.uniform1f(sMipLevel, (GLfloat)i);
+ gRadianceGenProgram.uniform1f(sRoughness, (F32)i / (F32)(mMipChain.size() - 1));
- for (int cf = 0; cf < 6; ++cf)
- {
- LLCoordFrame frame;
- frame.lookAt(LLVector3(0, 0, 0), LLCubeMapArray::sClipToCubeLookVecs[cf], LLCubeMapArray::sClipToCubeUpVecs[cf]);
+ for (int cf = 0; cf < 6; ++cf)
+ {
+ LLCoordFrame frame;
+ frame.lookAt(LLVector3(0, 0, 0), LLCubeMapArray::sClipToCubeLookVecs[cf], LLCubeMapArray::sClipToCubeUpVecs[cf]);
- F32 mat[16];
- frame.getOpenGLRotation(mat);
- gGL.loadMatrix(mat);
+ F32 mat[16];
+ frame.getOpenGLRotation(mat);
+ gGL.loadMatrix(mat);
- mVertexBuffer->drawArrays(gGL.TRIANGLE_STRIP, 0, 4);
+ mVertexBuffer->drawArrays(gGL.TRIANGLE_STRIP, 0, 4);
- glCopyTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, i, 0, 0, probe->mCubeIndex * 6 + cf, 0, 0, res, res);
- LOG_GLERROR("glCopyTexSubImage3D");
- }
+#if GL_VERSION_4_0
+ glCopyTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, i, 0, 0, probe->mCubeIndex * 6 + cf, 0, 0, res, res);
+#endif
+ LOG_GLERROR("glCopyTexSubImage3D");
+ }
- if (i != mMipChain.size() - 1)
- {
- res /= 2;
- }
+ if (i != mMipChain.size() - 1)
+ {
+ res /= 2;
+ }
}
- gRadianceGenProgram.unbind();
+ gRadianceGenProgram.unbind();
mMipChain[0].flush();
//mTexture->unbind();
}
@@ -1180,48 +1179,52 @@ void LLReflectionMapManager::updateProbeIrradianceOnFace(LLReflectionMap* probe,
mMipChain[0].bindTarget("irradiance", 0);
//mMipChain[0].clear();
- gIrradianceGenProgram.bind();
+ gIrradianceGenProgram.bind();
- S32 channel = gIrradianceGenProgram.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY);
- mTexture->bind(channel);
+#if GL_VERSION_4_0
+ S32 channel = gIrradianceGenProgram.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY);
+ mTexture->bind(channel);
+#endif
- gIrradianceGenProgram.uniform1i(sSourceIdx, sourceIdx);
- gIrradianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_MAX_LOD, mMaxProbeLOD);
+ gIrradianceGenProgram.uniform1i(sSourceIdx, sourceIdx);
+ gIrradianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_MAX_LOD, mMaxProbeLOD);
- mVertexBuffer->setBuffer();
+ mVertexBuffer->setBuffer();
+ int start_mip = 0;
+ // find the mip target to start with based on irradiance map resolution
+ for (start_mip = 0; start_mip < mMipChain.size(); ++start_mip)
+ {
+ if (mMipChain[start_mip].getWidth() == LL_IRRADIANCE_MAP_RESOLUTION)
+ {
+ break;
+ }
+ }
- int start_mip = 0;
- // find the mip target to start with based on irradiance map resolution
- for (start_mip = 0; start_mip < mMipChain.size(); ++start_mip)
- {
- if (mMipChain[start_mip].getWidth() == LL_IRRADIANCE_MAP_RESOLUTION)
- {
- break;
- }
- }
+ int i = start_mip;
+ glViewport(0, 0, mMipChain[i].getWidth(), mMipChain[i].getHeight());
- int i = start_mip;
- glViewport(0, 0, mMipChain[i].getWidth(), mMipChain[i].getHeight());
+ int cf = face;
+ {
+ LLCoordFrame frame;
+ frame.lookAt(LLVector3(0, 0, 0), LLCubeMapArray::sClipToCubeLookVecs[cf], LLCubeMapArray::sClipToCubeUpVecs[cf]);
- int cf = face;
- {
- LLCoordFrame frame;
- frame.lookAt(LLVector3(0, 0, 0), LLCubeMapArray::sClipToCubeLookVecs[cf], LLCubeMapArray::sClipToCubeUpVecs[cf]);
+ F32 mat[16];
+ frame.getOpenGLRotation(mat);
+ gGL.loadMatrix(mat);
- F32 mat[16];
- frame.getOpenGLRotation(mat);
- gGL.loadMatrix(mat);
+ mVertexBuffer->drawArrays(gGL.TRIANGLE_STRIP, 0, 4);
- mVertexBuffer->drawArrays(gGL.TRIANGLE_STRIP, 0, 4);
+#if GL_VERSION_4_0
+ S32 res = mMipChain[i].getWidth();
+ mIrradianceMaps->bind(channel);
+ glCopyTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, i - start_mip, 0, 0, probe->mCubeIndex * 6 + cf, 0, 0, res, res);
+#endif
+ }
- S32 res = mMipChain[i].getWidth();
- mIrradianceMaps->bind(channel);
- glCopyTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, i - start_mip, 0, 0, probe->mCubeIndex * 6 + cf, 0, 0, res, res);
- }
+ mMipChain[0].flush();
- mMipChain[0].flush();
- gIrradianceGenProgram.unbind();
- mTexture->unbind();
+ gIrradianceGenProgram.unbind();
+ mTexture->unbind();
}
void LLReflectionMapManager::updateProbeRadianceOnFace(LLReflectionMap* probe, U32 face, S32 sourceIdx)
@@ -1388,7 +1391,6 @@ void LLReflectionMapManager::updateUniforms()
LLSettingsSky::ptr_t psky = environment.getCurrentSky();
static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", false);
-
F32 minimum_ambiance = psky->getReflectionProbeAmbiance(should_auto_adjust);
bool is_ambiance_pass = gCubeSnapshot && !isRadiancePass();
@@ -1740,9 +1742,11 @@ void LLReflectionMapManager::initReflectionMaps()
else
{
mTexture = new LLCubeMapArray();
+
// store mReflectionProbeCount+2 cube maps, final two cube maps are used for render target and radiance map generation
// source)
mTexture->allocate(mProbeResolution, 3, mReflectionProbeCount + 2, true, render_hdr);
+
mIrradianceMaps = new LLCubeMapArray();
mIrradianceMaps->allocate(LL_IRRADIANCE_MAP_RESOLUTION, 3, mReflectionProbeCount, false, render_hdr);
}
@@ -1793,7 +1797,6 @@ void LLReflectionMapManager::initReflectionMaps()
mDefaultProbe->mNextUpdateTime = 0.f;
touch_default_probe(mDefaultProbe);
-
}
if (mVertexBuffer.isNull())
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 183a9a9924..95474a8aaa 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -6532,7 +6532,9 @@ void LLSelectMgr::renderSilhouettes(bool for_hud)
gGL.popMatrix();
//glLineWidth(1.f);
+#if GL_VERSION_1_1
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+#endif
if (shader)
{
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index bd1fc46f5d..5183370076 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1077,8 +1077,6 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot)
LLSceneMonitor::getInstance()->capture();
}
-
-
// =========== RENDER UI =============
LLAppViewer::instance()->pingMainloopTimeout("Display:RenderUI");
@@ -1245,7 +1243,7 @@ void display_cube_face()
gGL.setColorMask(true, true);
- glClearColor(0, 0, 0, 0);
+ glClearColor(0.f, 0.f, 0.f, 0.f);
//gPipeline.generateSunShadow(*LLViewerCamera::getInstance());
glClear(GL_DEPTH_BUFFER_BIT); // | GL_STENCIL_BUFFER_BIT);
@@ -1539,7 +1537,6 @@ void render_ui(F32 zoom_factor, int subfield)
LL_PROFILE_ZONE_NAMED_CATEGORY_UI("HUD");
render_hud_elements();
LLGLState::checkStates();
-
render_hud_attachments();
LLGLState::checkStates();
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 18407b5b43..43cb7d8a14 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -804,7 +804,7 @@ std::string LLViewerShaderMgr::loadBasicShaders()
S32 probe_level = llclamp(gSavedSettings.getS32("RenderReflectionProbeLevel"), 0, 3);
- S32 shadow_detail = gSavedSettings.getS32("RenderShadowDetail");
+ S32 shadow_detail = gSavedSettings.getS32("RenderShadowDetail");
if (shadow_detail >= 1)
{
@@ -2554,9 +2554,9 @@ bool LLViewerShaderMgr::loadShadersDeferred()
if (success && gGLManager.mGLVersion > 3.9f)
{
std::vector<std::pair<std::string, std::string>> quality_levels = { {"12", "Low"},
- {"23", "Medium"},
- {"28", "High"},
- {"39", "Ultra"} };
+ {"23", "Medium"},
+ {"28", "High"},
+ {"39", "Ultra"} };
int i = 0;
bool failed = false;
for (const auto& quality_pair : quality_levels)
@@ -2607,9 +2607,9 @@ bool LLViewerShaderMgr::loadShadersDeferred()
if (gGLManager.mGLVersion > 3.15f && success)
{
std::vector<std::pair<std::string, std::string>> quality_levels = { {"SMAA_PRESET_LOW", "Low"},
- {"SMAA_PRESET_MEDIUM", "Medium"},
- {"SMAA_PRESET_HIGH", "High"},
- {"SMAA_PRESET_ULTRA", "Ultra"} };
+ {"SMAA_PRESET_MEDIUM", "Medium"},
+ {"SMAA_PRESET_HIGH", "High"},
+ {"SMAA_PRESET_ULTRA", "Ultra"} };
int i = 0;
bool failed = false;
for (const auto& smaa_pair : quality_levels)
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index 62ed963749..7f989f281e 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -24,307 +24,306 @@
* $/LicenseInfo$
*/
- #ifndef LL_VIEWER_SHADER_MGR_H
- #define LL_VIEWER_SHADER_MGR_H
-
- #include "llshadermgr.h"
- #include "llmaterial.h"
-
- #define LL_DEFERRED_MULTI_LIGHT_COUNT 16
-
- class LLViewerShaderMgr: public LLShaderMgr
- {
- public:
- static bool sInitialized;
- static bool sSkipReload;
-
- LLViewerShaderMgr();
- /* virtual */ ~LLViewerShaderMgr();
-
- // Add shaders to mShaderList for later uniform propagation
- // Will assert on redundant shader entries in debug builds
- void finalizeShaderList();
-
- // singleton pattern implementation
- static LLViewerShaderMgr * instance();
- static void releaseInstance();
-
- void initAttribsAndUniforms(void);
- void setShaders();
- void unloadShaders();
- S32 getShaderLevel(S32 type);
-
- // loadBasicShaders in case of a failure returns
- // name of a file error happened at, otherwise
- // returns an empty string
- std::string loadBasicShaders();
- bool loadShadersEffects();
- bool loadShadersDeferred();
- bool loadShadersObject();
- bool loadShadersAvatar();
- bool loadShadersWater();
- bool loadShadersInterface();
-
- std::vector<S32> mShaderLevel;
- S32 mMaxAvatarShaderLevel;
-
- enum EShaderClass
- {
- SHADER_LIGHTING,
- SHADER_OBJECT,
- SHADER_AVATAR,
- SHADER_ENVIRONMENT,
- SHADER_INTERFACE,
- SHADER_EFFECT,
- SHADER_WINDLIGHT,
- SHADER_WATER,
- SHADER_DEFERRED,
- SHADER_COUNT
- };
-
- // simple model of forward iterator
- // http://www.sgi.com/tech/stl/ForwardIterator.html
- class shader_iter
- {
- private:
- friend bool operator == (shader_iter const & a, shader_iter const & b);
- friend bool operator != (shader_iter const & a, shader_iter const & b);
-
- typedef std::vector<LLGLSLShader *>::const_iterator base_iter_t;
- public:
- shader_iter()
- {
- }
-
- shader_iter(base_iter_t iter) : mIter(iter)
- {
- }
-
- LLGLSLShader & operator * () const
- {
- return **mIter;
- }
-
- LLGLSLShader * operator -> () const
- {
- return *mIter;
- }
-
- shader_iter & operator++ ()
- {
- ++mIter;
- return *this;
- }
-
- shader_iter operator++ (int)
- {
- return mIter++;
- }
-
- private:
- base_iter_t mIter;
- };
-
- shader_iter beginShaders() const;
- shader_iter endShaders() const;
-
- /* virtual */ std::string getShaderDirPrefix(void);
-
- /* virtual */ void updateShaderUniforms(LLGLSLShader * shader);
-
- private:
- // the list of shaders we need to propagate parameters to.
- std::vector<LLGLSLShader *> mShaderList;
-
- }; //LLViewerShaderMgr
-
- inline bool operator == (LLViewerShaderMgr::shader_iter const & a, LLViewerShaderMgr::shader_iter const & b)
- {
- return a.mIter == b.mIter;
- }
-
- inline bool operator != (LLViewerShaderMgr::shader_iter const & a, LLViewerShaderMgr::shader_iter const & b)
- {
- return a.mIter != b.mIter;
- }
-
- extern LLVector4 gShinyOrigin;
-
- //utility shaders
- extern LLGLSLShader gOcclusionProgram;
- extern LLGLSLShader gOcclusionCubeProgram;
- extern LLGLSLShader gGlowCombineProgram;
- extern LLGLSLShader gReflectionMipProgram;
- extern LLGLSLShader gGaussianProgram;
- extern LLGLSLShader gRadianceGenProgram;
- extern LLGLSLShader gHeroRadianceGenProgram;
- extern LLGLSLShader gIrradianceGenProgram;
- extern LLGLSLShader gGlowCombineFXAAProgram;
- extern LLGLSLShader gDebugProgram;
- enum NormalDebugShaderVariant : S32
- {
- NORMAL_DEBUG_SHADER_DEFAULT,
- NORMAL_DEBUG_SHADER_WITH_TANGENTS,
- NORMAL_DEBUG_SHADER_COUNT
- };
- extern LLGLSLShader gNormalDebugProgram[NORMAL_DEBUG_SHADER_COUNT];
- extern LLGLSLShader gSkinnedNormalDebugProgram[NORMAL_DEBUG_SHADER_COUNT];
- extern LLGLSLShader gClipProgram;
- extern LLGLSLShader gBenchmarkProgram;
- extern LLGLSLShader gReflectionProbeDisplayProgram;
- extern LLGLSLShader gCopyProgram;
- extern LLGLSLShader gCopyDepthProgram;
- extern LLGLSLShader gPBRTerrainBakeProgram;
- extern LLGLSLShader gDrawColorProgram;
-
- //output tex0[tc0] - tex1[tc1]
- extern LLGLSLShader gTwoTextureCompareProgram;
- //discard some fragments based on user-set color tolerance
- extern LLGLSLShader gOneTextureFilterProgram;
-
-
- //object shaders
- extern LLGLSLShader gObjectPreviewProgram;
- extern LLGLSLShader gPhysicsPreviewProgram;
- extern LLGLSLShader gObjectBumpProgram;
- extern LLGLSLShader gSkinnedObjectBumpProgram;
- extern LLGLSLShader gObjectAlphaMaskNoColorProgram;
-
- //environment shaders
- extern LLGLSLShader gWaterProgram;
- extern LLGLSLShader gUnderWaterProgram;
- extern LLGLSLShader gGlowProgram;
- extern LLGLSLShader gGlowExtractProgram;
-
- //interface shaders
- extern LLGLSLShader gHighlightProgram;
- extern LLGLSLShader gHighlightNormalProgram;
- extern LLGLSLShader gHighlightSpecularProgram;
-
- extern LLGLSLShader gDeferredHighlightProgram;
-
- extern LLGLSLShader gPathfindingProgram;
- extern LLGLSLShader gPathfindingNoNormalsProgram;
-
- // avatar shader handles
- extern LLGLSLShader gAvatarProgram;
- extern LLGLSLShader gAvatarEyeballProgram;
- extern LLGLSLShader gImpostorProgram;
-
- // Post Process Shaders
- extern LLGLSLShader gPostScreenSpaceReflectionProgram;
-
- // Deferred rendering shaders
- extern LLGLSLShader gDeferredImpostorProgram;
- extern LLGLSLShader gDeferredDiffuseProgram;
- extern LLGLSLShader gDeferredDiffuseAlphaMaskProgram;
- extern LLGLSLShader gDeferredNonIndexedDiffuseAlphaMaskProgram;
- extern LLGLSLShader gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram;
- extern LLGLSLShader gDeferredNonIndexedDiffuseProgram;
- extern LLGLSLShader gDeferredBumpProgram;
- extern LLGLSLShader gDeferredTerrainProgram;
- extern LLGLSLShader gDeferredTreeProgram;
- extern LLGLSLShader gDeferredTreeShadowProgram;
- extern LLGLSLShader gDeferredLightProgram;
- extern LLGLSLShader gDeferredMultiLightProgram[LL_DEFERRED_MULTI_LIGHT_COUNT];
- extern LLGLSLShader gDeferredSpotLightProgram;
- extern LLGLSLShader gDeferredMultiSpotLightProgram;
- extern LLGLSLShader gDeferredSunProgram;
- extern LLGLSLShader gDeferredSunProbeProgram;
- extern LLGLSLShader gHazeProgram;
- extern LLGLSLShader gHazeWaterProgram;
- extern LLGLSLShader gDeferredBlurLightProgram;
- extern LLGLSLShader gDeferredAvatarProgram;
- extern LLGLSLShader gDeferredSoftenProgram;
- extern LLGLSLShader gDeferredShadowProgram;
- extern LLGLSLShader gDeferredShadowCubeProgram;
- extern LLGLSLShader gDeferredShadowAlphaMaskProgram;
- extern LLGLSLShader gDeferredShadowGLTFAlphaMaskProgram;
- extern LLGLSLShader gDeferredShadowGLTFAlphaBlendProgram;
- extern LLGLSLShader gDeferredShadowFullbrightAlphaMaskProgram;
- extern LLGLSLShader gDeferredPostProgram;
- extern LLGLSLShader gDeferredCoFProgram;
- extern LLGLSLShader gDeferredDoFCombineProgram;
- extern LLGLSLShader gFXAAProgram[4];
- extern LLGLSLShader gSMAAEdgeDetectProgram[4];
- extern LLGLSLShader gSMAABlendWeightsProgram[4];
- extern LLGLSLShader gSMAANeighborhoodBlendProgram[4];
- extern LLGLSLShader gCASProgram;
- extern LLGLSLShader gDeferredPostNoDoFProgram;
- extern LLGLSLShader gDeferredPostNoDoFNoiseProgram;
- extern LLGLSLShader gDeferredPostGammaCorrectProgram;
- extern LLGLSLShader gLegacyPostGammaCorrectProgram;
- extern LLGLSLShader gHDRGammaCorrectProgram;
- extern LLGLSLShader gDeferredPostTonemapProgram;
- extern LLGLSLShader gNoPostTonemapProgram;
- extern LLGLSLShader gExposureProgram;
- extern LLGLSLShader gExposureProgramNoFade;
- extern LLGLSLShader gLuminanceProgram;
- extern LLGLSLShader gDeferredAvatarShadowProgram;
- extern LLGLSLShader gDeferredAvatarAlphaShadowProgram;
- extern LLGLSLShader gDeferredAvatarAlphaMaskShadowProgram;
- extern LLGLSLShader gDeferredAlphaProgram;
- extern LLGLSLShader gHUDAlphaProgram;
- extern LLGLSLShader gDeferredAlphaImpostorProgram;
- extern LLGLSLShader gDeferredFullbrightProgram;
- extern LLGLSLShader gHUDFullbrightProgram;
- extern LLGLSLShader gDeferredFullbrightAlphaMaskProgram;
- extern LLGLSLShader gHUDFullbrightAlphaMaskProgram;
- extern LLGLSLShader gDeferredFullbrightAlphaMaskAlphaProgram;
- extern LLGLSLShader gHUDFullbrightAlphaMaskAlphaProgram;
- extern LLGLSLShader gDeferredEmissiveProgram;
- extern LLGLSLShader gDeferredAvatarEyesProgram;
- extern LLGLSLShader gDeferredAvatarAlphaProgram;
- extern LLGLSLShader gEnvironmentMapProgram;
- extern LLGLSLShader gDeferredWLSkyProgram;
- extern LLGLSLShader gDeferredWLCloudProgram;
- extern LLGLSLShader gDeferredWLSunProgram;
- extern LLGLSLShader gDeferredWLMoonProgram;
- extern LLGLSLShader gDeferredStarProgram;
- extern LLGLSLShader gDeferredFullbrightShinyProgram;
- extern LLGLSLShader gHUDFullbrightShinyProgram;
- extern LLGLSLShader gNormalMapGenProgram;
- extern LLGLSLShader gDeferredGenBrdfLutProgram;
- extern LLGLSLShader gDeferredBufferVisualProgram;
-
- // Deferred materials shaders
- extern LLGLSLShader gDeferredMaterialProgram[LLMaterial::SHADER_COUNT*2];
-
- extern LLGLSLShader gHUDPBROpaqueProgram;
- extern LLGLSLShader gPBRGlowProgram;
- extern LLGLSLShader gDeferredPBROpaqueProgram;
- extern LLGLSLShader gDeferredPBRAlphaProgram;
- extern LLGLSLShader gHUDPBRAlphaProgram;
-
- // GLTF shaders
- extern LLGLSLShader gGLTFPBRMetallicRoughnessProgram;
-
- extern LLGLSLShader gBloomExtractProgram;
- extern LLGLSLShader gBloomBlurProgram;
- extern LLGLSLShader gBloomCombineProgram;
-
-
- // Encodes detail level for dropping textures, in accordance with the GLTF spec where possible
- // 0 is highest detail, -1 drops emissive, etc
- // Dropping metallic roughness is off-spec - Reserve for potato machines as needed
- // https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#additional-textures
- enum TerrainPBRDetail : S32
- {
- TERRAIN_PBR_DETAIL_MAX = 0,
- TERRAIN_PBR_DETAIL_EMISSIVE = 0,
- TERRAIN_PBR_DETAIL_OCCLUSION = -1,
- TERRAIN_PBR_DETAIL_NORMAL = -2,
- TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS = -3,
- TERRAIN_PBR_DETAIL_BASE_COLOR = -4,
- TERRAIN_PBR_DETAIL_MIN = -4,
- };
- enum TerrainPaintType : U32
- {
- // Use LLVLComposition::mDatap (heightmap) generated by generateHeights, plus noise from TERRAIN_ALPHARAMP
- TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE = 0,
- // Use paint map if PBR terrain, otherwise fall back to TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE
- TERRAIN_PAINT_TYPE_PBR_PAINTMAP = 1,
- TERRAIN_PAINT_TYPE_COUNT = 2,
- };
- extern LLGLSLShader gDeferredPBRTerrainProgram[TERRAIN_PAINT_TYPE_COUNT];
- #endif
+#ifndef LL_VIEWER_SHADER_MGR_H
+#define LL_VIEWER_SHADER_MGR_H
+
+#include "llshadermgr.h"
+#include "llmaterial.h"
+
+#define LL_DEFERRED_MULTI_LIGHT_COUNT 16
+
+class LLViewerShaderMgr: public LLShaderMgr
+{
+public:
+ static bool sInitialized;
+ static bool sSkipReload;
+
+ LLViewerShaderMgr();
+ /* virtual */ ~LLViewerShaderMgr();
+
+ // Add shaders to mShaderList for later uniform propagation
+ // Will assert on redundant shader entries in debug builds
+ void finalizeShaderList();
+
+ // singleton pattern implementation
+ static LLViewerShaderMgr * instance();
+ static void releaseInstance();
+
+ void initAttribsAndUniforms(void);
+ void setShaders();
+ void unloadShaders();
+ S32 getShaderLevel(S32 type);
+
+ // loadBasicShaders in case of a failure returns
+ // name of a file error happened at, otherwise
+ // returns an empty string
+ std::string loadBasicShaders();
+ bool loadShadersEffects();
+ bool loadShadersDeferred();
+ bool loadShadersObject();
+ bool loadShadersAvatar();
+ bool loadShadersWater();
+ bool loadShadersInterface();
+
+ std::vector<S32> mShaderLevel;
+ S32 mMaxAvatarShaderLevel;
+
+ enum EShaderClass
+ {
+ SHADER_LIGHTING,
+ SHADER_OBJECT,
+ SHADER_AVATAR,
+ SHADER_ENVIRONMENT,
+ SHADER_INTERFACE,
+ SHADER_EFFECT,
+ SHADER_WINDLIGHT,
+ SHADER_WATER,
+ SHADER_DEFERRED,
+ SHADER_COUNT
+ };
+
+ // simple model of forward iterator
+ // http://www.sgi.com/tech/stl/ForwardIterator.html
+ class shader_iter
+ {
+ private:
+ friend bool operator == (shader_iter const & a, shader_iter const & b);
+ friend bool operator != (shader_iter const & a, shader_iter const & b);
+
+ typedef std::vector<LLGLSLShader *>::const_iterator base_iter_t;
+ public:
+ shader_iter()
+ {
+ }
+
+ shader_iter(base_iter_t iter) : mIter(iter)
+ {
+ }
+
+ LLGLSLShader & operator * () const
+ {
+ return **mIter;
+ }
+
+ LLGLSLShader * operator -> () const
+ {
+ return *mIter;
+ }
+
+ shader_iter & operator++ ()
+ {
+ ++mIter;
+ return *this;
+ }
+
+ shader_iter operator++ (int)
+ {
+ return mIter++;
+ }
+
+ private:
+ base_iter_t mIter;
+ };
+
+ shader_iter beginShaders() const;
+ shader_iter endShaders() const;
+
+ /* virtual */ std::string getShaderDirPrefix(void);
+
+ /* virtual */ void updateShaderUniforms(LLGLSLShader * shader);
+
+private:
+ // the list of shaders we need to propagate parameters to.
+ std::vector<LLGLSLShader *> mShaderList;
+
+}; //LLViewerShaderMgr
+
+inline bool operator == (LLViewerShaderMgr::shader_iter const & a, LLViewerShaderMgr::shader_iter const & b)
+{
+ return a.mIter == b.mIter;
+}
+
+inline bool operator != (LLViewerShaderMgr::shader_iter const & a, LLViewerShaderMgr::shader_iter const & b)
+{
+ return a.mIter != b.mIter;
+}
+
+extern LLVector4 gShinyOrigin;
+
+//utility shaders
+extern LLGLSLShader gOcclusionProgram;
+extern LLGLSLShader gOcclusionCubeProgram;
+extern LLGLSLShader gGlowCombineProgram;
+extern LLGLSLShader gReflectionMipProgram;
+extern LLGLSLShader gGaussianProgram;
+extern LLGLSLShader gRadianceGenProgram;
+extern LLGLSLShader gHeroRadianceGenProgram;
+extern LLGLSLShader gIrradianceGenProgram;
+extern LLGLSLShader gGlowCombineFXAAProgram;
+extern LLGLSLShader gDebugProgram;
+enum NormalDebugShaderVariant : S32
+{
+ NORMAL_DEBUG_SHADER_DEFAULT,
+ NORMAL_DEBUG_SHADER_WITH_TANGENTS,
+ NORMAL_DEBUG_SHADER_COUNT
+};
+extern LLGLSLShader gNormalDebugProgram[NORMAL_DEBUG_SHADER_COUNT];
+extern LLGLSLShader gSkinnedNormalDebugProgram[NORMAL_DEBUG_SHADER_COUNT];
+extern LLGLSLShader gClipProgram;
+extern LLGLSLShader gBenchmarkProgram;
+extern LLGLSLShader gReflectionProbeDisplayProgram;
+extern LLGLSLShader gCopyProgram;
+extern LLGLSLShader gCopyDepthProgram;
+extern LLGLSLShader gPBRTerrainBakeProgram;
+extern LLGLSLShader gDrawColorProgram;
+
+//output tex0[tc0] - tex1[tc1]
+extern LLGLSLShader gTwoTextureCompareProgram;
+//discard some fragments based on user-set color tolerance
+extern LLGLSLShader gOneTextureFilterProgram;
+
+
+//object shaders
+extern LLGLSLShader gObjectPreviewProgram;
+extern LLGLSLShader gPhysicsPreviewProgram;
+extern LLGLSLShader gObjectBumpProgram;
+extern LLGLSLShader gSkinnedObjectBumpProgram;
+extern LLGLSLShader gObjectAlphaMaskNoColorProgram;
+
+//environment shaders
+extern LLGLSLShader gWaterProgram;
+extern LLGLSLShader gUnderWaterProgram;
+extern LLGLSLShader gGlowProgram;
+extern LLGLSLShader gGlowExtractProgram;
+
+//interface shaders
+extern LLGLSLShader gHighlightProgram;
+extern LLGLSLShader gHighlightNormalProgram;
+extern LLGLSLShader gHighlightSpecularProgram;
+
+extern LLGLSLShader gDeferredHighlightProgram;
+
+extern LLGLSLShader gPathfindingProgram;
+extern LLGLSLShader gPathfindingNoNormalsProgram;
+
+// avatar shader handles
+extern LLGLSLShader gAvatarProgram;
+extern LLGLSLShader gAvatarEyeballProgram;
+extern LLGLSLShader gImpostorProgram;
+
+// Post Process Shaders
+extern LLGLSLShader gPostScreenSpaceReflectionProgram;
+
+// Deferred rendering shaders
+extern LLGLSLShader gDeferredImpostorProgram;
+extern LLGLSLShader gDeferredDiffuseProgram;
+extern LLGLSLShader gDeferredDiffuseAlphaMaskProgram;
+extern LLGLSLShader gDeferredNonIndexedDiffuseAlphaMaskProgram;
+extern LLGLSLShader gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram;
+extern LLGLSLShader gDeferredNonIndexedDiffuseProgram;
+extern LLGLSLShader gDeferredBumpProgram;
+extern LLGLSLShader gDeferredTerrainProgram;
+extern LLGLSLShader gDeferredTreeProgram;
+extern LLGLSLShader gDeferredTreeShadowProgram;
+extern LLGLSLShader gDeferredLightProgram;
+extern LLGLSLShader gDeferredMultiLightProgram[LL_DEFERRED_MULTI_LIGHT_COUNT];
+extern LLGLSLShader gDeferredSpotLightProgram;
+extern LLGLSLShader gDeferredMultiSpotLightProgram;
+extern LLGLSLShader gDeferredSunProgram;
+extern LLGLSLShader gDeferredSunProbeProgram;
+extern LLGLSLShader gHazeProgram;
+extern LLGLSLShader gHazeWaterProgram;
+extern LLGLSLShader gDeferredBlurLightProgram;
+extern LLGLSLShader gDeferredAvatarProgram;
+extern LLGLSLShader gDeferredSoftenProgram;
+extern LLGLSLShader gDeferredShadowProgram;
+extern LLGLSLShader gDeferredShadowCubeProgram;
+extern LLGLSLShader gDeferredShadowAlphaMaskProgram;
+extern LLGLSLShader gDeferredShadowGLTFAlphaMaskProgram;
+extern LLGLSLShader gDeferredShadowGLTFAlphaBlendProgram;
+extern LLGLSLShader gDeferredShadowFullbrightAlphaMaskProgram;
+extern LLGLSLShader gDeferredPostProgram;
+extern LLGLSLShader gDeferredCoFProgram;
+extern LLGLSLShader gDeferredDoFCombineProgram;
+extern LLGLSLShader gFXAAProgram[4];
+extern LLGLSLShader gSMAAEdgeDetectProgram[4];
+extern LLGLSLShader gSMAABlendWeightsProgram[4];
+extern LLGLSLShader gSMAANeighborhoodBlendProgram[4];
+extern LLGLSLShader gCASProgram;
+extern LLGLSLShader gDeferredPostNoDoFProgram;
+extern LLGLSLShader gDeferredPostNoDoFNoiseProgram;
+extern LLGLSLShader gDeferredPostGammaCorrectProgram;
+extern LLGLSLShader gLegacyPostGammaCorrectProgram;
+extern LLGLSLShader gHDRGammaCorrectProgram;
+extern LLGLSLShader gDeferredPostTonemapProgram;
+extern LLGLSLShader gNoPostTonemapProgram;
+extern LLGLSLShader gExposureProgram;
+extern LLGLSLShader gExposureProgramNoFade;
+extern LLGLSLShader gLuminanceProgram;
+extern LLGLSLShader gDeferredAvatarShadowProgram;
+extern LLGLSLShader gDeferredAvatarAlphaShadowProgram;
+extern LLGLSLShader gDeferredAvatarAlphaMaskShadowProgram;
+extern LLGLSLShader gDeferredAlphaProgram;
+extern LLGLSLShader gHUDAlphaProgram;
+extern LLGLSLShader gDeferredAlphaImpostorProgram;
+extern LLGLSLShader gDeferredFullbrightProgram;
+extern LLGLSLShader gHUDFullbrightProgram;
+extern LLGLSLShader gDeferredFullbrightAlphaMaskProgram;
+extern LLGLSLShader gHUDFullbrightAlphaMaskProgram;
+extern LLGLSLShader gDeferredFullbrightAlphaMaskAlphaProgram;
+extern LLGLSLShader gHUDFullbrightAlphaMaskAlphaProgram;
+extern LLGLSLShader gDeferredEmissiveProgram;
+extern LLGLSLShader gDeferredAvatarEyesProgram;
+extern LLGLSLShader gDeferredAvatarAlphaProgram;
+extern LLGLSLShader gEnvironmentMapProgram;
+extern LLGLSLShader gDeferredWLSkyProgram;
+extern LLGLSLShader gDeferredWLCloudProgram;
+extern LLGLSLShader gDeferredWLSunProgram;
+extern LLGLSLShader gDeferredWLMoonProgram;
+extern LLGLSLShader gDeferredStarProgram;
+extern LLGLSLShader gDeferredFullbrightShinyProgram;
+extern LLGLSLShader gHUDFullbrightShinyProgram;
+extern LLGLSLShader gNormalMapGenProgram;
+extern LLGLSLShader gDeferredGenBrdfLutProgram;
+extern LLGLSLShader gDeferredBufferVisualProgram;
+
+// Deferred materials shaders
+extern LLGLSLShader gDeferredMaterialProgram[LLMaterial::SHADER_COUNT*2];
+
+extern LLGLSLShader gHUDPBROpaqueProgram;
+extern LLGLSLShader gPBRGlowProgram;
+extern LLGLSLShader gDeferredPBROpaqueProgram;
+extern LLGLSLShader gDeferredPBRAlphaProgram;
+extern LLGLSLShader gHUDPBRAlphaProgram;
+
+// GLTF shaders
+extern LLGLSLShader gGLTFPBRMetallicRoughnessProgram;
+
+extern LLGLSLShader gBloomExtractProgram;
+extern LLGLSLShader gBloomBlurProgram;
+extern LLGLSLShader gBloomCombineProgram;
+
+// Encodes detail level for dropping textures, in accordance with the GLTF spec where possible
+// 0 is highest detail, -1 drops emissive, etc
+// Dropping metallic roughness is off-spec - Reserve for potato machines as needed
+// https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#additional-textures
+enum TerrainPBRDetail : S32
+{
+ TERRAIN_PBR_DETAIL_MAX = 0,
+ TERRAIN_PBR_DETAIL_EMISSIVE = 0,
+ TERRAIN_PBR_DETAIL_OCCLUSION = -1,
+ TERRAIN_PBR_DETAIL_NORMAL = -2,
+ TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS = -3,
+ TERRAIN_PBR_DETAIL_BASE_COLOR = -4,
+ TERRAIN_PBR_DETAIL_MIN = -4,
+};
+enum TerrainPaintType : U32
+{
+ // Use LLVLComposition::mDatap (heightmap) generated by generateHeights, plus noise from TERRAIN_ALPHARAMP
+ TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE = 0,
+ // Use paint map if PBR terrain, otherwise fall back to TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE
+ TERRAIN_PAINT_TYPE_PBR_PAINTMAP = 1,
+ TERRAIN_PAINT_TYPE_COUNT = 2,
+};
+extern LLGLSLShader gDeferredPBRTerrainProgram[TERRAIN_PAINT_TYPE_COUNT];
+#endif
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 82246b564c..cde6d0c1dc 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1966,7 +1966,6 @@ LLViewerWindow::LLViewerWindow(const Params& p)
//
LL_DEBUGS("Window") << "Loading feature tables." << LL_ENDL;
-
// Initialize OpenGL Renderer
LLVertexBuffer::initClass(mWindow, gSavedSettings.getU32("MPVertexBufferMode"));
@@ -4831,13 +4830,21 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save
auto err = 0;
auto extension("." + image->getExtension());
auto now = LLDate::now();
+ static LLCachedControl<bool> snapshot_timestamp(gSavedSettings, "SnapshotTimestamp", true);
do
{
filepath = sSnapshotDir;
filepath += gDirUtilp->getDirDelimiter();
filepath += sSnapshotBaseName;
+ if (snapshot_timestamp)
+ {
filepath += now.toLocalDateString("_%Y-%m-%d_%H%M%S");
filepath += llformat("%.2d", i);
+ }
+ else if (is_snapshot_name_loc_set)
+ {
+ filepath += llformat("_%.3d", i);
+ }
filepath += extension;
llstat stat_info;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 996221fdba..800ed79d8a 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1,28 +1,28 @@
/**
-* @file pipeline.cpp
-* @brief Rendering pipeline.
-*
-* $LicenseInfo:firstyear=2005&license=viewerlgpl$
-* Second Life Viewer Source Code
-* Copyright (C) 2010, Linden Research, Inc.
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation;
-* version 2.1 of the License only.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*
-* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
-* $/LicenseInfo$
-*/
+ * @file pipeline.cpp
+ * @brief Rendering pipeline.
+ *
+ * $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
#include "llviewerprecompiledheaders.h"
@@ -1581,7 +1581,7 @@ void LLPipeline::restoreGL()
if (part)
{
part->restoreGL();
- }
+ }
}
}
}
@@ -2117,7 +2117,7 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list)
{
LL_PROFILE_ZONE_SCOPED;
for (LLDrawable::drawable_vector_t::iterator iter = moved_list.begin();
- iter != moved_list.end(); )
+ iter != moved_list.end(); )
{
LLDrawable::drawable_vector_t::iterator curiter = iter++;
LLDrawable *drawablep = *curiter;
@@ -2783,7 +2783,7 @@ void LLPipeline::clearRebuildGroups()
mGroupQ1Locked = true;
// Iterate through all drawables on the priority build queue,
for (LLSpatialGroup::sg_vector_t::iterator iter = mGroupQ1.begin();
- iter != mGroupQ1.end(); ++iter)
+ iter != mGroupQ1.end(); ++iter)
{
LLSpatialGroup* group = *iter;
@@ -2811,7 +2811,7 @@ void LLPipeline::clearRebuildDrawables()
{
// Clear all drawables on the priority build queue,
for (LLDrawable::drawable_list_t::iterator iter = mBuildQ1.begin();
- iter != mBuildQ1.end(); ++iter)
+ iter != mBuildQ1.end(); ++iter)
{
LLDrawable* drawablep = *iter;
if (drawablep && !drawablep->isDead())
@@ -2823,7 +2823,7 @@ void LLPipeline::clearRebuildDrawables()
//clear all moving bridges
for (LLDrawable::drawable_vector_t::iterator iter = mMovedBridge.begin();
- iter != mMovedBridge.end(); ++iter)
+ iter != mMovedBridge.end(); ++iter)
{
LLDrawable *drawablep = *iter;
drawablep->clearState(LLDrawable::EARLY_MOVE | LLDrawable::MOVE_UNDAMPED | LLDrawable::ON_MOVE_LIST | LLDrawable::ANIMATED_CHILD);
@@ -2832,7 +2832,7 @@ void LLPipeline::clearRebuildDrawables()
//clear all moving drawables
for (LLDrawable::drawable_vector_t::iterator iter = mMovedList.begin();
- iter != mMovedList.end(); ++iter)
+ iter != mMovedList.end(); ++iter)
{
LLDrawable *drawablep = *iter;
drawablep->clearState(LLDrawable::EARLY_MOVE | LLDrawable::MOVE_UNDAMPED | LLDrawable::ON_MOVE_LIST | LLDrawable::ANIMATED_CHILD);
@@ -2861,7 +2861,7 @@ void LLPipeline::rebuildPriorityGroups()
mGroupQ1Locked = true;
// Iterate through all drawables on the priority build queue,
for (LLSpatialGroup::sg_vector_t::iterator iter = mGroupQ1.begin();
- iter != mGroupQ1.end(); ++iter)
+ iter != mGroupQ1.end(); ++iter)
{
LLSpatialGroup* group = *iter;
group->rebuildGeom();
@@ -2893,7 +2893,7 @@ void LLPipeline::updateGeom(F32 max_dtime)
// Iterate through all drawables on the priority build queue,
for (LLDrawable::drawable_list_t::iterator iter = mBuildQ1.begin();
- iter != mBuildQ1.end();)
+ iter != mBuildQ1.end();)
{
LLDrawable::drawable_list_t::iterator curiter = iter++;
LLDrawable* drawablep = *curiter;
@@ -2943,8 +2943,8 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
LLVOAvatar* av = vobj->asAvatar();
if (av &&
((!sImpostorRender && av->isImpostor()) //ignore impostor flag during impostor pass
- || av->isInMuteList()
- || (LLVOAvatar::AOA_JELLYDOLL == av->getOverallAppearance() && !av->needsImpostorUpdate()) ))
+ || av->isInMuteList()
+ || (LLVOAvatar::AOA_JELLYDOLL == av->getOverallAppearance() && !av->needsImpostorUpdate()) ))
{
return;
}
@@ -3161,13 +3161,13 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
LL_PROFILE_GPU_ZONE("stateSort");
if (hasAnyRenderType(LLPipeline::RENDER_TYPE_AVATAR,
- LLPipeline::RENDER_TYPE_CONTROL_AV,
- LLPipeline::RENDER_TYPE_TERRAIN,
- LLPipeline::RENDER_TYPE_TREE,
- LLPipeline::RENDER_TYPE_SKY,
- LLPipeline::RENDER_TYPE_VOIDWATER,
- LLPipeline::RENDER_TYPE_WATER,
- LLPipeline::END_RENDER_TYPES))
+ LLPipeline::RENDER_TYPE_CONTROL_AV,
+ LLPipeline::RENDER_TYPE_TERRAIN,
+ LLPipeline::RENDER_TYPE_TREE,
+ LLPipeline::RENDER_TYPE_SKY,
+ LLPipeline::RENDER_TYPE_VOIDWATER,
+ LLPipeline::RENDER_TYPE_WATER,
+ LLPipeline::END_RENDER_TYPES))
{
//clear faces from face pools
gPipeline.resetDrawOrders();
@@ -3265,7 +3265,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
{
LL_PROFILE_ZONE_NAMED_CATEGORY_DRAWABLE("stateSort"); // LL_RECORD_BLOCK_TIME(FTM_STATESORT_DRAWABLE);
for (LLCullResult::drawable_iterator iter = sCull->beginVisibleList();
- iter != sCull->endVisibleList(); ++iter)
+ iter != sCull->endVisibleList(); ++iter)
{
LLDrawable *drawablep = *iter;
if (!drawablep->isDead())
@@ -3400,8 +3400,8 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
void forAllDrawables(LLCullResult::sg_iterator begin,
- LLCullResult::sg_iterator end,
- void (*func)(LLDrawable*))
+ LLCullResult::sg_iterator end,
+ void (*func)(LLDrawable*))
{
for (LLCullResult::sg_iterator i = begin; i != end; ++i)
{
@@ -3464,7 +3464,7 @@ void renderScriptedTouchBeacons(LLDrawable *drawablep)
if (gPipeline.sRenderBeacons)
{
gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f),
- LLPipeline::DebugBeaconLineWidth);
+ LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -3494,7 +3494,7 @@ void renderPhysicalBeacons(LLDrawable *drawablep)
if (gPipeline.sRenderBeacons)
{
gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(0.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f),
- LLPipeline::DebugBeaconLineWidth);
+ LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -3535,7 +3535,7 @@ void renderMOAPBeacons(LLDrawable *drawablep)
if (gPipeline.sRenderBeacons)
{
gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 1.f, 1.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f),
- LLPipeline::DebugBeaconLineWidth);
+ LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -3564,7 +3564,7 @@ void renderParticleBeacons(LLDrawable *drawablep)
{
LLColor4 light_blue(0.5f, 0.5f, 1.f, 0.5f);
gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", light_blue, LLColor4(1.f, 1.f, 1.f, 0.5f),
- LLPipeline::DebugBeaconLineWidth);
+ LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -3649,7 +3649,7 @@ void LLPipeline::postSort(LLCamera &camera)
if ((sUseOcclusion && group->isOcclusionState(LLSpatialGroup::OCCLUDED)) ||
(RenderAutoHideSurfaceAreaLimit > 0.f &&
- group->mSurfaceArea > RenderAutoHideSurfaceAreaLimit * llmax(group->mObjectBoxSize, 10.f)))
+ group->mSurfaceArea > RenderAutoHideSurfaceAreaLimit * llmax(group->mObjectBoxSize, 10.f)))
{
continue;
}
@@ -4620,7 +4620,6 @@ void LLPipeline::renderDebug()
LLGLDisable cull(i >= 2 ? GL_CULL_FACE : 0);
gGL.flush();
-
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
//get rid of some z-fighting
@@ -5636,8 +5635,8 @@ void LLPipeline::calcNearbyLights(LLCamera& camera)
LLDrawable* drawable = light->drawable;
const LLViewerObject *vobj = light->drawable->getVObj();
if(vobj && vobj->getAvatar()
- && (vobj->getAvatar()->isTooComplex() || vobj->getAvatar()->isInMuteList() || vobj->getAvatar()->isTooSlow())
- )
+ && (vobj->getAvatar()->isTooComplex() || vobj->getAvatar()->isInMuteList() || vobj->getAvatar()->isTooSlow())
+ )
{
drawable->clearState(LLDrawable::NEARBY_LIGHT);
continue;
@@ -5698,7 +5697,7 @@ void LLPipeline::calcNearbyLights(LLCamera& camera)
// FIND NEW LIGHTS THAT ARE IN RANGE
light_set_t new_nearby_lights;
for (LLDrawable::ordered_drawable_set_t::iterator iter = mLights.begin();
- iter != mLights.end(); ++iter)
+ iter != mLights.end(); ++iter)
{
LLDrawable* drawable = *iter;
LLVOVolume* light = drawable->getVOVolume();
@@ -5736,7 +5735,7 @@ void LLPipeline::calcNearbyLights(LLCamera& camera)
// INSERT ANY NEW LIGHTS
for (light_set_t::iterator iter = new_nearby_lights.begin();
- iter != new_nearby_lights.end(); iter++)
+ iter != new_nearby_lights.end(); iter++)
{
const Light* light = &(*iter);
if (LLPipeline::sRenderDeferred || mNearbyLights.size() < (U32)MAX_LOCAL_LIGHTS)
@@ -5778,7 +5777,7 @@ void LLPipeline::calcNearbyLights(LLCamera& camera)
//mark nearby lights not-removable.
for (light_set_t::iterator iter = mNearbyLights.begin();
- iter != mNearbyLights.end(); iter++)
+ iter != mNearbyLights.end(); iter++)
{
const Light* light = &(*iter);
((LLViewerOctreeEntryData*) light->drawable)->setVisible();
@@ -5885,7 +5884,7 @@ void LLPipeline::setupHWLights()
if (local_light_count >= 1)
{
for (light_set_t::iterator iter = mNearbyLights.begin();
- iter != mNearbyLights.end(); ++iter)
+ iter != mNearbyLights.end(); ++iter)
{
LLDrawable* drawable = iter->drawable;
LLVOVolume* light = drawable->getVOVolume();
@@ -6729,7 +6728,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
!drawable->getVObj()->isAttachment() ||
delta.getLength3().getF32() > ATTACHMENT_OVERRIDE_DIST)
{ //avatar overrides if previously hit drawable is not an attachment or
- //attachment is far enough away from detected intersection
+ //attachment is far enough away from detected intersection
drawable = hit;
local_end = position;
}
@@ -6799,12 +6798,12 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
}
LLViewerObject* LLPipeline::lineSegmentIntersectInHUD(const LLVector4a& start, const LLVector4a& end,
- bool pick_transparent,
- S32* face_hit,
- LLVector4a* intersection, // return the intersection point
- LLVector2* tex_coord, // return the texture coordinates of the intersection point
- LLVector4a* normal, // return the surface normal at the intersection point
- LLVector4a* tangent // return the surface tangent at the intersection point
+ bool pick_transparent,
+ S32* face_hit,
+ LLVector4a* intersection, // return the intersection point
+ LLVector2* tex_coord, // return the texture coordinates of the intersection point
+ LLVector4a* normal, // return the surface normal at the intersection point
+ LLVector4a* tangent // return the surface tangent at the intersection point
)
{
LLDrawable* drawable = NULL;
@@ -7434,8 +7433,8 @@ void LLPipeline::generateGlow(LLRenderTarget* src)
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
gGlowExtractProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES,
- (GLfloat)mGlow[2].getWidth(),
- (GLfloat)mGlow[2].getHeight());
+ (GLfloat)mGlow[2].getWidth(),
+ (GLfloat)mGlow[2].getHeight());
}
{
@@ -7559,90 +7558,95 @@ bool LLPipeline::applyCAS(LLRenderTarget* src, LLRenderTarget* dst)
bool LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst)
{
- llassert(!gCubeSnapshot);
- bool multisample = RenderFSAAType == 1 && gFXAAProgram[0].isComplete() && mFXAAMap.isComplete();
+ {
+ llassert(!gCubeSnapshot);
+ bool multisample = RenderFSAAType == 1 && gFXAAProgram[0].isComplete() && mFXAAMap.isComplete();
- if(!multisample) return false;
+ if(!multisample) return false;
- LL_PROFILE_GPU_ZONE("aa");
- S32 width = dst->getWidth();
- S32 height = dst->getHeight();
+ {
+ LL_PROFILE_GPU_ZONE("aa");
+ S32 width = dst->getWidth();
+ S32 height = dst->getHeight();
+ //LL_WARNS() << "dst width=" << width << LL_ENDL;
- // bake out texture2D with RGBL for FXAA shader
- mFXAAMap.bindTarget("applyFXAA", 1);
- mFXAAMap.clear(GL_COLOR_BUFFER_BIT);
+ // bake out texture2D with RGBL for FXAA shader
+ mFXAAMap.bindTarget("applyFXAA", 1);
+ mFXAAMap.clear(GL_COLOR_BUFFER_BIT);
- LLGLSLShader* shader = &gGlowCombineFXAAProgram;
- shader->bind();
+ LLGLSLShader* shader = &gGlowCombineFXAAProgram;
+ shader->bind();
- S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, src->getUsage());
- if (channel > -1)
- {
- src->bindTexture(0, channel, LLTexUnit::TFO_BILINEAR);
- }
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, src->getUsage());
+ if (channel > -1)
+ {
+ src->bindTexture(0, channel, LLTexUnit::TFO_BILINEAR);
+ }
- {
- LLGLDepthTest depth_test(GL_TRUE, GL_TRUE, GL_ALWAYS);
- renderTriangle();
- }
+ {
+ LLGLDepthTest depth_test(GL_TRUE, GL_TRUE, GL_ALWAYS);
+ renderTriangle();
+ }
- shader->disableTexture(LLShaderMgr::DEFERRED_DIFFUSE, src->getUsage());
- shader->unbind();
+ shader->disableTexture(LLShaderMgr::DEFERRED_DIFFUSE, src->getUsage());
+ shader->unbind();
- mFXAAMap.flush();
+ mFXAAMap.flush();
- dst->bindTarget("applyFXAA", 1);
- dst->clear();
+ dst->bindTarget("applyFXAA", 1);
+ dst->clear();
- static LLCachedControl<U32> aa_quality(gSavedSettings, "RenderFSAASamples", 0U);
- U32 fsaa_quality = std::clamp(aa_quality(), 0U, 3U);
+ static LLCachedControl<U32> aa_quality(gSavedSettings, "RenderFSAASamples", 0U);
+ U32 fsaa_quality = std::clamp(aa_quality(), 0U, 3U);
- shader = &gFXAAProgram[fsaa_quality];
- shader->bind();
+ shader = &gFXAAProgram[fsaa_quality];
+ shader->bind();
- channel = shader->enableTexture(LLShaderMgr::DIFFUSE_MAP, mFXAAMap.getUsage());
- if (channel > -1)
- {
- mFXAAMap.bindTexture(0, channel, LLTexUnit::TFO_BILINEAR);
- }
+ channel = shader->enableTexture(LLShaderMgr::DIFFUSE_MAP, mFXAAMap.getUsage());
+ if (channel > -1)
+ {
+ mFXAAMap.bindTexture(0, channel, LLTexUnit::TFO_BILINEAR);
+ }
- /*
- gGLViewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft;
- gGLViewport[1] = gViewerWindow->getWorldViewRectRaw().mBottom;
- gGLViewport[2] = gViewerWindow->getWorldViewRectRaw().getWidth();
- gGLViewport[3] = gViewerWindow->getWorldViewRectRaw().getHeight();
+/*
+ gGLViewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft;
+ gGLViewport[1] = gViewerWindow->getWorldViewRectRaw().mBottom;
+ gGLViewport[2] = gViewerWindow->getWorldViewRectRaw().getWidth();
+ gGLViewport[3] = gViewerWindow->getWorldViewRectRaw().getHeight();
- glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
+ glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
*/
- F32 scale_x = (F32)width / mFXAAMap.getWidth();
- F32 scale_y = (F32)height / mFXAAMap.getHeight();
+ F32 scale_x = (F32)width / mFXAAMap.getWidth();
+ F32 scale_y = (F32)height / mFXAAMap.getHeight();
- //LL_WARNS() << "vp width=" << gGLViewport[2] << " scale=" << scale_x << LL_ENDL;
+ //LL_WARNS() << "vp width=" << gGLViewport[2] << " scale=" << scale_x << LL_ENDL;
- shader->uniform2f(LLShaderMgr::FXAA_TC_SCALE, scale_x, scale_y);
- shader->uniform2f(LLShaderMgr::FXAA_RCP_SCREEN_RES, 1.f / width * scale_x, 1.f / height * scale_y);
- shader->uniform4f(LLShaderMgr::FXAA_RCP_FRAME_OPT, -0.5f / width * scale_x, -0.5f / height * scale_y,
- 0.5f / width * scale_x, 0.5f / height * scale_y);
- shader->uniform4f(LLShaderMgr::FXAA_RCP_FRAME_OPT2, -2.f / width * scale_x, -2.f / height * scale_y,
- 2.f / width * scale_x, 2.f / height * scale_y);
+ shader->uniform2f(LLShaderMgr::FXAA_TC_SCALE, scale_x, scale_y);
+ shader->uniform2f(LLShaderMgr::FXAA_RCP_SCREEN_RES, 1.f / width * scale_x, 1.f / height * scale_y);
+ shader->uniform4f(LLShaderMgr::FXAA_RCP_FRAME_OPT, -0.5f / width * scale_x, -0.5f / height * scale_y,
+ 0.5f / width * scale_x, 0.5f / height * scale_y);
+ shader->uniform4f(LLShaderMgr::FXAA_RCP_FRAME_OPT2, -2.f / width * scale_x, -2.f / height * scale_y,
+ 2.f / width * scale_x, 2.f / height * scale_y);
- {
- LLGLDepthTest depth_test(GL_TRUE, GL_TRUE, GL_ALWAYS);
- S32 depth_channel = shader->getTextureChannel(LLShaderMgr::DEFERRED_DEPTH);
- gGL.getTexUnit(depth_channel)->bind(&mRT->deferredScreen, true);
+ {
+ LLGLDepthTest depth_test(GL_TRUE, GL_TRUE, GL_ALWAYS);
+ S32 depth_channel = shader->getTextureChannel(LLShaderMgr::DEFERRED_DEPTH);
+ gGL.getTexUnit(depth_channel)->bind(&mRT->deferredScreen, true);
- renderTriangle();
- }
+ renderTriangle();
+ }
- if (channel > -1)
- {
- shader->unbindTexture(channel);
- }
+ if (channel > -1)
+ {
+ shader->unbindTexture(channel);
+ }
- shader->unbind();
- dst->flush();
+ shader->unbind();
+ dst->flush();
+ }
+ }
return true;
}
@@ -7760,10 +7764,8 @@ void LLPipeline::generateSMAABuffers(LLRenderTarget* src)
//{
// glStencilFunc(GL_ALWAYS, 0, 0xFF);
//}
-
blend_weights_shader.unbind();
dest.flush();
-
gGL.getTexUnit(edge_tex_channel)->unbindFast(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(area_tex_channel)->unbindFast(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(search_tex_channel)->unbindFast(LLTexUnit::TT_TEXTURE);
@@ -7785,56 +7787,57 @@ bool LLPipeline::applySMAA(LLRenderTarget* src, LLRenderTarget* dst)
if(!multisample) return false;
- LL_PROFILE_GPU_ZONE("aa");
-
- generateSMAABuffers(src);
+ {
+ LL_PROFILE_GPU_ZONE("aa");
+ generateSMAABuffers(src);
- static LLCachedControl<U32> aa_quality(gSavedSettings, "RenderFSAASamples", 0U);
- U32 fsaa_quality = std::clamp(aa_quality(), 0U, 3U);
+ static LLCachedControl<U32> aa_quality(gSavedSettings, "RenderFSAASamples", 0U);
+ U32 fsaa_quality = std::clamp(aa_quality(), 0U, 3U);
- S32 width = src->getWidth();
- S32 height = src->getHeight();
+ S32 width = src->getWidth();
+ S32 height = src->getHeight();
- float rt_metrics[] = { 1.f / width, 1.f / height, (float)width, (float)height };
+ float rt_metrics[] = { 1.f / width, 1.f / height, (float)width, (float)height };
- LLGLDepthTest depth(GL_FALSE, GL_FALSE);
+ LLGLDepthTest depth(GL_FALSE, GL_FALSE);
- static LLCachedControl<bool> use_sample(gSavedSettings, "RenderSMAAUseSample", false);
- //static LLCachedControl<bool> use_stencil(gSavedSettings, "RenderSMAAUseStencil", true);
+ static LLCachedControl<bool> use_sample(gSavedSettings, "RenderSMAAUseSample", false);
+ //static LLCachedControl<bool> use_stencil(gSavedSettings, "RenderSMAAUseStencil", true);
- {
- //LLGLDisable stencil(GL_STENCIL_TEST);
+ {
+ //LLGLDisable stencil(GL_STENCIL_TEST);
- // Bind setup:
- LLRenderTarget* bound_target = dst;
- LLGLSLShader& blend_shader = gSMAANeighborhoodBlendProgram[fsaa_quality];
+ // Bind setup:
+ LLRenderTarget* bound_target = dst;
+ LLGLSLShader& blend_shader = gSMAANeighborhoodBlendProgram[fsaa_quality];
- bound_target->bindTarget("applySMAA", 1);
- bound_target->clear(GL_COLOR_BUFFER_BIT);
+ bound_target->bindTarget("applySMAA", 1);
+ bound_target->clear(GL_COLOR_BUFFER_BIT);
- blend_shader.bind();
- blend_shader.uniform4fv(sSmaaRTMetrics, 1, rt_metrics);
+ blend_shader.bind();
+ blend_shader.uniform4fv(sSmaaRTMetrics, 1, rt_metrics);
- S32 diffuse_channel = blend_shader.enableTexture(LLShaderMgr::DEFERRED_DIFFUSE);
- if(diffuse_channel > -1)
- {
- src->bindTexture(0, diffuse_channel, LLTexUnit::TFO_BILINEAR);
- gGL.getTexUnit(diffuse_channel)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
- }
+ S32 diffuse_channel = blend_shader.enableTexture(LLShaderMgr::DEFERRED_DIFFUSE);
+ if(diffuse_channel > -1)
+ {
+ src->bindTexture(0, diffuse_channel, LLTexUnit::TFO_BILINEAR);
+ gGL.getTexUnit(diffuse_channel)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+ }
- S32 blend_channel = blend_shader.enableTexture(LLShaderMgr::SMAA_BLEND_TEX);
- if (blend_channel > -1)
- {
- mSMAABlendBuffer.bindTexture(0, blend_channel, LLTexUnit::TFO_BILINEAR);
- }
+ S32 blend_channel = blend_shader.enableTexture(LLShaderMgr::SMAA_BLEND_TEX);
+ if (blend_channel > -1)
+ {
+ mSMAABlendBuffer.bindTexture(0, blend_channel, LLTexUnit::TFO_BILINEAR);
+ }
- renderTriangle();
+ renderTriangle();
- bound_target->flush();
- blend_shader.unbind();
- gGL.getTexUnit(diffuse_channel)->unbindFast(LLTexUnit::TT_TEXTURE);
- gGL.getTexUnit(blend_channel)->unbindFast(LLTexUnit::TT_TEXTURE);
+ bound_target->flush();
+ blend_shader.unbind();
+ gGL.getTexUnit(diffuse_channel)->unbindFast(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(blend_channel)->unbindFast(LLTexUnit::TT_TEXTURE);
+ }
}
LOG_GLERROR("LLPipeline::applySMAA()");
@@ -7843,6 +7846,7 @@ bool LLPipeline::applySMAA(LLRenderTarget* src, LLRenderTarget* dst)
void LLPipeline::copyRenderTarget(LLRenderTarget* src, LLRenderTarget* dst)
{
+
LL_PROFILE_GPU_ZONE("copyRenderTarget");
dst->bindTarget("copyRenderTarget", 1);
dst->clear(GL_COLOR_BUFFER_BIT);
@@ -7865,6 +7869,7 @@ void LLPipeline::combineGlow(LLRenderTarget* src, LLRenderTarget* dst)
dst->bindTarget("combineGlow", 1);
{
+
gGlowCombineProgram.bind();
gGlowCombineProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src);
@@ -7879,188 +7884,190 @@ void LLPipeline::combineGlow(LLRenderTarget* src, LLRenderTarget* dst)
bool LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst)
{
- bool dof_enabled =
+ {
+ bool dof_enabled =
(RenderDepthOfFieldInEditMode || !LLToolMgr::getInstance()->inBuildMode()) &&
RenderDepthOfField &&
!gCubeSnapshot;
if(!dof_enabled) return false;
- gViewerWindow->setup3DViewport();
+ gViewerWindow->setup3DViewport();
- if (dof_enabled)
- {
- LL_PROFILE_GPU_ZONE("dof");
- LLGLDisable blend(GL_BLEND);
+ if (dof_enabled)
+ {
+ LL_PROFILE_GPU_ZONE("dof");
+ LLGLDisable blend(GL_BLEND);
- // depth of field focal plane calculations
- static F32 current_distance = 16.f;
- static F32 start_distance = 16.f;
- static F32 transition_time = 1.f;
+ // depth of field focal plane calculations
+ static F32 current_distance = 16.f;
+ static F32 start_distance = 16.f;
+ static F32 transition_time = 1.f;
- LLVector3 focus_point;
+ LLVector3 focus_point;
- LLViewerObject* obj = LLViewerMediaFocus::getInstance()->getFocusedObject();
- if (obj && obj->mDrawable && obj->isSelected())
- { // focus on selected media object
- S32 face_idx = LLViewerMediaFocus::getInstance()->getFocusedFace();
- if (obj && obj->mDrawable)
- {
- LLFace* face = obj->mDrawable->getFace(face_idx);
- if (face)
+ LLViewerObject* obj = LLViewerMediaFocus::getInstance()->getFocusedObject();
+ if (obj && obj->mDrawable && obj->isSelected())
+ { // focus on selected media object
+ S32 face_idx = LLViewerMediaFocus::getInstance()->getFocusedFace();
+ if (obj && obj->mDrawable)
{
- focus_point = face->getPositionAgent();
+ LLFace* face = obj->mDrawable->getFace(face_idx);
+ if (face)
+ {
+ focus_point = face->getPositionAgent();
+ }
}
}
- }
- if (focus_point.isExactlyZero())
- {
- if (LLViewerJoystick::getInstance()->getOverrideCamera())
- { // focus on point under cursor
- focus_point.set(gDebugRaycastIntersection.getF32ptr());
- }
- else if (gAgentCamera.cameraMouselook())
- { // focus on point under mouselook crosshairs
- LLVector4a result;
- result.clear();
+ if (focus_point.isExactlyZero())
+ {
+ if (LLViewerJoystick::getInstance()->getOverrideCamera())
+ { // focus on point under cursor
+ focus_point.set(gDebugRaycastIntersection.getF32ptr());
+ }
+ else if (gAgentCamera.cameraMouselook())
+ { // focus on point under mouselook crosshairs
+ LLVector4a result;
+ result.clear();
- gViewerWindow->cursorIntersect(-1, -1, 512.f, nullptr, -1, false, false, true, true, nullptr, nullptr, nullptr, &result);
+ gViewerWindow->cursorIntersect(-1, -1, 512.f, nullptr, -1, false, false, true, true, nullptr, nullptr, nullptr, &result);
- focus_point.set(result.getF32ptr());
- }
- else
- {
- // focus on alt-zoom target
- LLViewerRegion* region = gAgent.getRegion();
- if (region)
+ focus_point.set(result.getF32ptr());
+ }
+ else
{
- focus_point = LLVector3(gAgentCamera.getFocusGlobal() - region->getOriginGlobal());
+ // focus on alt-zoom target
+ LLViewerRegion* region = gAgent.getRegion();
+ if (region)
+ {
+ focus_point = LLVector3(gAgentCamera.getFocusGlobal() - region->getOriginGlobal());
+ }
}
}
- }
- LLVector3 eye = LLViewerCamera::getInstance()->getOrigin();
- F32 target_distance = 16.f;
- if (!focus_point.isExactlyZero())
- {
- target_distance = LLViewerCamera::getInstance()->getAtAxis() * (focus_point - eye);
- }
+ LLVector3 eye = LLViewerCamera::getInstance()->getOrigin();
+ F32 target_distance = 16.f;
+ if (!focus_point.isExactlyZero())
+ {
+ target_distance = LLViewerCamera::getInstance()->getAtAxis() * (focus_point - eye);
+ }
- if (transition_time >= 1.f && fabsf(current_distance - target_distance) / current_distance > 0.01f)
- { // large shift happened, interpolate smoothly to new target distance
- transition_time = 0.f;
- start_distance = current_distance;
- }
- else if (transition_time < 1.f)
- { // currently in a transition, continue interpolating
- transition_time += 1.f / CameraFocusTransitionTime * gFrameIntervalSeconds.value();
- transition_time = llmin(transition_time, 1.f);
+ if (transition_time >= 1.f && fabsf(current_distance - target_distance) / current_distance > 0.01f)
+ { // large shift happened, interpolate smoothly to new target distance
+ transition_time = 0.f;
+ start_distance = current_distance;
+ }
+ else if (transition_time < 1.f)
+ { // currently in a transition, continue interpolating
+ transition_time += 1.f / CameraFocusTransitionTime * gFrameIntervalSeconds.value();
+ transition_time = llmin(transition_time, 1.f);
- F32 t = cosf(transition_time * F_PI + F_PI) * 0.5f + 0.5f;
- current_distance = start_distance + (target_distance - start_distance) * t;
- }
- else
- { // small or no change, just snap to target distance
- current_distance = target_distance;
- }
+ F32 t = cosf(transition_time * F_PI + F_PI) * 0.5f + 0.5f;
+ current_distance = start_distance + (target_distance - start_distance) * t;
+ }
+ else
+ { // small or no change, just snap to target distance
+ current_distance = target_distance;
+ }
- // convert to mm
- F32 subject_distance = current_distance * 1000.f;
- F32 fnumber = CameraFNumber;
- F32 default_focal_length = CameraFocalLength;
+ // convert to mm
+ F32 subject_distance = current_distance * 1000.f;
+ F32 fnumber = CameraFNumber;
+ F32 default_focal_length = CameraFocalLength;
- F32 fov = LLViewerCamera::getInstance()->getView();
+ F32 fov = LLViewerCamera::getInstance()->getView();
- const F32 default_fov = CameraFieldOfView * F_PI / 180.f;
+ const F32 default_fov = CameraFieldOfView * F_PI / 180.f;
- // F32 aspect_ratio = (F32) mRT->screen.getWidth()/(F32)mRT->screen.getHeight();
+ // F32 aspect_ratio = (F32) mRT->screen.getWidth()/(F32)mRT->screen.getHeight();
- F32 dv = 2.f * default_focal_length * tanf(default_fov / 2.f);
+ F32 dv = 2.f * default_focal_length * tanf(default_fov / 2.f);
- F32 focal_length = dv / (2 * tanf(fov / 2.f));
+ F32 focal_length = dv / (2 * tanf(fov / 2.f));
- // F32 tan_pixel_angle = tanf(LLDrawable::sCurPixelAngle);
+ // F32 tan_pixel_angle = tanf(LLDrawable::sCurPixelAngle);
- // from wikipedia -- c = |s2-s1|/s2 * f^2/(N(S1-f))
- // where N = fnumber
- // s2 = dot distance
- // s1 = subject distance
- // f = focal length
- //
+ // from wikipedia -- c = |s2-s1|/s2 * f^2/(N(S1-f))
+ // where N = fnumber
+ // s2 = dot distance
+ // s1 = subject distance
+ // f = focal length
+ //
- F32 blur_constant = focal_length * focal_length / (fnumber * (subject_distance - focal_length));
- blur_constant /= 1000.f; // convert to meters for shader
- F32 magnification = focal_length / (subject_distance - focal_length);
+ F32 blur_constant = focal_length * focal_length / (fnumber * (subject_distance - focal_length));
+ blur_constant /= 1000.f; // convert to meters for shader
+ F32 magnification = focal_length / (subject_distance - focal_length);
- { // build diffuse+bloom+CoF
- mRT->deferredLight.bindTarget("renderDOF", 1);
+ { // build diffuse+bloom+CoF
+ mRT->deferredLight.bindTarget("renderDOF", 1);
- gDeferredCoFProgram.bind();
+ gDeferredCoFProgram.bind();
- gDeferredCoFProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src, LLTexUnit::TFO_POINT);
- gDeferredCoFProgram.bindTexture(LLShaderMgr::DEFERRED_DEPTH, &mRT->deferredScreen, true);
+ gDeferredCoFProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src, LLTexUnit::TFO_POINT);
+ gDeferredCoFProgram.bindTexture(LLShaderMgr::DEFERRED_DEPTH, &mRT->deferredScreen, true);
- gDeferredCoFProgram.uniform1f(LLShaderMgr::DEFERRED_DEPTH_CUTOFF, RenderEdgeDepthCutoff);
- gDeferredCoFProgram.uniform1f(LLShaderMgr::DEFERRED_NORM_CUTOFF, RenderEdgeNormCutoff);
- gDeferredCoFProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)dst->getWidth(), (GLfloat)dst->getHeight());
- gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_FOCAL_DISTANCE, -subject_distance / 1000.f);
- gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_BLUR_CONSTANT, blur_constant);
- gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_TAN_PIXEL_ANGLE, tanf(1.f / LLDrawable::sCurPixelAngle));
- gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_MAGNIFICATION, magnification);
- gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
- gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale);
+ gDeferredCoFProgram.uniform1f(LLShaderMgr::DEFERRED_DEPTH_CUTOFF, RenderEdgeDepthCutoff);
+ gDeferredCoFProgram.uniform1f(LLShaderMgr::DEFERRED_NORM_CUTOFF, RenderEdgeNormCutoff);
+ gDeferredCoFProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)dst->getWidth(), (GLfloat)dst->getHeight());
+ gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_FOCAL_DISTANCE, -subject_distance / 1000.f);
+ gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_BLUR_CONSTANT, blur_constant);
+ gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_TAN_PIXEL_ANGLE, tanf(1.f / LLDrawable::sCurPixelAngle));
+ gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_MAGNIFICATION, magnification);
+ gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
+ gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale);
- renderTriangle();
+ renderTriangle();
- gDeferredCoFProgram.unbind();
- mRT->deferredLight.flush();
- }
+ gDeferredCoFProgram.unbind();
+ mRT->deferredLight.flush();
+ }
- U32 dof_width = (U32)(mRT->screen.getWidth() * CameraDoFResScale);
- U32 dof_height = (U32)(mRT->screen.getHeight() * CameraDoFResScale);
+ U32 dof_width = (U32)(mRT->screen.getWidth() * CameraDoFResScale);
+ U32 dof_height = (U32)(mRT->screen.getHeight() * CameraDoFResScale);
- { // perform DoF sampling at half-res (preserve alpha channel)
- src->bindTarget("DoF sampling", 1);
- glViewport(0, 0, dof_width, dof_height);
+ { // perform DoF sampling at half-res (preserve alpha channel)
+ src->bindTarget("DoF sampling", 1);
+ glViewport(0, 0, dof_width, dof_height);
- gGL.setColorMask(true, false);
+ gGL.setColorMask(true, false);
- gDeferredPostProgram.bind();
- gDeferredPostProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, &mRT->deferredLight, LLTexUnit::TFO_POINT);
+ gDeferredPostProgram.bind();
+ gDeferredPostProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, &mRT->deferredLight, LLTexUnit::TFO_POINT);
- gDeferredPostProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)dst->getWidth(), (GLfloat)dst->getHeight());
- gDeferredPostProgram.uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
- gDeferredPostProgram.uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale);
+ gDeferredPostProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)dst->getWidth(), (GLfloat)dst->getHeight());
+ gDeferredPostProgram.uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
+ gDeferredPostProgram.uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale);
- renderTriangle();
+ renderTriangle();
- gDeferredPostProgram.unbind();
+ gDeferredPostProgram.unbind();
- src->flush();
- gGL.setColorMask(true, true);
- }
+ src->flush();
+ gGL.setColorMask(true, true);
+ }
- { // combine result based on alpha
+ { // combine result based on alpha
- dst->bindTarget("DoF combine", 1);
- glViewport(0, 0, dst->getWidth(), dst->getHeight());
+ dst->bindTarget("DoF combine", 1);
+ glViewport(0, 0, dst->getWidth(), dst->getHeight());
- gDeferredDoFCombineProgram.bind();
- gDeferredDoFCombineProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src, LLTexUnit::TFO_POINT);
- gDeferredDoFCombineProgram.bindTexture(LLShaderMgr::DEFERRED_LIGHT, &mRT->deferredLight, LLTexUnit::TFO_POINT);
+ gDeferredDoFCombineProgram.bind();
+ gDeferredDoFCombineProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src, LLTexUnit::TFO_POINT);
+ gDeferredDoFCombineProgram.bindTexture(LLShaderMgr::DEFERRED_LIGHT, &mRT->deferredLight, LLTexUnit::TFO_POINT);
- gDeferredDoFCombineProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)dst->getWidth(), (GLfloat)dst->getHeight());
- gDeferredDoFCombineProgram.uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
- gDeferredDoFCombineProgram.uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale);
- gDeferredDoFCombineProgram.uniform1f(LLShaderMgr::DOF_WIDTH, (dof_width - 1) / (F32)src->getWidth());
- gDeferredDoFCombineProgram.uniform1f(LLShaderMgr::DOF_HEIGHT, (dof_height - 1) / (F32)src->getHeight());
+ gDeferredDoFCombineProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)dst->getWidth(), (GLfloat)dst->getHeight());
+ gDeferredDoFCombineProgram.uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
+ gDeferredDoFCombineProgram.uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale);
+ gDeferredDoFCombineProgram.uniform1f(LLShaderMgr::DOF_WIDTH, (dof_width - 1) / (F32)src->getWidth());
+ gDeferredDoFCombineProgram.uniform1f(LLShaderMgr::DOF_HEIGHT, (dof_height - 1) / (F32)src->getHeight());
- renderTriangle();
+ renderTriangle();
- gDeferredDoFCombineProgram.unbind();
- dst->flush();
+ gDeferredDoFCombineProgram.unbind();
+ dst->flush();
+ }
}
}
@@ -8372,8 +8379,8 @@ void LLPipeline::renderFinalize()
/*if (LLRenderTarget::sUseFBO && !gCubeSnapshot)
{ // copy depth buffer from mRT->screen to framebuffer
LLRenderTarget::copyContentsToFramebuffer(mRT->screen, 0, 0, mRT->screen.getWidth(), mRT->screen.getHeight(), 0, 0,
- mRT->screen.getWidth(), mRT->screen.getHeight(),
- GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST);
+ mRT->screen.getWidth(), mRT->screen.getHeight(),
+ GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST);
}*/
LLVertexBuffer::unbind();
@@ -8579,8 +8586,8 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
F32* m = gGLModelView;
F32 mat[] = { m[0], m[1], m[2],
- m[4], m[5], m[6],
- m[8], m[9], m[10] };
+ m[4], m[5], m[6],
+ m[8], m[9], m[10] };
shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_ENV_MAT, 1, true, mat);
}
@@ -8774,8 +8781,8 @@ void LLPipeline::renderDeferredLighting()
glClearColor(0, 0, 0, 0);
sun_shader.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES,
- (GLfloat)deferred_light_target->getWidth(),
- (GLfloat)deferred_light_target->getHeight());
+ (GLfloat)deferred_light_target->getWidth(),
+ (GLfloat)deferred_light_target->getHeight());
{
LLGLDisable blend(GL_BLEND);
@@ -8854,8 +8861,7 @@ void LLPipeline::renderDeferredLighting()
screen_target->clear(GL_COLOR_BUFFER_BIT);
if (RenderDeferredAtmospheric)
- {
- // apply sunlight contribution
+ { // apply sunlight contribution
LLGLSLShader &soften_shader = gDeferredSoftenProgram;
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("renderDeferredLighting - atmospherics");
@@ -9152,35 +9158,35 @@ void LLPipeline::renderDeferredLighting()
pushRenderTypeMask();
andRenderTypeMask(LLPipeline::RENDER_TYPE_ALPHA,
- LLPipeline::RENDER_TYPE_ALPHA_PRE_WATER,
- LLPipeline::RENDER_TYPE_ALPHA_POST_WATER,
- LLPipeline::RENDER_TYPE_FULLBRIGHT,
- LLPipeline::RENDER_TYPE_VOLUME,
- LLPipeline::RENDER_TYPE_GLOW,
- LLPipeline::RENDER_TYPE_BUMP,
- LLPipeline::RENDER_TYPE_GLTF_PBR,
- LLPipeline::RENDER_TYPE_PASS_SIMPLE,
- LLPipeline::RENDER_TYPE_PASS_ALPHA,
- LLPipeline::RENDER_TYPE_PASS_ALPHA_MASK,
- LLPipeline::RENDER_TYPE_PASS_BUMP,
- LLPipeline::RENDER_TYPE_PASS_POST_BUMP,
- LLPipeline::RENDER_TYPE_PASS_FULLBRIGHT,
- LLPipeline::RENDER_TYPE_PASS_FULLBRIGHT_ALPHA_MASK,
- LLPipeline::RENDER_TYPE_PASS_FULLBRIGHT_SHINY,
- LLPipeline::RENDER_TYPE_PASS_GLOW,
- LLPipeline::RENDER_TYPE_PASS_GLTF_GLOW,
- LLPipeline::RENDER_TYPE_PASS_GRASS,
- LLPipeline::RENDER_TYPE_PASS_SHINY,
- LLPipeline::RENDER_TYPE_PASS_INVISIBLE,
- LLPipeline::RENDER_TYPE_PASS_INVISI_SHINY,
- LLPipeline::RENDER_TYPE_AVATAR,
- LLPipeline::RENDER_TYPE_CONTROL_AV,
- LLPipeline::RENDER_TYPE_ALPHA_MASK,
- LLPipeline::RENDER_TYPE_FULLBRIGHT_ALPHA_MASK,
- LLPipeline::RENDER_TYPE_TERRAIN,
- LLPipeline::RENDER_TYPE_WATER,
- LLPipeline::RENDER_TYPE_WATEREXCLUSION,
- END_RENDER_TYPES);
+ LLPipeline::RENDER_TYPE_ALPHA_PRE_WATER,
+ LLPipeline::RENDER_TYPE_ALPHA_POST_WATER,
+ LLPipeline::RENDER_TYPE_FULLBRIGHT,
+ LLPipeline::RENDER_TYPE_VOLUME,
+ LLPipeline::RENDER_TYPE_GLOW,
+ LLPipeline::RENDER_TYPE_BUMP,
+ LLPipeline::RENDER_TYPE_GLTF_PBR,
+ LLPipeline::RENDER_TYPE_PASS_SIMPLE,
+ LLPipeline::RENDER_TYPE_PASS_ALPHA,
+ LLPipeline::RENDER_TYPE_PASS_ALPHA_MASK,
+ LLPipeline::RENDER_TYPE_PASS_BUMP,
+ LLPipeline::RENDER_TYPE_PASS_POST_BUMP,
+ LLPipeline::RENDER_TYPE_PASS_FULLBRIGHT,
+ LLPipeline::RENDER_TYPE_PASS_FULLBRIGHT_ALPHA_MASK,
+ LLPipeline::RENDER_TYPE_PASS_FULLBRIGHT_SHINY,
+ LLPipeline::RENDER_TYPE_PASS_GLOW,
+ LLPipeline::RENDER_TYPE_PASS_GLTF_GLOW,
+ LLPipeline::RENDER_TYPE_PASS_GRASS,
+ LLPipeline::RENDER_TYPE_PASS_SHINY,
+ LLPipeline::RENDER_TYPE_PASS_INVISIBLE,
+ LLPipeline::RENDER_TYPE_PASS_INVISI_SHINY,
+ LLPipeline::RENDER_TYPE_AVATAR,
+ LLPipeline::RENDER_TYPE_CONTROL_AV,
+ LLPipeline::RENDER_TYPE_ALPHA_MASK,
+ LLPipeline::RENDER_TYPE_FULLBRIGHT_ALPHA_MASK,
+ LLPipeline::RENDER_TYPE_TERRAIN,
+ LLPipeline::RENDER_TYPE_WATER,
+ LLPipeline::RENDER_TYPE_WATEREXCLUSION,
+ END_RENDER_TYPES);
renderGeomPostDeferred(*LLViewerCamera::getInstance());
popRenderTypeMask();
@@ -9288,7 +9294,6 @@ void LLPipeline::doWaterHaze()
LLRenderTarget& dst = gPipeline.mWaterDis;
mRT->screen.flush();
-
dst.bindTarget("water haze copy depth", 1);
gCopyDepthProgram.bind();
@@ -9347,6 +9352,7 @@ void LLPipeline::doWaterHaze()
unbindDeferredShader(haze_shader);
+
gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
@@ -9589,7 +9595,6 @@ void LLPipeline::bindReflectionProbes(LLGLSLShader& shader)
S32 channel = shader.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY);
bool bound = false;
-
if (channel > -1 && mReflectionMapManager.mTexture.notNull())
{
mReflectionMapManager.mTexture->bind(channel);
@@ -9627,32 +9632,34 @@ void LLPipeline::bindReflectionProbes(LLGLSLShader& shader)
//{
//LL_WARNS() << "binding SSR to reflection maps" << LL_ENDL;
- channel = shader.enableTexture(LLShaderMgr::SCENE_MAP);
- if (channel > -1)
- {
- gGL.getTexUnit(channel)->bind(&mSceneMap);
- }
+ channel = shader.enableTexture(LLShaderMgr::SCENE_MAP);
+ if (channel > -1)
+ {
+ gGL.getTexUnit(channel)->bind(&mSceneMap);
+ }
- shader.uniform1f(LLShaderMgr::DEFERRED_SSR_ITR_COUNT, (GLfloat)RenderScreenSpaceReflectionIterations);
- shader.uniform1f(LLShaderMgr::DEFERRED_SSR_DIST_BIAS, RenderScreenSpaceReflectionDistanceBias);
- shader.uniform1f(LLShaderMgr::DEFERRED_SSR_RAY_STEP, RenderScreenSpaceReflectionRayStep);
- shader.uniform1f(LLShaderMgr::DEFERRED_SSR_GLOSSY_SAMPLES, (GLfloat)RenderScreenSpaceReflectionGlossySamples);
- shader.uniform1f(LLShaderMgr::DEFERRED_SSR_REJECT_BIAS, RenderScreenSpaceReflectionDepthRejectBias);
- mPoissonOffset++;
- if (mPoissonOffset > 128 - RenderScreenSpaceReflectionGlossySamples)
- mPoissonOffset = 0;
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSR_ITR_COUNT, (GLfloat)RenderScreenSpaceReflectionIterations);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSR_DIST_BIAS, RenderScreenSpaceReflectionDistanceBias);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSR_RAY_STEP, RenderScreenSpaceReflectionRayStep);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSR_GLOSSY_SAMPLES, (GLfloat)RenderScreenSpaceReflectionGlossySamples);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSR_REJECT_BIAS, RenderScreenSpaceReflectionDepthRejectBias);
+ mPoissonOffset++;
- shader.uniform1f(LLShaderMgr::DEFERRED_SSR_NOISE_SINE, (GLfloat)mPoissonOffset);
- shader.uniform1f(LLShaderMgr::DEFERRED_SSR_ADAPTIVE_STEP_MULT, RenderScreenSpaceReflectionAdaptiveStepMultiplier);
+ if (mPoissonOffset > 128 - RenderScreenSpaceReflectionGlossySamples)
+ mPoissonOffset = 0;
- channel = shader.enableTexture(LLShaderMgr::SCENE_DEPTH);
- if (channel > -1)
- {
- gGL.getTexUnit(channel)->bind(&mSceneMap, true);
- }
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSR_NOISE_SINE, (GLfloat)mPoissonOffset);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSR_ADAPTIVE_STEP_MULT, RenderScreenSpaceReflectionAdaptiveStepMultiplier);
+
+ channel = shader.enableTexture(LLShaderMgr::SCENE_DEPTH);
+ if (channel > -1)
+ {
+ gGL.getTexUnit(channel)->bind(&mSceneMap, true);
+ }
//}
+
LOG_GLERROR("bindReflectionProbes() end");
}
@@ -9794,6 +9801,7 @@ void LLPipeline::renderShadow(const glm::mat4& view, const glm::mat4& proj, LLCa
}
};
+
LLVertexBuffer::unbind();
for (int j = 0; j < 2; ++j) // 0 -- static, 1 -- rigged
{
@@ -11109,12 +11117,12 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar, bool
// previews can't be muted or impostered
bool visually_muted = !for_profile && !preview_avatar && avatar->isVisuallyMuted();
LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID()
- << " is " << ( visually_muted ? "" : "not ") << "visually muted"
- << LL_ENDL;
+ << " is " << ( visually_muted ? "" : "not ") << "visually muted"
+ << LL_ENDL;
bool too_complex = !for_profile && !preview_avatar && avatar->isTooComplex();
LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID()
- << " is " << ( too_complex ? "" : "not ") << "too complex"
- << LL_ENDL;
+ << " is " << ( too_complex ? "" : "not ") << "too complex"
+ << LL_ENDL;
pushRenderTypeMask();
@@ -11144,7 +11152,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar, bool
RENDER_TYPE_CLOUDS,
RENDER_TYPE_HUD_PARTICLES,
END_RENDER_TYPES
- );
+ );
}
if (specific_attachment && specific_attachment->isHUDAttachment())
@@ -11736,7 +11744,7 @@ void LLPipeline::hideDrawable( LLDrawable *pDrawable )
//hide the children
LLViewerObject::const_child_list_t& child_list = pDrawable->getVObj()->getChildren();
for ( LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
- iter != child_list.end(); iter++ )
+ iter != child_list.end(); iter++ )
{
LLViewerObject* child = *iter;
LLDrawable* drawable = child->mDrawable;
@@ -11754,7 +11762,7 @@ void LLPipeline::unhideDrawable( LLDrawable *pDrawable )
//restore children
LLViewerObject::const_child_list_t& child_list = pDrawable->getVObj()->getChildren();
for ( LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
- iter != child_list.end(); iter++)
+ iter != child_list.end(); iter++)
{
LLViewerObject* child = *iter;
LLDrawable* drawable = child->mDrawable;
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 0145a9c397..4bba462f78 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -233,12 +233,12 @@ public:
LLViewerObject* lineSegmentIntersectInHUD(const LLVector4a& start, const LLVector4a& end,
- bool pick_transparent,
- S32* face_hit, // return the face hit
- LLVector4a* intersection = NULL, // return the intersection point
- LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
- LLVector4a* normal = NULL, // return the surface normal at the intersection point
- LLVector4a* tangent = NULL // return the surface tangent at the intersection point
+ bool pick_transparent,
+ S32* face_hit, // return the face hit
+ LLVector4a* intersection = NULL, // return the intersection point
+ LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
+ LLVector4a* normal = NULL, // return the surface normal at the intersection point
+ LLVector4a* tangent = NULL // return the surface tangent at the intersection point
);
// Something about these textures has changed. Dirty them.
@@ -847,8 +847,8 @@ protected:
{
Light(LLDrawable* ptr, F32 d, F32 f = 0.0f)
: drawable(ptr),
- dist(d),
- fade(f)
+ dist(d),
+ fade(f)
{}
LLPointer<LLDrawable> drawable;
F32 dist;
diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml
index 4e7ce2c32f..0d22d37085 100644
--- a/indra/newview/skins/default/xui/en/floater_about.xml
+++ b/indra/newview/skins/default/xui/en/floater_about.xml
@@ -103,8 +103,8 @@ gwigz (nya) EmilyAmiee
Bavid Dailey Aria (Tashia Redrose)
Cate (32a) Hiroo Ono
Melodey Keysin (scoutkeysin)
-Yikes Lopez Padoria
-~ ( ^-^ ) ~ (cutie_qu)
+Yikes Lopez Padoria Teuden
+~ ( ^-^ ) ~ (cutie_qu) Markus Teuden
</text_editor>
<text
follows="top|left"
@@ -135,6 +135,7 @@ Vir Linden - Making it possible for the project to have a place in SL
nutsobvious - Early testing and video proof
Soft Linden - Security testing
Kyle Linden - Giving TPV parcel 2 to Erik Kundiman
+Signal Linden - Opening opportunities for Megapahit to contribute more
</text_editor>
</panel>
</accordion_tab>
diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml
index a96a4f2b75..97ff1fd5a2 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences.xml
@@ -1,201 +1,184 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater
-legacy_header_height="18"
-positioning="centered"
-default_tab_group="1"
-height="530"
-layout="topleft"
-name="Preferences"
-help_topic="preferences"
-save_rect="true"
-single_instance="true"
-title="PREFERENCES"
-width="658">
-
-<button
-follows="right|bottom"
-height="23"
-label="OK"
-label_selected="OK"
-layout="topleft"
-right="-105"
-name="OK"
-top="492"
-width="90">
- <button.commit_callback
- function="Pref.OK" />
-</button>
-
-<button
-follows="right|bottom"
-height="23"
-label="Cancel"
-label_selected="Cancel"
-layout="topleft"
-left_pad="5"
-name="Cancel"
-right="-10"
-width="90" >
- <button.commit_callback
- function="Pref.Cancel" />
-</button>
-
-<panel
-name="search_panel"
-layout="topleft"
-follows="left|top|right"
-left="4"
-right="-4"
-top="21"
-height="18"
-tab_group="2">
-
- <search_editor
- clear_button_visible="true"
- follows="left|top|right"
- height="18"
- label="Search Settings"
- layout="topleft"
- left="0"
- max_length_bytes="255"
- name="search_prefs_edit"
- right="-1"
- text_pad_left="6"
- tool_tip="Type the search term you are interested in here. Results will be displayed for partial fulltext matches within the setting's name or comment."
- top="0">
-
- <search_editor.commit_callback
- function="UpdateFilter" />
-
- <search_editor.clear_button
- rect.height="18"
- rect.width="18"
- rect.bottom="-1" />
-
- <search_editor.search_button
- rect.height="12"
- rect.width="12"
- rect.bottom="-1" />
- </search_editor>
-</panel>
-
-<tab_container
-follows="all"
-halign="left"
-height="440"
-layout="topleft"
-left="0"
-name="pref core"
-tab_group="1"
-tab_position="left"
-tab_width="140"
-tab_padding_right="0"
-top="40"
-width="658">
-
- <panel
- class="panel_preference"
- filename="panel_preferences_general.xml"
- label="General"
- layout="topleft"
- help_topic="preferences_general_tab"
- name="general" />
-
- <panel
- class="panel_preference_graphics"
- filename="panel_preferences_graphics1.xml"
- label="Graphics"
- layout="topleft"
- help_topic="preferences_display_tab"
- name="display" />
-
- <panel
- class="panel_preference_graphics3"
- filename="panel_preferences_graphics3.xml"
- label="Visual Effects"
- layout="topleft"
- help_topic="preferences_display_tab"
- name="display3" />
-
- <panel
- class="panel_preference"
- filename="panel_preferences_sound.xml"
- label="Sound &amp; Media"
- layout="topleft"
- help_topic="preferences_audio_tab"
- name="audio" />
-
- <panel
- class="panel_preference"
- filename="panel_preferences_chat.xml"
- label="Chat"
- layout="topleft"
- help_topic="preferences_chat_tab"
- name="chat" />
-
- <panel
- class="panel_preference"
- filename="panel_preferences_move.xml"
- label="Move &amp; View"
- layout="topleft"
- help_topic="preferences_move_tab"
- name="move" />
-
- <panel
- class="panel_preference"
- filename="panel_preferences_alerts.xml"
- label="Notifications"
- layout="topleft"
- help_topic="preferences_msgs_tab"
- name="msgs" />
-
- <panel
- class="panel_preference"
- filename="panel_preferences_colors.xml"
- label="Colors"
- layout="topleft"
- help_topic="preferences_colors_tab"
- name="colors" />
-
- <panel
- class="panel_preference_privacy"
- filename="panel_preferences_privacy.xml"
- label="Privacy"
- layout="topleft"
- help_topic="preferences_im_tab"
- name="im" />
-
- <panel
- class="panel_preference"
- filename="panel_preferences_setup.xml"
- label="Setup"
- layout="topleft"
- help_topic="preferences_input_tab"
- name="input" />
-
- <panel
- class="panel_preference"
- filename="panel_preferences_advanced.xml"
- label="Advanced"
- layout="topleft"
- help_topic="preferences_advanced1_tab"
- name="advanced1" />
-
- <panel
- class="panel_preference"
- filename="panel_preferences_uploads.xml"
- label="Uploads"
- layout="topleft"
- help_topic="preferences_uploads_tab"
- name="uploads" />
-
- <panel
- class="panel_preference_controls"
- filename="panel_preferences_controls.xml"
- label="Controls"
- layout="topleft"
- help_topic="preferences_controls_tab"
- name="controls" />
-</tab_container>
+ legacy_header_height="18"
+ positioning="centered"
+ default_tab_group="1"
+ height="530"
+ layout="topleft"
+ name="Preferences"
+ help_topic="preferences"
+ save_rect="true"
+ single_instance="true"
+ title="PREFERENCES"
+ width="658">
+ <button
+ follows="right|bottom"
+ height="23"
+ label="OK"
+ label_selected="OK"
+ layout="topleft"
+ right="-105"
+ name="OK"
+ top="492"
+ width="90">
+ <button.commit_callback
+ function="Pref.OK" />
+ </button>
+ <button
+ follows="right|bottom"
+ height="23"
+ label="Cancel"
+ label_selected="Cancel"
+ layout="topleft"
+ left_pad="5"
+ name="Cancel"
+ right="-10"
+ width="90" >
+ <button.commit_callback
+ function="Pref.Cancel" />
+ </button>
+
+ <panel
+ name="search_panel"
+ layout="topleft"
+ follows="left|top|right"
+ left="4"
+ right="-4"
+ top="21"
+ height="18"
+ tab_group="2">
+ <search_editor
+ clear_button_visible="true"
+ follows="left|top|right"
+ height="18"
+ label="Search Settings"
+ layout="topleft"
+ left="0"
+ max_length_bytes="255"
+ name="search_prefs_edit"
+ right="-1"
+ text_pad_left="6"
+ tool_tip="Type the search term you are interested in here. Results will be displayed for partial fulltext matches within the setting's name or comment."
+ top="0">
+ <search_editor.commit_callback
+ function="UpdateFilter" />
+ <search_editor.clear_button
+ rect.height="18"
+ rect.width="18"
+ rect.bottom="-1" />
+ <search_editor.search_button
+ rect.height="12"
+ rect.width="12"
+ rect.bottom="-1" />
+ </search_editor>
+ </panel>
+
+ <tab_container
+ follows="all"
+ halign="left"
+ height="440"
+ layout="topleft"
+ left="0"
+ name="pref core"
+ tab_group="1"
+ tab_position="left"
+ tab_width="140"
+ tab_padding_right="0"
+ top="40"
+ width="658">
+ <panel
+ class="panel_preference"
+ filename="panel_preferences_general.xml"
+ label="General"
+ layout="topleft"
+ help_topic="preferences_general_tab"
+ name="general" />
+ <panel
+ class="panel_preference_graphics"
+ filename="panel_preferences_graphics1.xml"
+ label="Graphics"
+ layout="topleft"
+ help_topic="preferences_display_tab"
+ name="display" />
+
+ <panel
+ class="panel_preference_graphics3"
+ filename="panel_preferences_graphics3.xml"
+ label="Visual Effects"
+ layout="topleft"
+ help_topic="preferences_display_tab"
+ name="display3" />
+
+ <panel
+ class="panel_preference"
+ filename="panel_preferences_sound.xml"
+ label="Sound &amp; Media"
+ layout="topleft"
+ help_topic="preferences_audio_tab"
+ name="audio" />
+ <panel
+ class="panel_preference"
+ filename="panel_preferences_chat.xml"
+ label="Chat"
+ layout="topleft"
+ help_topic="preferences_chat_tab"
+ name="chat" />
+ <panel
+ class="panel_preference"
+ filename="panel_preferences_move.xml"
+ label="Move &amp; View"
+ layout="topleft"
+ help_topic="preferences_move_tab"
+ name="move" />
+ <panel
+ class="panel_preference"
+ filename="panel_preferences_alerts.xml"
+ label="Notifications"
+ layout="topleft"
+ help_topic="preferences_msgs_tab"
+ name="msgs" />
+ <panel
+ class="panel_preference"
+ filename="panel_preferences_colors.xml"
+ label="Colors"
+ layout="topleft"
+ help_topic="preferences_colors_tab"
+ name="colors" />
+ <panel
+ class="panel_preference_privacy"
+ filename="panel_preferences_privacy.xml"
+ label="Privacy"
+ layout="topleft"
+ help_topic="preferences_im_tab"
+ name="im" />
+ <panel
+ class="panel_preference"
+ filename="panel_preferences_setup.xml"
+ label="Setup"
+ layout="topleft"
+ help_topic="preferences_input_tab"
+ name="input" />
+ <panel
+ class="panel_preference"
+ filename="panel_preferences_advanced.xml"
+ label="Advanced"
+ layout="topleft"
+ help_topic="preferences_advanced1_tab"
+ name="advanced1" />
+ <panel
+ class="panel_preference"
+ filename="panel_preferences_uploads.xml"
+ label="Uploads"
+ layout="topleft"
+ help_topic="preferences_uploads_tab"
+ name="uploads" />
+ <panel
+ class="panel_preference_controls"
+ filename="panel_preferences_controls.xml"
+ label="Controls"
+ layout="topleft"
+ help_topic="preferences_controls_tab"
+ name="controls" />
+ </tab_container>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
index ddb2833b5d..8acf870c9d 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
@@ -52,7 +52,7 @@
left_delta="330"
width="20">
m
- </text>
+ </text>
<slider
control_name="RenderMaxPartCount"
decimal_digits="0"
@@ -626,9 +626,9 @@
layout="topleft"
left="385"
name="vert_border"
- top="16"
+ top="16"
width="0"/>
-
+
<text
type="string"
length="1"
@@ -732,7 +732,7 @@
<check_box.commit_callback
function="Pref.RenderOptionUpdate" />
</check_box>
-
+
<text
type="string"
length="1"
@@ -751,7 +751,7 @@
height="18"
layout="topleft"
left_delta="130"
- top_delta="0"
+ top_delta="0"
name="ShadowDetail"
width="150">
<combo_box.item
@@ -785,7 +785,7 @@
<check_box.commit_callback
function="Pref.RenderOptionUpdate" />
</check_box>
-
+
<text
type="string"
length="1"
diff --git a/indra/newview/skins/default/xui/en/panel_performance_preferences.xml b/indra/newview/skins/default/xui/en/panel_performance_preferences.xml
index 8d4e8dc8e8..ece9bb2552 100644
--- a/indra/newview/skins/default/xui/en/panel_performance_preferences.xml
+++ b/indra/newview/skins/default/xui/en/panel_performance_preferences.xml
@@ -420,7 +420,6 @@
width="180">
(Enter value between 0.0 and 4.0)
</text>
-
<text
follows="left|top"
font="SansSerifSmall"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
index c38af9d4fa..8248da9fda 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -213,7 +213,6 @@
layout="topleft"
left="30"
name="stream_notification_channel_enabled"
- top_pad="10"
width="256">
</check_box>
<spinner
@@ -233,6 +232,15 @@
name="stream_notification_channel"
top_pad="-15"
width="170" />
+ <check_box
+ control_name="SnapshotTimestamp"
+ height="16"
+ label="Add timestamp to snapshot file names"
+ layout="topleft"
+ left="30"
+ name="snapshot_timestamp"
+ width="256">
+ </check_box>
<check_box
control_name="AllowMultipleViewers"
@@ -242,7 +250,7 @@
layout="topleft"
left="30"
name="allow_multiple_viewer_check"
- top_pad="20"
+ top_pad="15"
width="237"/>
<check_box
control_name="ForceShowGrid"
diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_local.xml b/indra/newview/skins/default/xui/en/panel_snapshot_local.xml
index ae203d68de..fb88b752ae 100644
--- a/indra/newview/skins/default/xui/en/panel_snapshot_local.xml
+++ b/indra/newview/skins/default/xui/en/panel_snapshot_local.xml
@@ -28,9 +28,9 @@
top_delta="2">
Disk
</text>
- <view_border
+ <view_border
bevel_style="in"
- follows="left|top|right"
+ follows="left|top|right"
height="1"
left="9"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index 3bf402b7fd..dbdec5b5ef 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -1,209 +1,209 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel
-background_opaque="true"
-background_visible="true"
-bg_opaque_color="DkGray"
-chrome="true"
-follows="top|right"
-height="19"
-layout="topleft"
-left="0"
-mouse_opaque="false"
-name="status"
-top="19"
-width="1000">
- <panel.string
- name="packet_loss_tooltip">
- Packet Loss
- </panel.string>
- <panel.string
- name="bandwidth_tooltip">
- Bandwidth
- </panel.string>
- <panel.string
- name="time">
- [hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
- </panel.string>
- <panel.string
- name="timeTooltip">
- [weekday, datetime, slt], [day, datetime, slt] [month, datetime, slt] [year, datetime, slt]
- </panel.string>
-<panel.string
- name="buycurrencylabel">
- L$ [AMT]
- </panel.string>
-<panel
- height="18"
- left="-398"
- top="0"
- width="120"
- follows="right|top"
- name="menu_search_panel"
- background_opaque="true"
- background_visible="true"
- bg_opaque_color="MouseGray">
- <search_editor
- clear_button_visible="true"
- follows="left|top"
- height="18"
- label="Search Menus"
- layout="topleft"
- left="0"
- max_length_bytes="255"
- name="search_menu_edit"
- right="-1"
- text_pad_left="6"
- tool_tip="Type the search term you are interested in here. Results will be displayed for partial fulltext matches within the menu."
- top="0">
- <search_button
- top_pad="4"
- left_pad="4"
- width="12"
- height="12"
- image_unselected="Search"
- image_selected="Search"/>
- <clear_button
- bottom="2"
- height="12"
- image_unselected="Icon_Close_Foreground"
- image_selected="Icon_Close_Press"
- pad_right="4"
- pad_left="4"
- width="12"/>
- </search_editor>
-</panel>
-<panel
- height="18"
- left="-398"
- width="185"
- top="1"
- follows="right|top"
- name="balance_bg">
- <text
- halign="center"
- font="SansSerifSmall"
- follows="all"
- height="18"
- left="0"
- name="balance"
- tool_tip="Click to refresh your L$ balance"
- v_pad="4"
- top="0"
- wrap="false"
- value="L$??"
- width="40" />
- <button
- halign="center"
- font="SansSerifSmall"
- follows="right|top|bottom"
- image_hover_unselected="PushButton_Over"
- image_unselected="PushButton_Off"
- image_pressed="PushButton_Press"
- height="18"
- label="Buy L$"
- label_color="White"
- left_pad="0"
- label_shadow="true"
- name="buyL"
- pad_right="0"
- tool_tip="Click to buy more L$"
- top="0"
- width="80" />
- <button
- halign="left"
- font="SansSerifSmall"
- follows="right|top|bottom"
- imgoverlay_label_space="7"
- image_overlay="Command_MiniCart_Icon"
- image_overlay_alignment="left"
- image_hover_unselected="PushButton_Over"
- image_unselected="PushButton_Off"
- image_pressed="PushButton_Press"
- height="18"
- label="Shop"
- label_color="White"
- left_pad="0"
- label_shadow="true"
- name="goShop"
- tool_tip="Open Second Life Marketplace"
- top="0"
- width="65" />
-</panel>
- <text
- type="string"
- font="SansSerifSmall"
- text_readonly_color="TimeTextColor"
- follows="right|top"
- halign="right"
- height="16"
- top="5"
- layout="topleft"
- left_pad="0"
- name="TimeText"
- tool_tip="Current time (Pacific)"
- width="85">
- 24:00 AM PST
- </text>
- <icon
- follows="right|top"
- height="16"
- image_name="Cam_FreeCam_Off"
- left_pad="8"
- top="2"
- name="presets_icon_camera"
- width="18" />
- <icon
- follows="right|top"
- height="13"
- image_name="Presets_Icon"
- left_pad="8"
- top="4"
- name="presets_icon_graphic"
- width="16" />
- <button
- follows="right|top"
- height="16"
- image_selected="Play_Off"
- image_unselected="Pause_Off"
- image_pressed="Pause_Press"
- image_pressed_selected="Play_Press"
- is_toggle="true"
- left_pad="5"
- top="1"
- name="media_toggle_btn"
- tool_tip="Start/Stop All Media (Music, Video, Web pages)"
- width="16" >
- </button>
- <button
- follows="right|top"
- height="16"
- image_selected="AudioMute_Off"
- image_pressed="Audio_Press"
- image_unselected="Audio_Off"
- is_toggle="true"
- left_pad="5"
- top="2"
- name="volume_btn"
- width="16" />
- <button
- type="string"
- font="SansSerif"
- image_unselected="mp_fpsButton"
- image_selected="mp_fpsButton"
- image_hover_unselected="mp_fpsButton"
- image_pressed="mp_fpsButton"
- image_pressed_selected="mp_fpsButton"
- image_color="White"
- label_color="FpsTextColor"
- follows="right|top"
- halign="center"
- valign="center"
- height="18"
- top="1"
- left_pad="2"
- name="FpsText"
- tool_tip="fps: Color indicates frametime fluctuations (Green is optimal)"
- width="32">
- 60
- </button>
+ background_opaque="true"
+ background_visible="true"
+ bg_opaque_color="DkGray"
+ chrome="true"
+ follows="top|right"
+ height="19"
+ layout="topleft"
+ left="0"
+ mouse_opaque="false"
+ name="status"
+ top="19"
+ width="1000">
+ <panel.string
+ name="packet_loss_tooltip">
+ Packet Loss
+ </panel.string>
+ <panel.string
+ name="bandwidth_tooltip">
+ Bandwidth
+ </panel.string>
+ <panel.string
+ name="time">
+ [hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
+ </panel.string>
+ <panel.string
+ name="timeTooltip">
+ [weekday, datetime, slt], [day, datetime, slt] [month, datetime, slt] [year, datetime, slt]
+ </panel.string>
+ <panel.string
+ name="buycurrencylabel">
+ L$ [AMT]
+ </panel.string>
+ <panel
+ height="18"
+ left="-398"
+ top="0"
+ width="120"
+ follows="right|top"
+ name="menu_search_panel"
+ background_opaque="true"
+ background_visible="true"
+ bg_opaque_color="MouseGray">
+ <search_editor
+ clear_button_visible="true"
+ follows="left|top"
+ height="18"
+ label="Search Menus"
+ layout="topleft"
+ left="0"
+ max_length_bytes="255"
+ name="search_menu_edit"
+ right="-1"
+ text_pad_left="6"
+ tool_tip="Type the search term you are interested in here. Results will be displayed for partial fulltext matches within the menu."
+ top="0">
+ <search_button
+ top_pad="4"
+ left_pad="4"
+ width="12"
+ height="12"
+ image_unselected="Search"
+ image_selected="Search"/>
+ <clear_button
+ bottom="2"
+ height="12"
+ image_unselected="Icon_Close_Foreground"
+ image_selected="Icon_Close_Press"
+ pad_right="4"
+ pad_left="4"
+ width="12"/>
+ </search_editor>
+ </panel>
+ <panel
+ height="18"
+ left="-398"
+ width="185"
+ top="1"
+ follows="right|top"
+ name="balance_bg">
+ <text
+ halign="center"
+ font="SansSerifSmall"
+ follows="all"
+ height="18"
+ left="0"
+ name="balance"
+ tool_tip="Click to refresh your L$ balance"
+ v_pad="4"
+ top="0"
+ wrap="false"
+ value="L$??"
+ width="40" />
+ <button
+ halign="center"
+ font="SansSerifSmall"
+ follows="right|top|bottom"
+ image_hover_unselected="PushButton_Over"
+ image_unselected="PushButton_Off"
+ image_pressed="PushButton_Press"
+ height="18"
+ label="Buy L$"
+ label_color="White"
+ left_pad="0"
+ label_shadow="true"
+ name="buyL"
+ pad_right="0"
+ tool_tip="Click to buy more L$"
+ top="0"
+ width="80" />
+ <button
+ halign="left"
+ font="SansSerifSmall"
+ follows="right|top|bottom"
+ imgoverlay_label_space="7"
+ image_overlay="Command_MiniCart_Icon"
+ image_overlay_alignment="left"
+ image_hover_unselected="PushButton_Over"
+ image_unselected="PushButton_Off"
+ image_pressed="PushButton_Press"
+ height="18"
+ label="Shop"
+ label_color="White"
+ left_pad="0"
+ label_shadow="true"
+ name="goShop"
+ tool_tip="Open Second Life Marketplace"
+ top="0"
+ width="65" />
+ </panel>
+ <text
+ type="string"
+ font="SansSerifSmall"
+ text_readonly_color="TimeTextColor"
+ follows="right|top"
+ halign="right"
+ height="16"
+ top="5"
+ layout="topleft"
+ left_pad="0"
+ name="TimeText"
+ tool_tip="Current time (Pacific)"
+ width="85">
+ 24:00 AM PST
+ </text>
+ <icon
+ follows="right|top"
+ height="16"
+ image_name="Cam_FreeCam_Off"
+ left_pad="8"
+ top="2"
+ name="presets_icon_camera"
+ width="18" />
+ <icon
+ follows="right|top"
+ height="13"
+ image_name="Presets_Icon"
+ left_pad="8"
+ top="4"
+ name="presets_icon_graphic"
+ width="16" />
+ <button
+ follows="right|top"
+ height="16"
+ image_selected="Play_Off"
+ image_unselected="Pause_Off"
+ image_pressed="Pause_Press"
+ image_pressed_selected="Play_Press"
+ is_toggle="true"
+ left_pad="5"
+ top="1"
+ name="media_toggle_btn"
+ tool_tip="Start/Stop All Media (Music, Video, Web pages)"
+ width="16" >
+ </button>
+ <button
+ follows="right|top"
+ height="16"
+ image_selected="AudioMute_Off"
+ image_pressed="Audio_Press"
+ image_unselected="Audio_Off"
+ is_toggle="true"
+ left_pad="5"
+ top="2"
+ name="volume_btn"
+ width="16" />
+ <button
+ type="string"
+ font="SansSerif"
+ image_unselected="mp_fpsButton"
+ image_selected="mp_fpsButton"
+ image_hover_unselected="mp_fpsButton"
+ image_pressed="mp_fpsButton"
+ image_pressed_selected="mp_fpsButton"
+ image_color="White"
+ label_color="FpsTextColor"
+ follows="right|top"
+ halign="center"
+ valign="center"
+ height="18"
+ top="1"
+ left_pad="2"
+ name="FpsText"
+ tool_tip="fps: Color indicates frametime fluctuations (Green is optimal)"
+ width="32">
+ 60
+ </button>
</panel>