summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog18
-rw-r--r--debian/compat1
-rw-r--r--debian/control16
-rw-r--r--debian/copyright32
-rw-r--r--debian/postinst43
-rw-r--r--debian/postrm41
-rw-r--r--debian/preinst39
-rw-r--r--debian/prerm42
-rw-r--r--debian/rules118
-rw-r--r--indra/llrender/llgl.cpp3
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl1
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl14
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl1
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl16
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl1
-rw-r--r--indra/newview/lldrawpoolavatar.cpp40
-rw-r--r--indra/newview/llface.cpp6
-rw-r--r--indra/newview/llpanelface.cpp129
22 files changed, 493 insertions, 84 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000000..ce54b54c6f
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,18 @@
+secondlife-viewer (0.3) unstable; urgency=low
+
+ * Initial debian configuration
+
+ -- Don Kjer <don@lindenlab.com> Wed, 04 Jul 2012 00:43:03 +0000
+
+secondlife-viewer (0.2) unstable; urgency=low
+
+ * Adding default LSB headers for squeeze
+
+ -- Tyler Kohler <tyler@lindenlab.com> Thu, 24 Mar 2011 09:43:36 -0700
+
+secondlife-viewer (0.1) unstable; urgency=low
+
+ * Cloned from debian package skeleton.
+
+ -- Lex Linden <lex@lindenlab.com> Mon, 20 Sep 2010 08:01:59 -0700
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000000..7ed6ff82de
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000000..50b9ed9a26
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,16 @@
+Source: secondlife-viewer
+Section: unknown
+Priority: extra
+Maintainer: Don Linden <don@lindenlab.com>
+Build-Depends: debhelper (>= 5)
+Homepage: http://secondlife.com
+Standards-Version: 3.7.2
+
+Package: secondlife-viewer
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends},
+ ia32-libs,
+ ia32-libs-gtk
+Description: Second Life Viewer
+ Second Life is an online virtual world developed by Linden Lab.
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000000..106fa3802f
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,32 @@
+Second Life Viewer Copyright: 2000-2012 Linden Research, Inc.
+
+License:
+
+3Dconnexion SDK Copyright (C) 1992-2009 3Dconnexion
+APR Copyright (C) 2011 The Apache Software Foundation
+Collada DOM Copyright 2006 Sony Computer Entertainment Inc.
+cURL Copyright (C) 1996-2010, Daniel Stenberg, (daniel@haxx.se)
+DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc.
+expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd.
+FreeType Copyright (C) 1996-2002, 2006 David Turner, Robert Wilhelm, and Werner Lemberg.
+GL Copyright (C) 1999-2004 Brian Paul.
+GLOD Copyright (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns Hopkins University and David Luebke, Brenden Schubert, University of Virginia.
+google-perftools Copyright (c) 2005, Google Inc.
+Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited.
+jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW)
+jpeglib Copyright (C) 1991-1998, Thomas G. Lane.
+ogg/vorbis Copyright (C) 2002, Xiphophorus
+OpenSSL Copyright (C) 1998-2008 The OpenSSL Project.
+PCRE Copyright (c) 1997-2012 University of Cambridge
+SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
+SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
+zlib Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler.
+
+Second Life Viewer uses Havok (TM) Physics. (c)Copyright 1999-2010 Havok.com Inc. (and its Licensors). All Rights Reserved. See www.havok.com for details.
+
+This software contains source code provided by NVIDIA Corporation.
+
+All rights reserved. See licenses.txt for details.
+
+Voice chat Audio coding: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C)
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000000..2c4f8ea858
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,43 @@
+#!/bin/sh
+# postinst script for secondlife-viewer
+#
+# Delete this file if you don't need it.
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ configure)
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts. Don't delete this!
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/postrm b/debian/postrm
new file mode 100644
index 0000000000..a575936ab0
--- /dev/null
+++ b/debian/postrm
@@ -0,0 +1,41 @@
+#!/bin/sh
+# postrm script for secondlife-viewer
+#
+# Delete this file if you don't need it.
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <overwriter>
+# <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts. Don't delete this!
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/preinst b/debian/preinst
new file mode 100644
index 0000000000..f62243440f
--- /dev/null
+++ b/debian/preinst
@@ -0,0 +1,39 @@
+#!/bin/sh
+# preinst script for secondlife-viewer
+#
+# Delete this file if you don't need it.
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <new-preinst> `install'
+# * <new-preinst> `install' <old-version>
+# * <new-preinst> `upgrade' <old-version>
+# * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ install|upgrade)
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts. Don't delete this!
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/prerm b/debian/prerm
new file mode 100644
index 0000000000..405b8f9c87
--- /dev/null
+++ b/debian/prerm
@@ -0,0 +1,42 @@
+#!/bin/sh
+# prerm script for secondlife-viewer
+#
+# Delete this file if you don't need it.
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ ;;
+
+ failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts. Don't delete this!
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/rules b/debian/rules
new file mode 100644
index 0000000000..305fc58bb4
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,118 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+BASEDIR=opt/linden
+
+VIEWER_PKG=secondlife-viewer
+VIEWER_PACKAGEDIR=build-linux-i686/newview/packaged
+VIEWER_DESTDIR=$(CURDIR)/debian/$(VIEWER_PKG)
+VIEWER_VERSION:=$(shell dpkg-parsechangelog | grep ^Version | sed 's/^Version: //')
+VIEWER_INSTALLDIR:=$(BASEDIR)/viewer/SecondLife-i686-$(VIEWER_VERSION)
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ # Add here commands to configure the package.
+
+ touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ # Add here commands to compile the package.
+ #$(MAKE)
+ #docbook-to-man debian/secondlife-viewer.sgml > secondlife-viewer.1
+
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ # Add here commands to clean up after the build process.
+ #-$(MAKE) clean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/secondlife-viewer.
+ for file in $$(find $(VIEWER_PACKAGEDIR) -type f -o -type l | sed 's~$(VIEWER_PACKAGEDIR)/~~'); do \
+ # create containing directory \
+ install -v -m 755 -o root -g root -d "$$(dirname "$(VIEWER_DESTDIR)/$(VIEWER_INSTALLDIR)/$$file")"; \
+ PERM=644; \
+ if [ -x "$(VIEWER_PACKAGEDIR)/$$file" ]; then \
+ PERM=755; \
+ fi; \
+ if [ -L "$(VIEWER_PACKAGEDIR)/$$file" ]; then \
+ REAL="$$( readlink -f $(VIEWER_PACKAGEDIR)/$$file )"; \
+ RELATIVE="$$( echo $$REAL | sed 's~$(CURDIR)/$(VIEWER_PACKAGEDIR)/~~' )"; \
+ echo dh_link -p $(VIEWER_PKG) "$(VIEWER_INSTALLDIR)/$$RELATIVE" "$(VIEWER_INSTALLDIR)/$$file" ; \
+ dh_link -p $(VIEWER_PKG) "$(VIEWER_INSTALLDIR)/$$RELATIVE" "$(VIEWER_INSTALLDIR)/$$file" ; \
+ else \
+ install -v -m $$PERM -o root -g root "$(VIEWER_PACKAGEDIR)/$$file" "$(VIEWER_DESTDIR)/$(VIEWER_INSTALLDIR)/$$file"; \
+ fi; \
+ done
+ dh_link -p $(VIEWER_PKG) /$(VIEWER_INSTALLDIR)/secondlife /usr/bin/secondlife
+ dh_link -p $(VIEWER_PKG) $(BASEDIR)/viewer/SecondLife-i686-$(VIEWER_VERSION) $(BASEDIR)/viewer/SecondLife
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_python
+
+# To add an init script, uncomment this line and edit debian/init.d and
+# customize debian/secondlife-viewer.default to suit your needs.
+# dh_installinit
+
+# To add cron jobs, uncomment this line and make a crontab file named
+# debian/cron.d, and it will be installed in /etc/cron.d/
+# dh_installcron
+
+# dh_installinfo
+ dh_installman
+ dh_link
+# dh_strip
+ dh_compress
+# dh_fixperms
+# dh_perl
+# dh_makeshlibs
+ dh_installdeb
+# dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 8431744892..088ba95b75 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -760,12 +760,13 @@ bool LLGLManager::initGL()
{ //using multisample textures on ATI results in black screen for some reason
mHasTextureMultisample = FALSE;
}
-#endif
+
if (mIsIntel && mGLVersion <= 3.f)
{ //never try to use framebuffer objects on older intel drivers (crashy)
mHasFramebufferObject = FALSE;
}
+#endif
if (mHasFramebufferObject)
{
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
index db42a54e42..338532e71d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
@@ -137,6 +137,7 @@ void main()
if (spec.a > 0.0)
{
+ lit = min(da*6.0, 1.0) * dist_atten;
//vec3 ref = dot(pos+lv, norm);
vec3 h = normalize(lv+npos);
float nh = dot(norm, h);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
index 893a92299a..6675bfde69 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
@@ -78,9 +78,15 @@ vec3 decode_normal (vec2 enc)
return n;
}
+vec4 correctWithGamma(vec4 col)
+{
+ return vec4(pow(col.rgb, vec3(2.2)), col.a);
+}
+
vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
{
vec4 ret = texture2DLod(projectionMap, tc, lod);
+ ret = correctWithGamma(ret);
vec2 dist = tc-vec2(0.5);
@@ -96,7 +102,8 @@ vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod)
{
vec4 ret = texture2DLod(projectionMap, tc, lod);
-
+ ret = correctWithGamma(ret);
+
vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
float det = min(lod/(proj_lod*0.5), 1.0);
@@ -113,7 +120,8 @@ vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod)
vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod)
{
vec4 ret = texture2DLod(projectionMap, tc, lod);
-
+ ret = correctWithGamma(ret);
+
vec2 dist = tc-vec2(0.5);
float d = dot(dist,dist);
@@ -226,6 +234,8 @@ void main()
if (spec.a > 0.0)
{
+ dlit *= min(da*6.0, 1.0) * dist_atten;
+
vec3 npos = -normalize(pos);
//vec3 ref = dot(pos+lv, norm);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
index 36406cbf57..69cdb2ce71 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
@@ -119,6 +119,8 @@ void main()
vec4 spec = texture2DRect(specularRect, frag.xy);
if (spec.a > 0.0)
{
+ lit = min(da*6.0, 1.0) * dist_atten;
+
vec3 npos = -normalize(pos);
vec3 h = normalize(lv+npos);
float nh = dot(norm, h);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 5d936233fe..a1dff9188f 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -321,8 +321,6 @@ void main()
col += spec_contrib;
}
- col = mix(col.rgb, diffuse.rgb, diffuse.a);
-
if (envIntensity > 0.0)
{ //add environmentmap
vec3 env_vec = env_mat * refnormpersp;
@@ -332,6 +330,8 @@ void main()
col = atmosLighting(col);
col = scaleSoftClip(col);
+
+ col = mix(col.rgb, diffuse.rgb, diffuse.a);
}
frag_color.rgb = col;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
index b29f676ecc..c918a42c73 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
@@ -234,6 +234,7 @@ void main()
if (spec.a > 0.0)
{
+ dlit *= min(da*6.0, 1.0) * dist_atten;
vec3 npos = -normalize(pos);
//vec3 ref = dot(pos+lv, norm);
diff --git a/indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl
index 8494ffba52..9064904191 100644
--- a/indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl
@@ -48,11 +48,9 @@ void main()
mat = modelview_matrix * mat;
vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz;
+ vertex_color = emissive;
+
calcAtmospherics(pos.xyz);
- vertex_color = emissive;
-
gl_Position = projection_matrix*vec4(pos, 1.0);
-
-
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
index 9ddbb6da6a..a6b0f7e7c1 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
@@ -79,10 +79,17 @@ vec3 decode_normal (vec2 enc)
return n;
}
+vec4 correctWithGamma(vec4 col)
+{
+ return vec4(pow(col.rgb, vec3(2.2)), col.a);
+}
+
+
vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
{
vec4 ret = texture2DLod(projectionMap, tc, lod);
-
+ ret = correctWithGamma(ret);
+
vec2 dist = tc-vec2(0.5);
float det = max(1.0-lod/(proj_lod*0.5), 0.0);
@@ -97,7 +104,8 @@ vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod)
{
vec4 ret = texture2DLod(projectionMap, tc, lod);
-
+ ret = correctWithGamma(ret);
+
vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
float det = min(lod/(proj_lod*0.5), 1.0);
@@ -114,7 +122,8 @@ vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod)
vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod)
{
vec4 ret = texture2DLod(projectionMap, tc, lod);
-
+ ret = correctWithGamma(ret);
+
vec2 dist = tc-vec2(0.5);
float d = dot(dist,dist);
@@ -243,6 +252,7 @@ void main()
if (spec.a > 0.0)
{
vec3 npos = -normalize(pos);
+ dlit *= min(da*6.0, 1.0) * dist_atten;
//vec3 ref = dot(pos+lv, norm);
vec3 h = normalize(lv+npos);
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 15584548cc..10a598a85c 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -330,8 +330,6 @@ void main()
col += spec_contrib;
}
- col = mix(col, diffuse.rgb, diffuse.a);
-
if (envIntensity > 0.0)
{ //add environmentmap
vec3 env_vec = env_mat * refnormpersp;
@@ -341,6 +339,8 @@ void main()
col = atmosLighting(col);
col = scaleSoftClip(col);
+
+ col = mix(col.rgb, diffuse.rgb, diffuse.a);
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
index aa964fa0a3..91ff1f1e76 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
@@ -248,6 +248,7 @@ void main()
if (spec.a > 0.0)
{
+ dlit *= min(da*6.0, 1.0) * dist_atten;
vec3 npos = -normalize(pos);
//vec3 ref = dot(pos+lv, norm);
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 612741e57c..69f10cd4df 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -182,6 +182,7 @@ void LLDrawPoolAvatar::beginDeferredPass(S32 pass)
break;
case 4:
beginDeferredRiggedBump();
+ break;
default:
beginDeferredRiggedMaterial(pass-5);
break;
@@ -252,10 +253,11 @@ void LLDrawPoolAvatar::beginPostDeferredPass(S32 pass)
case 4:
beginRiggedFullbrightAlpha();
break;
- case 5:
+ case 9:
beginRiggedGlow();
+ break;
default:
- beginDeferredRiggedMaterialAlpha(pass-6);
+ beginDeferredRiggedMaterialAlpha(pass-5);
break;
}
}
@@ -368,14 +370,14 @@ void LLDrawPoolAvatar::renderPostDeferred(S32 pass)
13, //rigged glow
};
- pass = actual_pass[pass];
+ S32 p = actual_pass[pass];
if (LLPipeline::sImpostorRender)
{ //HACK for impostors so actual pass ends up being proper pass
- pass -= 2;
+ p -= 2;
}
- render(pass);
+ render(p);
}
@@ -1299,20 +1301,28 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
return;
}
- S32 p = 0;
- switch (pass)
+ if (LLPipeline::sRenderDeferred)
{
- case 9: p = 1; break;
- case 10: p = 5; break;
- case 11: p = 9; break;
- case 12: p = 13; break;
- }
+ S32 p = 0;
+ switch (pass)
+ {
+ case 9: p = 1; break;
+ case 10: p = 5; break;
+ case 11: p = 9; break;
+ case 12: p = 13; break;
+ }
+ {
+ LLGLEnable blend(GL_BLEND);
+ renderDeferredRiggedMaterial(avatarp, p);
+ }
+ return;
+ }
+ else if (pass == 9)
{
- LLGLEnable blend(GL_BLEND);
- renderDeferredRiggedMaterial(avatarp, p);
+ renderRiggedGlow(avatarp);
+ return;
}
- return;
}
if (pass == 13)
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 6474e1b1de..08a16c9c33 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1097,6 +1097,12 @@ bool LLFace::canRenderAsMask()
{
return false;
}
+
+ LLMaterial* mat = te->getMaterialParams();
+ if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)
+ {
+ return false;
+ }
if ((te->getColor().mV[3] == 1.0f) && // can't treat as mask if we have face alpha
(te->getGlow() == 0.f) && // glowing masks are hard to implement - don't mask
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 67ef072508..1a3f4832fd 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -1569,19 +1569,30 @@ void LLPanelFace::getState()
LLMaterialID get(LLViewerObject* object, S32 te_index)
{
LLMaterialID material_id;
-
+
return object->getTE(te_index)->getMaterialID();
}
} func;
- identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, mMaterialID );
- llinfos << "Material ID returned: '"
- << mMaterialID.asString() << "', isNull? "
- << (mMaterialID.isNull()?"TRUE":"FALSE") << llendl;
+
+ LLObjectSelectionHandle sel = LLSelectMgr::getInstance()->getSelection();
+ LLSelectNode* node = sel->getFirstNode();
+ if (node)
+ {
+ int selected_te = node->getLastSelectedTE();
+ if (selected_te >= 0)
+ {
+ mMaterialID = node->getObject()->getTE(selected_te)->getMaterialID();
+ }
+ }
+
+ llinfos << "Material ID returned: '" << mMaterialID.asString() << "', isNull? " << (mMaterialID.isNull()?"TRUE":"FALSE") << llendl;
+
if (!mMaterialID.isNull() && editable)
{
llinfos << "Requesting material ID " << mMaterialID.asString() << llendl;
- LLMaterialMgr::getInstance()->get(objectp->getRegion()->getRegionID(),mMaterialID,boost::bind(&LLPanelFace::onMaterialLoaded, this, _1, _2));
+ LLMaterialMgr::getInstance()->get(objectp->getRegion()->getRegionID(),mMaterialID,boost::bind(&LLPanelFace::onMaterialLoaded, this, _1, _2));
}
+
}
// Set variable values for numeric expressions
@@ -1774,14 +1785,38 @@ void LLPanelFace::updateMaterial()
mMaterial = LLMaterialPtr(new LLMaterial());
}
- mMaterial->setDiffuseAlphaMode(getChild<LLComboBox>("combobox alphamode")->getCurrentIndex());
- mMaterial->setAlphaMaskCutoff((U8)(getChild<LLUICtrl>("maskcutoff")->getValue().asInteger()));
+ LLMaterialPtr material_to_set = mMaterial;
+
+ // If we're editing a single face and not the entire material for an object,
+ // we need to clone the material so that our changes to the material's settings
+ // don't automatically propagate to the non-selected faces
+ // NORSPEC-92
+ //
+ LLObjectSelectionHandle sel = LLSelectMgr::getInstance()->getSelection();
+ LLSelectNode* node = sel->getFirstNode();
+ if (node)
+ {
+ if (node->getTESelectMask() != TE_SELECT_MASK_ALL)
+ {
+ llinfos << "Cloning material to apply to subselection." << llendl;
+ material_to_set = new LLMaterial(mMaterial->asLLSD());
+ }
+ else
+ {
+ llinfos << "Apply material change to whole selection." << llendl;
+ }
+ }
+
+ llassert(!material_to_set.isNull());
+
+ material_to_set->setDiffuseAlphaMode(getChild<LLComboBox>("combobox alphamode")->getCurrentIndex());
+ material_to_set->setAlphaMaskCutoff((U8)(getChild<LLUICtrl>("maskcutoff")->getValue().asInteger()));
LLUUID norm_map_id = getChild<LLTextureCtrl>("bumpytexture control")->getImageAssetID();
if (!norm_map_id.isNull())
{
LL_DEBUGS("Materials") << "Setting bumpy texture, bumpiness = " << bumpiness << LL_ENDL;
- mMaterial->setNormalID(norm_map_id);
+ material_to_set->setNormalID(norm_map_id);
F32 bumpy_scale_u = getChild<LLUICtrl>("bumpyScaleU")->getValue().asReal();
F32 bumpy_scale_v = getChild<LLUICtrl>("bumpyScaleV")->getValue().asReal();
@@ -1792,18 +1827,18 @@ void LLPanelFace::updateMaterial()
bumpy_scale_v *= 0.5f;
}
- mMaterial->setNormalOffset(getChild<LLUICtrl>("bumpyOffsetU")->getValue().asReal(),
+ material_to_set->setNormalOffset(getChild<LLUICtrl>("bumpyOffsetU")->getValue().asReal(),
getChild<LLUICtrl>("bumpyOffsetV")->getValue().asReal());
- mMaterial->setNormalRepeat(bumpy_scale_u, bumpy_scale_v);
- mMaterial->setNormalRotation(getChild<LLUICtrl>("bumpyRot")->getValue().asReal()*DEG_TO_RAD);
+ material_to_set->setNormalRepeat(bumpy_scale_u, bumpy_scale_v);
+ material_to_set->setNormalRotation(getChild<LLUICtrl>("bumpyRot")->getValue().asReal()*DEG_TO_RAD);
}
else
{
LL_DEBUGS("Materials") << "Removing bumpy texture, bumpiness = " << bumpiness << LL_ENDL;
- mMaterial->setNormalID(LLUUID());
- mMaterial->setNormalOffset(0.0f,0.0f);
- mMaterial->setNormalRepeat(1.0f,1.0f);
- mMaterial->setNormalRotation(0.0f);
+ material_to_set->setNormalID(LLUUID());
+ material_to_set->setNormalOffset(0.0f,0.0f);
+ material_to_set->setNormalRepeat(1.0f,1.0f);
+ material_to_set->setNormalRotation(0.0f);
}
LLUUID spec_map_id = getChild<LLTextureCtrl>("shinytexture control")->getImageAssetID();
@@ -1811,8 +1846,8 @@ void LLPanelFace::updateMaterial()
if (!spec_map_id.isNull())
{
LL_DEBUGS("Materials") << "Setting shiny texture, shininess = " << shininess << LL_ENDL;
- mMaterial->setSpecularID(spec_map_id);
- mMaterial->setSpecularOffset(getChild<LLUICtrl>("shinyOffsetU")->getValue().asReal(),
+ material_to_set->setSpecularID(spec_map_id);
+ material_to_set->setSpecularOffset(getChild<LLUICtrl>("shinyOffsetU")->getValue().asReal(),
getChild<LLUICtrl>("shinyOffsetV")->getValue().asReal());
F32 shiny_scale_u = getChild<LLUICtrl>("shinyScaleU")->getValue().asReal();
@@ -1824,48 +1859,32 @@ void LLPanelFace::updateMaterial()
shiny_scale_v *= 0.5f;
}
- mMaterial->setSpecularRepeat(shiny_scale_u, shiny_scale_v);
- mMaterial->setSpecularRotation(getChild<LLUICtrl>("shinyRot")->getValue().asReal()*DEG_TO_RAD);
+ material_to_set->setSpecularRepeat(shiny_scale_u, shiny_scale_v);
+ material_to_set->setSpecularRotation(getChild<LLUICtrl>("shinyRot")->getValue().asReal()*DEG_TO_RAD);
//override shininess to 0.2f if this is a new material
if (!new_material)
{
- mMaterial->setSpecularLightColor(getChild<LLColorSwatchCtrl>("shinycolorswatch")->get());
- mMaterial->setSpecularLightExponent(getChild<LLUICtrl>("glossiness")->getValue().asInteger());
- mMaterial->setEnvironmentIntensity(getChild<LLUICtrl>("environment")->getValue().asInteger());
+ material_to_set->setSpecularLightColor(getChild<LLColorSwatchCtrl>("shinycolorswatch")->get());
+ material_to_set->setSpecularLightExponent(getChild<LLUICtrl>("glossiness")->getValue().asInteger());
+ material_to_set->setEnvironmentIntensity(getChild<LLUICtrl>("environment")->getValue().asInteger());
}
}
else
{
LL_DEBUGS("Materials") << "Removing shiny texture, shininess = " << shininess << LL_ENDL;
- mMaterial->setSpecularID(LLUUID());
- mMaterial->setSpecularOffset(0.0f,0.0f);
- mMaterial->setSpecularRepeat(1.0f,1.0f);
- mMaterial->setSpecularRotation(0.0f);
- mMaterial->setSpecularLightColor(LLMaterial::DEFAULT_SPECULAR_LIGHT_COLOR);
- mMaterial->setSpecularLightExponent(LLMaterial::DEFAULT_SPECULAR_LIGHT_EXPONENT);
- mMaterial->setEnvironmentIntensity(0);
+ material_to_set->setSpecularID(LLUUID());
+ material_to_set->setSpecularOffset(0.0f,0.0f);
+ material_to_set->setSpecularRepeat(1.0f,1.0f);
+ material_to_set->setSpecularRotation(0.0f);
+ material_to_set->setSpecularLightColor(LLMaterial::DEFAULT_SPECULAR_LIGHT_COLOR);
+ material_to_set->setSpecularLightExponent(LLMaterial::DEFAULT_SPECULAR_LIGHT_EXPONENT);
+ material_to_set->setEnvironmentIntensity(0);
}
- LL_DEBUGS("Materials") << "Updating material: " << mMaterial->asLLSD() << LL_ENDL;
-
- LLMaterialPtr material_to_set = mMaterial;
-
- // If we're editing a single face and not the entire material for an object,
- // we need to clone the material so that our changes to the material's settings
- // don't automatically propagate to the non-selected faces
- // NORSPEC-92
- //
- LLObjectSelectionHandle sel = LLSelectMgr::getInstance()->getSelection();
- LLSelectNode* node = sel->getFirstNode();
- if (node)
- {
- if (node->getTESelectMask() != TE_SELECT_MASK_ALL)
- {
- material_to_set = new LLMaterial(*mMaterial);
- }
- }
- LLSelectMgr::getInstance()->selectionSetMaterial( material_to_set );
+ LL_DEBUGS("Materials") << "Updating material: " << material_to_set->asLLSD() << LL_ENDL;
+
+ LLSelectMgr::getInstance()->selectionSetMaterial( material_to_set );
}
else
{
@@ -1934,11 +1953,11 @@ void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata)
U32 materials_media = combo_matmedia->getCurrentIndex();
U32 material_type = combo_mattype->getCurrentIndex();
bool show_media = (materials_media == MATMEDIA_MEDIA) && combo_matmedia->getEnabled();
- bool show_texture = (!show_media) && (material_type == MATTYPE_DIFFUSE) && combo_matmedia->getEnabled();
+ bool show_texture = (show_media || ((material_type == MATTYPE_DIFFUSE) && combo_matmedia->getEnabled()));
bool show_bumpiness = (!show_media) && (material_type == MATTYPE_NORMAL) && combo_matmedia->getEnabled();
bool show_shininess = (!show_media) && (material_type == MATTYPE_SPECULAR) && combo_matmedia->getEnabled();
self->getChildView("combobox mattype")->setVisible(!show_media);
- self->getChildView("rptctrl")->setVisible(!show_media);
+ self->getChildView("rptctrl")->setVisible(show_texture);
// Media controls
self->getChildView("media_info")->setVisible(show_media);
@@ -1947,12 +1966,12 @@ void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata)
self->getChildView("button align")->setVisible(show_media);
// Diffuse texture controls
- self->getChildView("texture control")->setVisible(show_texture);
- self->getChildView("label alphamode")->setVisible(show_texture);
- self->getChildView("combobox alphamode")->setVisible(show_texture);
+ self->getChildView("texture control")->setVisible(show_texture && !show_media);
+ self->getChildView("label alphamode")->setVisible(show_texture && !show_media);
+ self->getChildView("combobox alphamode")->setVisible(show_texture && !show_media);
self->getChildView("label maskcutoff")->setVisible(false);
self->getChildView("maskcutoff")->setVisible(false);
- if (show_texture)
+ if (show_texture && !show_media)
{
updateAlphaControls(ctrl, userdata);
}