diff options
-rwxr-xr-x | .hgtags | 1 | ||||
-rwxr-xr-x | indra/llrender/llglslshader.cpp | 17 | ||||
-rwxr-xr-x | indra/llrender/llglslshader.h | 2 | ||||
-rw-r--r-- | indra/newview/VIEWER_VERSION.txt | 2 | ||||
-rwxr-xr-x | indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl | 29 | ||||
-rwxr-xr-x | indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl | 1 |
6 files changed, 33 insertions, 19 deletions
@@ -463,3 +463,4 @@ fb1630153bac5552046ea914af3f14deabc1def8 3.6.0-materials-beta1 69429d81ae4dd321eda2607901ef0a0fde71b54c 3.6.0-release 69429d81ae4dd321eda2607901ef0a0fde71b54c 3.6.0-release 0a56f33ad6aa112032b14a41dad759ad377bdde9 3.6.0-release +75cf8e855ae1af6895a35da475314c2b5acf1850 3.6.1-release diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 2803f256df..52b00f7c15 100755 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -622,6 +622,7 @@ void LLGLSLShader::mapUniform(GLint index, const vector<LLStaticHashedString> * LLStaticHashedString hashedName(name); mUniformNameMap[location] = name; mUniformMap[hashedName] = location; + LL_DEBUGS("ShaderLoading") << "Uniform " << name << " is at location " << location << LL_ENDL; //find the index of this uniform @@ -1218,6 +1219,22 @@ void LLGLSLShader::uniform2i(const string& uniform, GLint i, GLint j) } } +void LLGLSLShader::uniform2i(const string& uniform, GLint i, GLint j) +{ + GLint location = getUniformLocation(uniform); + + if (location >= 0) + { + std::map<GLint, LLVector4>::iterator iter = mValue.find(location); + LLVector4 vec(i,j,0.f,0.f); + if (iter == mValue.end() || shouldChange(iter->second,vec)) + { + glUniform2iARB(location, i, j); + mValue[location] = vec; + } + } +} + void LLGLSLShader::uniform1f(const LLStaticHashedString& uniform, GLfloat v) { diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h index 376487daa9..7b2f5f04c2 100755 --- a/indra/llrender/llglslshader.h +++ b/indra/llrender/llglslshader.h @@ -111,7 +111,7 @@ public: void uniform2fv(U32 index, U32 count, const GLfloat* v); void uniform3fv(U32 index, U32 count, const GLfloat* v); void uniform4fv(U32 index, U32 count, const GLfloat* v); - void uniform2i(const std::string& uniform, GLint i, GLint j); + void uniform2i(const LLStaticHashedString& uniform, GLint i, GLint j); void uniformMatrix2fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v); void uniformMatrix3fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v); void uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v); diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 9575d51bad..b72762837e 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -3.6.1 +3.6.2 diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl index ff30560adc..efd0d03965 100755 --- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl +++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl @@ -26,28 +26,23 @@ ATTRIBUTE vec4 weight4; -uniform mat4 matrixPalette[64]; +uniform mat4 matrixPalette[32]; mat4 getObjectSkinnedTransform() { + int i; - float w0 = fract(weight4.x); - float w1 = fract(weight4.y); - float w2 = fract(weight4.z); - float w3 = fract(weight4.w); - - int i0 = int(floor(weight4.x)); - int i1 = int(floor(weight4.y)); - int i2 = int(floor(weight4.z)); - int i3 = int(floor(weight4.w)); - - //float scale = 1.0/(w.x+w.y+w.z+w.w); - //w *= scale; + vec4 w = fract(weight4); + vec4 index = floor(weight4); + + float scale = 1.0/(w.x+w.y+w.z+w.w); + w *= scale; - mat4 mat = matrixPalette[i0]*w0; - mat += matrixPalette[i1]*w1; - mat += matrixPalette[i2]*w2; - mat += matrixPalette[i3]*w3; + mat4 mat = matrixPalette[int(index.x)]*w.x; + mat += matrixPalette[int(index.y)]*w.y; + mat += matrixPalette[int(index.z)]*w.z; + mat += matrixPalette[int(index.w)]*w.w; return mat; } + diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index af3f362208..b666b7b0d9 100755 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -230,6 +230,7 @@ void main() } #endif + vec4 gamma_diff = diff; vec3 normal = vary_norm; vec3 l = light_position[0].xyz; |