Merge branch 'master' of git://github.com/Shyotl/SingularityViewer
This commit is contained in:
@@ -1225,6 +1225,7 @@ void LLShaderMgr::initAttribsAndUniforms()
|
||||
|
||||
mReservedUniforms.push_back("matrixPalette");
|
||||
mReservedUniforms.push_back("translationPalette");
|
||||
mReservedUniforms.push_back("maxWeight");
|
||||
|
||||
mReservedUniforms.push_back("screenTex");
|
||||
mReservedUniforms.push_back("screenDepth");
|
||||
|
||||
@@ -179,6 +179,7 @@ public:
|
||||
|
||||
AVATAR_MATRIX,
|
||||
AVATAR_TRANSLATION,
|
||||
AVATAR_MAX_WEIGHT,
|
||||
|
||||
WATER_SCREENTEX,
|
||||
WATER_SCREENDEPTH,
|
||||
|
||||
@@ -26,6 +26,7 @@ ATTRIBUTE vec4 weight4;
|
||||
|
||||
uniform mat3 matrixPalette[52];
|
||||
uniform vec3 translationPalette[52];
|
||||
uniform float maxWeight;
|
||||
|
||||
mat4 getObjectSkinnedTransform()
|
||||
{
|
||||
@@ -34,7 +35,7 @@ mat4 getObjectSkinnedTransform()
|
||||
vec4 w = fract(weight4);
|
||||
vec4 index = floor(weight4);
|
||||
|
||||
index = min(index, vec4(51.0));
|
||||
index = min(index, vec4(maxWeight));
|
||||
index = max(index, vec4( 0.0));
|
||||
|
||||
float scale = 1.0/(w.x+w.y+w.z+w.w);
|
||||
|
||||
@@ -457,11 +457,11 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
|
||||
|
||||
if (light_enabled) // Turn off lighting if it hasn't already been so.
|
||||
{
|
||||
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
|
||||
gPipeline.enableLightsDynamic();
|
||||
}
|
||||
else // Turn on lighting if it isn't already.
|
||||
{
|
||||
gPipeline.enableLightsDynamic();
|
||||
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1575,6 +1575,10 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
|
||||
for (U32 j = 0; j < count; ++j)
|
||||
{
|
||||
LLJoint* joint = avatar->getJoint(skin->mJointNames[j]);
|
||||
if(!joint)
|
||||
{
|
||||
joint = avatar->getJoint("mRoot");
|
||||
}
|
||||
if (joint)
|
||||
{
|
||||
mat[j] = skin->mInvBindMatrix[j];
|
||||
@@ -1599,7 +1603,7 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
|
||||
{
|
||||
F32 w = weight[j][k];
|
||||
|
||||
idx[k] = llclamp((S32) floorf(w), 0, 63);
|
||||
idx[k] = llclamp((S32) floorf(w), 0, S32(count-1));
|
||||
wght[k] = w - floorf(w);
|
||||
scale += wght[k];
|
||||
}
|
||||
@@ -1703,6 +1707,10 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
|
||||
for (U32 i = 0; i < count; ++i)
|
||||
{
|
||||
LLJoint* joint = avatar->getJoint(skin->mJointNames[i]);
|
||||
if(!joint)
|
||||
{
|
||||
joint = avatar->getJoint("mRoot");
|
||||
}
|
||||
if (joint)
|
||||
{
|
||||
mat[i] = skin->mInvBindMatrix[i];
|
||||
@@ -1747,7 +1755,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
|
||||
(GLfloat*) mp);
|
||||
|
||||
LLDrawPoolAvatar::sVertexProgram->uniform3fv(LLShaderMgr::AVATAR_TRANSLATION, count, transp);
|
||||
|
||||
LLDrawPoolAvatar::sVertexProgram->uniform1f(LLShaderMgr::AVATAR_MAX_WEIGHT, F32(count-1));
|
||||
|
||||
stop_glerror();
|
||||
}
|
||||
|
||||
@@ -4706,6 +4706,8 @@ void LLPipeline::renderDebug()
|
||||
if(!mRenderDebugMask)
|
||||
return;
|
||||
|
||||
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_LEQUAL);
|
||||
|
||||
// Debug stuff.
|
||||
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
|
||||
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
|
||||
|
||||
Reference in New Issue
Block a user