summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings
diff options
context:
space:
mode:
authorAura Linden <aura@lindenlab.com>2012-08-17 08:07:15 -0700
committerAura Linden <aura@lindenlab.com>2012-08-17 08:07:15 -0700
commitefdcf045b064335aa180f03bae58916af19e2169 (patch)
tree4ca0be04bf1688b728b40be0d6b4221956127918 /indra/newview/app_settings
parent56298eed3d8ae586ab2ae4c7b8dcf53eeede7394 (diff)
parent7204593ec3f6fca63c32bcb8cdcf9c356165d24e (diff)
Merged in from viewer-development.
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r--indra/newview/app_settings/cmd_line.xml46
-rw-r--r--indra/newview/app_settings/keywords.ini92
-rwxr-xr-x[-rw-r--r--]indra/newview/app_settings/logcontrol.xml0
-rwxr-xr-x[-rw-r--r--]indra/newview/app_settings/settings.xml401
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/pathfindingF.glsl37
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/pathfindingNoNormalV.glsl42
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl54
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl42
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl40
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl37
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl45
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl49
12 files changed, 728 insertions, 157 deletions
diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml
index be79f91919..7ab7787d77 100644
--- a/indra/newview/app_settings/cmd_line.xml
+++ b/indra/newview/app_settings/cmd_line.xml
@@ -101,7 +101,7 @@
<key>grid</key>
<map>
<key>desc</key>
- <string>Specify the name of the grid, local, or an IP address to connect to.</string>
+ <string>Specify the name of the grid to connect to.</string>
<key>count</key>
<integer>1</integer>
<key>map-to</key>
@@ -117,16 +117,6 @@
<string>h</string>
</map>
- <key>helperuri</key>
- <map>
- <key>desc</key>
- <string>helper web CGI prefix to use</string>
- <key>count</key>
- <integer>1</integer>
- <key>map-to</key>
- <string>CmdLineHelperURI</string>
- </map>
-
<key>ignorepixeldepth</key>
<map>
<key>desc</key>
@@ -163,7 +153,7 @@
<key>map-to</key>
<string>UserLogFile</string>
</map>
-
+
<key>login</key>
<map>
<key>desc</key>
@@ -174,28 +164,6 @@
<string>UserLoginInfo</string>
</map>
- <key>loginpage</key>
- <map>
- <key>desc</key>
- <string>Login authentication page to use.</string>
- <key>count</key>
- <integer>1</integer>
- <key>map-to</key>
- <string>LoginPage</string>
- </map>
-
- <key>loginuri</key>
- <map>
- <key>desc</key>
- <string>login server and CGI script to use</string>
- <key>count</key>
- <integer>1</integer>
- <key>compose</key>
- <boolean>true</boolean>
- <key>map-to</key>
- <string>CmdLineLoginURI</string>
- </map>
-
<key>logmetrics</key>
<map>
<key>desc</key>
@@ -226,7 +194,7 @@
<map>
<key>map-to</key>
<string>NoAudio</string>
- </map>
+ </map>
<key>noinvlib</key>
<map>
@@ -242,7 +210,7 @@
<string>User will not get any notifications. NOTE: All notifications that occur will get added to ignore file for future runs.</string>
<key>map-to</key>
<string>IgnoreAllNotifications</string>
- </map>
+ </map>
<key>nopreload</key>
<map>
@@ -321,7 +289,7 @@
<key>map-to</key>
<string>QuitAfterSeconds</string>
</map>
-
+
<key>replaysession</key>
<map>
<key>desc</key>
@@ -335,7 +303,7 @@
<key>map-to</key>
<string>RotateRight</string>
</map>
-
+
<key>safe</key>
<map>
<key>desc</key>
@@ -389,7 +357,7 @@
<key>count</key>
<integer>1</integer>
<key>map-to</key>
- <string>SkinFolder</string>
+ <string>SkinCurrent</string>
</map>
<key>slurl</key>
diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini
index 318b69438a..6120f22ba4 100644
--- a/indra/newview/app_settings/keywords.ini
+++ b/indra/newview/app_settings/keywords.ini
@@ -559,6 +559,98 @@ STATUS_NOT_SUPPORTED Feature not supported
STATUS_INTERNAL_ERROR An internal error occurred
STATUS_WHITELIST_FAILED URL failed to pass whitelist
+PROFILE_NONE Disables profiling
+PROFILE_SCRIPT_MEMORY Enables memory profiling
+
+RC_DATA_FLAGS TODO: add documentation
+RC_DETECT_PHANTOM TODO: add documentation
+RC_GET_LINK_NUM TODO: add documentation
+RC_GET_NORMAL TODO: add documentation
+RC_GET_ROOT_KEY TODO: add documentation
+RC_MAX_HITS TODO: add documentation
+RC_REJECT_TYPES Optional parameter set in llCastRay() to reject hit against certain object types.
+RC_REJECT_AGENTS Bit mask for RC_REJECT_TYPES, rejects hits against avatars.
+RC_REJECT_PHYSICAL Bit mask for RC_REJECT_TYPES, rejects hits against moving objects.
+RC_REJECT_NONPHYSICAL Bit mask for RC_REJECT_TYPES, rejects hits against non-moving objects.
+RC_REJECT_LAND Bit mask for RC_REJECT_TYPES, rejects hits against the terrian.
+
+RCERR_CAST_TIME_EXCEEDED TODO: add documentation
+RCERR_SIM_PERF_LOW TODO: add documentation
+RCERR_UNKNOWN TODO: add documentation
+
+ESTATE_ACCESS_ALLOWED_AGENT_ADD TODO: add documentation
+ESTATE_ACCESS_ALLOWED_AGENT_REMOVE TODO: add documentation
+ESTATE_ACCESS_ALLOWED_GROUP_ADD TODO: add documentation
+ESTATE_ACCESS_ALLOWED_GROUP_REMOVE TODO: add documentation
+ESTATE_ACCESS_BANNED_AGENT_ADD TODO: add documentation
+ESTATE_ACCESS_BANNED_AGENT_REMOVE TODO: add documentation
+
+DENSITY TODO: add documentation
+FRICTION TODO: add documentation
+RESTITUTION TODO: add documentation
+GRAVITY_MULTIPLIER TODO: add documentation
+
+KFM_COMMAND TODO: add documentation
+KFM_CMD_PLAY TODO: add documentation
+KFM_CMD_STOP TODO: add documentation
+KFM_CMD_PAUSE TODO: add documentation
+KFM_CMD_SET_MODE TODO: add documentation
+KFM_MODE TODO: add documentation
+KFM_FORWARD TODO: add documentation
+KFM_LOOP TODO: add documentation
+KFM_PING_PONG TODO: add documentation
+KFM_REVERSE TODO: add documentation
+KFM_DATA TODO: add documentation
+KFM_ROTATION TODO: add documentation
+KFM_TRANSLATION TODO: add documentation
+
+CHARACTER_CMD_STOP TODO: add documentation
+CHARACTER_CMD_JUMP TODO: add documentation
+
+CHARACTER_DESIRED_SPEED TODO: add documentation
+CHARACTER_RADIUS TODO: add documentation
+CHARACTER_LENGTH TODO: add documentation
+CHARACTER_ORIENTATION TODO: add documentation
+CHARACTER_AVOIDANCE_MODE TODO: add documentation
+PURSUIT_OFFSET TODO: add documentation
+REQUIRE_LINE_OF_SIGHT TODO: add documentation
+PURSUIT_FUZZ_FACTOR TODO: add documentation
+PURSUIT_INTERCEPT TODO: add documentation
+FORCE_DIRECT_PATH TODO: add documentation
+VERTICAL TODO: add documentation
+HORIZONTAL TODO: add documentation
+AVOID_CHARACTERS TODO: add documentation
+AVOID_DYNAMIC_OBSTACLES TODO: add documentation
+
+PU_EVADE_HIDDEN Triggered when an llEvade character thinks it has hidden from its pursuer.
+PU_EVADE_SPOTTED Triggered when an llEvade character switches from hiding to running
+PU_FAILURE_INVALID_GOAL Goal is not on the navigation-mesh and cannot be reached.
+PU_FAILURE_INVALID_START Character cannot navigate from the current location - e.g., the character is off the navmesh or too high above it.
+PU_FAILURE_NO_VALID_DESTINATION There's no good place for the character to go - e.g., it is patrolling and all the patrol points are now unreachable.
+PU_FAILURE_OTHER Unknown failure
+PU_FAILURE_TARGET_GONE Target (for llPursue or llEvade) can no longer be tracked - e.g., it left the region or is an avatar that is now more than about 30m outside the region.
+PU_FAILURE_UNREACHABLE Goal is no longer reachable for some reason - e.g., an obstacle blocks the path.
+PU_GOAL_REACHED Character has reached the goal and will stop or choose a new goal (if wandering).
+PU_SLOWDOWN_DISTANCE_REACHED Character is near current goal.
+
+CHARACTER_TYPE TODO: add documentation
+CHARACTER_TYPE_A TODO: add documentation
+CHARACTER_TYPE_B TODO: add documentation
+CHARACTER_TYPE_C TODO: add documentation
+CHARACTER_TYPE_D TODO: add documentation
+CHARACTER_TYPE_NONE TODO: add documentation
+
+TRAVERSAL_TYPE TODO: add documentation
+TRAVERSAL_TYPE_SLOW TODO: add documentation
+TRAVERSAL_TYPE_FAST TODO: add documentation
+TRAVERSAL_TYPE_NONE TODO: add documentation
+
+CHARACTER_MAX_ACCEL TODO: add documentation
+CHARACTER_MAX_DECEL TODO: add documentation
+CHARACTER_MAX_ANGULAR_SPEED TODO: add documentation
+CHARACTER_MAX_ANGULAR_ACCEL TODO: add documentation
+CHARACTER_TURN_SPEED_MULTIPLIER TODO: add documentation
+
# string constants
[word .1, .3, .5]
NULL_KEY Indicates an empty key
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index 64122bbb6c..64122bbb6c 100644..100755
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 5e50bd6e01..5e42fc29f7 100644..100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3270,6 +3270,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>FastCacheFetchEnabled</key>
+ <map>
+ <key>Comment</key>
+ <string>Enable texture fast cache fetching if set</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <string>1</string>
+ </map>
<key>FeatureManagerHTTPTable</key>
<map>
<key>Comment</key>
@@ -5023,7 +5034,7 @@
<key>LoginLocation</key>
<map>
<key>Comment</key>
- <string>Login location ('last', 'home')</string>
+ <string>Default Login location ('last', 'home') preference</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -6123,7 +6134,7 @@
<key>NextLoginLocation</key>
<map>
<key>Comment</key>
- <string>Location to log into by default.</string>
+ <string>Location to log into for this session - set from command line or the login panel, cleared following a successfull login.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -8090,7 +8101,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>0</real>
+ <real>-0.007</real>
</map>
<key>RenderShadowOffsetError</key>
<map>
@@ -10789,6 +10800,83 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>TextureFetchSource</key>
+ <map>
+ <key>Comment</key>
+ <string>Debug use: Source to fetch textures</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>TextureFetchUpdateHighPriority</key>
+ <map>
+ <key>Comment</key>
+ <string>Number of high priority textures to update per frame</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>32</integer>
+ </map>
+ <key>TextureFetchUpdateMaxMediumPriority</key>
+ <map>
+ <key>Comment</key>
+ <string>Maximum number of medium priority textures to update per frame</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>256</integer>
+ </map>
+ <key>TextureFetchUpdateMinMediumPriority</key>
+ <map>
+ <key>Comment</key>
+ <string>Minimum number of medium priority textures to update per frame</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>32</integer>
+ </map>
+ <key>TextureFetchUpdatePriorityThreshold</key>
+ <map>
+ <key>Comment</key>
+ <string>Threshold under which textures will be considered too low priority and skipped for update</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <integer>0.0</integer>
+ </map>
+ <key>TextureFetchUpdateSkipLowPriority</key>
+ <map>
+ <key>Comment</key>
+ <string>Flag indicating if we want to skip textures with too low of a priority</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>TextureFetchUpdatePriorities</key>
+ <map>
+ <key>Comment</key>
+ <string>Number of priority texture to update per frame</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>32</integer>
+ </map>
<key>TextureLoadFullRes</key>
<map>
<key>Comment</key>
@@ -13664,5 +13752,312 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>PathfindingRetrieveNeighboringRegion</key>
+ <map>
+ <key>Comment</key>
+ <string>Download a neighboring region when visualizing a pathfinding navmesh (default val 99 means do not download neighbors).</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>99</integer>
+ </map>
+ <key>PathfindingNavMeshClear</key>
+ <map>
+ <key>Comment</key>
+ <string>Background color when displaying pathfinding navmesh.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>0</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1.0</real>
+ </array>
+ </map>
+ <key>PathfindingWalkable</key>
+ <map>
+ <key>Comment</key>
+ <string>Color of walkable objects when displaying pathfinding navmesh object types.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>0.45490196078431372549019607843137</real>
+ <real>0.93333333333333333333333333333333</real>
+ <real>0.38823529411764705882352941176471</real>
+ <real>1.0</real>
+ </array>
+ </map>
+ <key>PathfindingObstacle</key>
+ <map>
+ <key>Comment</key>
+ <string>Color of static obstacle objects when displaying pathfinding navmesh object types.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>1.0</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ <real>1.0</real>
+ </array>
+ </map>
+ <key>PathfindingMaterial</key>
+ <map>
+ <key>Comment</key>
+ <string>Color of material volumes when displaying pathfinding navmesh object types.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>0.5</real>
+ <real>0.0</real>
+ <real>1.0</real>
+ <real>0.3</real>
+ </array>
+ </map>
+ <key>PathfindingExclusion</key>
+ <map>
+ <key>Comment</key>
+ <string>Color of exclusion volumes when displaying pathfinding navmesh object types.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>0.0</real>
+ <real>0.3</real>
+ </array>
+ </map>
+ <key>PathfindingConnectedEdge</key>
+ <map>
+ <key>Comment</key>
+ <string>Color of a connected (crossable) edge when displaying pathfinding navmesh.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>0.86</real>
+ <real>0.86</real>
+ <real>0.86</real>
+ <real>1.0</real>
+ </array>
+ </map>
+ <key>PathfindingBoundaryEdge</key>
+ <map>
+ <key>Comment</key>
+ <string>Color of a boundary (non-crossable) edge when displaying pathfinding navmesh.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>1.0</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ <real>1.0</real>
+ </array>
+ </map>
+ <key>PathfindingHeatColorBase</key>
+ <map>
+ <key>Comment</key>
+ <string>Color of the least walkable value when displaying the pathfinding navmesh as a heatmap.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>1.0</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ <real>1.0</real>
+ </array>
+ </map>
+ <key>PathfindingHeatColorMax</key>
+ <map>
+ <key>Comment</key>
+ <string>Color of the most walkable value when displaying the pathfinding navmesh as a heatmap.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ </array>
+ </map>
+ <key>PathfindingFaceColor</key>
+ <map>
+ <key>Comment</key>
+ <string>Color of the faces when displaying the default view of the pathfinding navmesh.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ </array>
+ </map>
+ <key>PathfindingTestPathValidEndColor</key>
+ <map>
+ <key>Comment</key>
+ <string>Color of the pathfinding test-pathing tool end-point when the path is valid.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>0.78</real>
+ <real>0.47</real>
+ <real>0.0</real>
+ <real>1.0</real>
+ </array>
+ </map>
+ <key>PathfindingTestPathInvalidEndColor</key>
+ <map>
+ <key>Comment</key>
+ <string>Color of the pathfinding test-pathing tool end-point when the path is invalid.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>1.0</real>
+ <real>0.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ </array>
+ </map>
+ <key>PathfindingTestPathColor</key>
+ <map>
+ <key>Comment</key>
+ <string>Color of the pathfinding test-path when the path is valid.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>1.0</real>
+ <real>0.59</real>
+ <real>0.0</real>
+ <real>0.9</real>
+ </array>
+ </map>
+ <key>PathfindingAmbiance</key>
+ <map>
+ <key>Comment</key>
+ <string>Ambiance of lit pathfinding navmesh displays.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.5</real>
+ </map>
+
+ <key>PathfindingXRayTint</key>
+ <map>
+ <key>Comment</key>
+ <string>Amount to darken/lighten x-ray lines in pathfinding display.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.8</real>
+ </map>
+
+ <key>PathfindingXRayOpacity</key>
+ <map>
+ <key>Comment</key>
+ <string>Opacity of xray lines in pathfinding display.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.25</real>
+ </map>
+
+ <key>PathfindingXRayWireframe</key>
+ <map>
+ <key>Comment</key>
+ <string>Render pathfinding navmesh xray as a wireframe.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+
+ <key>PathfindingLineWidth</key>
+ <map>
+ <key>Comment</key>
+ <string>Width of volume outlines in pathfinding navmesh display.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>2.0</real>
+ </map>
+
+ <key>PathfindingLineOffset</key>
+ <map>
+ <key>Comment</key>
+ <string>Depth offset of volume outlines in pathfinding display.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>2.3</real>
+ </map>
+
+ <key>PathfindingWaterColor</key>
+ <map>
+ <key>Comment</key>
+ <string>Color of water plane when displaying pathfinding navmesh.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>0.0</real>
+ <real>0.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ </array>
+ </map>
</map>
</llsd>
diff --git a/indra/newview/app_settings/shaders/class1/interface/pathfindingF.glsl b/indra/newview/app_settings/shaders/class1/interface/pathfindingF.glsl
new file mode 100644
index 0000000000..7379360e17
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/pathfindingF.glsl
@@ -0,0 +1,37 @@
+/**
+ * @file pathfindingF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, 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$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 frag_color;
+#else
+#define frag_color gl_FragColor
+#endif
+
+VARYING vec4 vertex_color;
+
+void main()
+{
+ frag_color = vertex_color;
+}
diff --git a/indra/newview/app_settings/shaders/class1/interface/pathfindingNoNormalV.glsl b/indra/newview/app_settings/shaders/class1/interface/pathfindingNoNormalV.glsl
new file mode 100644
index 0000000000..19fa607307
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/pathfindingNoNormalV.glsl
@@ -0,0 +1,42 @@
+/**
+ * @file pathfindingV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, 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$
+ */
+
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+
+VARYING vec4 vertex_color;
+
+uniform float tint;
+uniform float alpha_scale;
+
+void main()
+{
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+
+ vertex_color = vec4(diffuse_color.rgb * tint, diffuse_color.a*alpha_scale);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl b/indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl
new file mode 100644
index 0000000000..91f252cf1e
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl
@@ -0,0 +1,54 @@
+/**
+ * @file pathfindingV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, 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$
+ */
+
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec3 normal;
+
+VARYING vec4 vertex_color;
+
+uniform float tint;
+uniform float ambiance;
+uniform float alpha_scale;
+
+void main()
+{
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+
+ vec3 l1 = vec3(-0.75, 1, 1.0)*0.5;
+ vec3 l2 = vec3(0.5, -0.6, 0.4)*0.25;
+ vec3 l3 = vec3(0.5, -0.8, 0.3)*0.5;
+
+ float lit = max(dot(normal, l1), 0.0);
+ lit += max(dot(normal, l2), 0.0);
+ lit += max(dot(normal, l3), 0.0);
+
+ lit = clamp(lit, ambiance, 1.0);
+
+ vertex_color = vec4(diffuse_color.rgb * tint * lit, diffuse_color.a*alpha_scale);
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index 8db4cb58cf..12706f130b 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -34,10 +34,10 @@ out vec4 frag_color;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
-uniform sampler2DRectShadow shadowMap0;
-uniform sampler2DRectShadow shadowMap1;
-uniform sampler2DRectShadow shadowMap2;
-uniform sampler2DRectShadow shadowMap3;
+uniform sampler2DShadow shadowMap0;
+uniform sampler2DShadow shadowMap1;
+uniform sampler2DShadow shadowMap2;
+uniform sampler2DShadow shadowMap3;
uniform sampler2DRect depthMap;
uniform mat4 shadow_matrix[6];
@@ -58,22 +58,22 @@ uniform float shadow_bias;
uniform mat4 inv_proj;
-float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc)
+float pcfShadow(sampler2DShadow shadowMap, vec4 stc)
{
stc.xyz /= stc.w;
stc.z += shadow_bias;
-
- stc.x = floor(stc.x + fract(stc.y*12345)); // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
+
+ stc.x = floor(stc.x*shadow_res.x + fract(stc.y*shadow_res.y*12345))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
- float cs = shadow2DRect(shadowMap, stc.xyz).x;
+ float cs = shadow2D(shadowMap, stc.xyz).x;
float shadow = cs;
-
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x;
-
- return shadow*0.2;
+
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
+
+ return shadow*0.2;
}
@@ -99,8 +99,7 @@ void main()
if (spos.z < near_split.z)
{
lpos = shadow_matrix[3]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(spos.z-far_split.z, 0.0)/transition_domain.z;
shadow += pcfShadow(shadowMap3, lpos)*w;
@@ -111,8 +110,7 @@ void main()
if (spos.z < near_split.y && spos.z > far_split.z)
{
lpos = shadow_matrix[2]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(spos.z-far_split.y, 0.0)/transition_domain.y;
w -= max(near_split.z-spos.z, 0.0)/transition_domain.z;
@@ -123,8 +121,7 @@ void main()
if (spos.z < near_split.x && spos.z > far_split.y)
{
lpos = shadow_matrix[1]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(spos.z-far_split.x, 0.0)/transition_domain.x;
w -= max(near_split.y-spos.z, 0.0)/transition_domain.y;
@@ -135,8 +132,7 @@ void main()
if (spos.z > far_split.x)
{
lpos = shadow_matrix[0]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(near_split.x-spos.z, 0.0)/transition_domain.x;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl
index 33958a5010..228dc104ac 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl
@@ -31,17 +31,16 @@ out vec4 frag_color;
#define frag_color gl_FragColor
#endif
-uniform sampler2DRectShadow shadowMap0;
-uniform sampler2DRectShadow shadowMap1;
-uniform sampler2DRectShadow shadowMap2;
-uniform sampler2DRectShadow shadowMap3;
+uniform sampler2DShadow shadowMap0;
+uniform sampler2DShadow shadowMap1;
+uniform sampler2DShadow shadowMap2;
+uniform sampler2DShadow shadowMap3;
uniform sampler2DRect depthMap;
uniform sampler2D diffuseMap;
uniform mat4 shadow_matrix[6];
uniform vec4 shadow_clip;
uniform vec2 screen_res;
-uniform vec2 shadow_res;
vec3 atmosLighting(vec3 light);
vec3 scaleSoftClip(vec3 light);
@@ -54,6 +53,7 @@ VARYING vec3 vary_pointlight_col;
VARYING vec2 vary_texcoord0;
VARYING vec4 vertex_color;
+uniform vec2 shadow_res;
uniform float shadow_bias;
uniform mat4 inv_proj;
@@ -71,22 +71,22 @@ vec4 getPosition(vec2 pos_screen)
return pos;
}
-float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc)
+float pcfShadow(sampler2DShadow shadowMap, vec4 stc)
{
stc.xyz /= stc.w;
stc.z += shadow_bias;
- stc.x = floor(stc.x + fract(stc.y*12345)); // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
+ stc.x = floor(stc.x*shadow_res.x + fract(stc.y*12345))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
- float cs = shadow2DRect(shadowMap, stc.xyz).x;
+ float cs = shadow2D(shadowMap, stc.xyz).x;
float shadow = cs;
-
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x;
+
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
- return shadow*0.2;
+ return shadow*0.2;
}
@@ -112,8 +112,7 @@ void main()
if (spos.z < near_split.z)
{
lpos = shadow_matrix[3]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(spos.z-far_split.z, 0.0)/transition_domain.z;
shadow += pcfShadow(shadowMap3, lpos)*w;
@@ -124,8 +123,7 @@ void main()
if (spos.z < near_split.y && spos.z > far_split.z)
{
lpos = shadow_matrix[2]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(spos.z-far_split.y, 0.0)/transition_domain.y;
w -= max(near_split.z-spos.z, 0.0)/transition_domain.z;
@@ -136,8 +134,7 @@ void main()
if (spos.z < near_split.x && spos.z > far_split.y)
{
lpos = shadow_matrix[1]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(spos.z-far_split.x, 0.0)/transition_domain.x;
w -= max(near_split.y-spos.z, 0.0)/transition_domain.y;
@@ -148,8 +145,7 @@ void main()
if (spos.z > far_split.x)
{
lpos = shadow_matrix[0]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(near_split.x-spos.z, 0.0)/transition_domain.x;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl
index 2093fc37dc..c3950a10e1 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl
@@ -33,17 +33,16 @@ out vec4 frag_color;
uniform float minimum_alpha;
-uniform sampler2DRectShadow shadowMap0;
-uniform sampler2DRectShadow shadowMap1;
-uniform sampler2DRectShadow shadowMap2;
-uniform sampler2DRectShadow shadowMap3;
+uniform sampler2DShadow shadowMap0;
+uniform sampler2DShadow shadowMap1;
+uniform sampler2DShadow shadowMap2;
+uniform sampler2DShadow shadowMap3;
uniform sampler2DRect depthMap;
uniform sampler2D diffuseMap;
uniform mat4 shadow_matrix[6];
uniform vec4 shadow_clip;
uniform vec2 screen_res;
-uniform vec2 shadow_res;
vec3 atmosLighting(vec3 light);
vec3 scaleSoftClip(vec3 light);
@@ -55,6 +54,8 @@ VARYING vec3 vary_position;
VARYING vec3 vary_pointlight_col;
VARYING vec2 vary_texcoord0;
+uniform vec2 shadow_res;
+
uniform float shadow_bias;
uniform mat4 inv_proj;
@@ -72,20 +73,20 @@ vec4 getPosition(vec2 pos_screen)
return pos;
}
-float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc)
+float pcfShadow(sampler2DShadow shadowMap, vec4 stc)
{
stc.xyz /= stc.w;
stc.z += shadow_bias;
- stc.x = floor(stc.x + fract(stc.y*12345)); // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
+ stc.x = floor(stc.x*shadow_res.x + fract(stc.y*12345))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
+ float cs = shadow2D(shadowMap, stc.xyz).x;
- float cs = shadow2DRect(shadowMap, stc.xyz).x;
float shadow = cs;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x;
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
return shadow*0.2;
}
@@ -120,8 +121,7 @@ void main()
if (spos.z < near_split.z)
{
lpos = shadow_matrix[3]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(spos.z-far_split.z, 0.0)/transition_domain.z;
shadow += pcfShadow(shadowMap3, lpos)*w;
@@ -132,8 +132,7 @@ void main()
if (spos.z < near_split.y && spos.z > far_split.z)
{
lpos = shadow_matrix[2]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(spos.z-far_split.y, 0.0)/transition_domain.y;
w -= max(near_split.z-spos.z, 0.0)/transition_domain.z;
@@ -144,8 +143,7 @@ void main()
if (spos.z < near_split.x && spos.z > far_split.y)
{
lpos = shadow_matrix[1]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(spos.z-far_split.x, 0.0)/transition_domain.x;
w -= max(near_split.y-spos.z, 0.0)/transition_domain.y;
@@ -156,8 +154,7 @@ void main()
if (spos.z > far_split.x)
{
lpos = shadow_matrix[0]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(near_split.x-spos.z, 0.0)/transition_domain.x;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
index db3d760359..c1495b145e 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
@@ -35,10 +35,10 @@ out vec4 frag_color;
uniform sampler2DRect depthMap;
uniform sampler2DRect normalMap;
-uniform sampler2DRectShadow shadowMap0;
-uniform sampler2DRectShadow shadowMap1;
-uniform sampler2DRectShadow shadowMap2;
-uniform sampler2DRectShadow shadowMap3;
+uniform sampler2DShadow shadowMap0;
+uniform sampler2DShadow shadowMap1;
+uniform sampler2DShadow shadowMap2;
+uniform sampler2DShadow shadowMap3;
uniform sampler2DShadow shadowMap4;
uniform sampler2DShadow shadowMap5;
@@ -55,10 +55,10 @@ VARYING vec2 vary_fragcoord;
uniform mat4 inv_proj;
uniform vec2 screen_res;
-uniform vec2 shadow_res;
uniform vec2 proj_shadow_res;
uniform vec3 sun_dir;
+uniform vec2 shadow_res;
uniform float shadow_bias;
uniform float shadow_offset;
@@ -78,30 +78,31 @@ vec4 getPosition(vec2 pos_screen)
return pos;
}
-float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
+float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
{
stc.xyz /= stc.w;
- stc.z += shadow_bias*scl;
+ stc.z += shadow_bias;
- stc.x = floor(stc.x + fract(pos_screen.y*0.666666666)); // add some jitter to X sample pos according to Y to disguise the snapping going on here
+ stc.x = floor(stc.x*shadow_res.x + fract(pos_screen.y*0.666666666))/shadow_res.x; // add some jitter to X sample pos according to Y to disguise the snapping going on here
+ float cs = shadow2D(shadowMap, stc.xyz).x;
- float cs = shadow2DRect(shadowMap, stc.xyz).x;
float shadow = cs;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, 1.5, 0.0)).x;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, -1.5, 0.0)).x;
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
+
- return shadow*0.2;
+ return shadow*0.2;
}
-float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
+float pcfSpotShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
{
stc.xyz /= stc.w;
stc.z += spot_shadow_bias*scl;
stc.x = floor(proj_shadow_res.x * stc.x + fract(pos_screen.y*0.666666666)) / proj_shadow_res.x; // snap
-
+
float cs = shadow2D(shadowMap, stc.xyz).x;
float shadow = cs;
@@ -162,8 +163,7 @@ void main()
if (spos.z < near_split.z)
{
lpos = shadow_matrix[3]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(spos.z-far_split.z, 0.0)/transition_domain.z;
shadow += pcfShadow(shadowMap3, lpos, 0.25, pos_screen)*w;
@@ -174,8 +174,7 @@ void main()
if (spos.z < near_split.y && spos.z > far_split.z)
{
lpos = shadow_matrix[2]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(spos.z-far_split.y, 0.0)/transition_domain.y;
w -= max(near_split.z-spos.z, 0.0)/transition_domain.z;
@@ -186,7 +185,6 @@ void main()
if (spos.z < near_split.x && spos.z > far_split.y)
{
lpos = shadow_matrix[1]*spos;
- lpos.xy *= shadow_res;
float w = 1.0;
w -= max(spos.z-far_split.x, 0.0)/transition_domain.x;
@@ -198,7 +196,6 @@ void main()
if (spos.z > far_split.x)
{
lpos = shadow_matrix[0]*spos;
- lpos.xy *= shadow_res;
float w = 1.0;
w -= max(near_split.x-spos.z, 0.0)/transition_domain.x;
@@ -237,11 +234,11 @@ void main()
//spotlight shadow 1
vec4 lpos = shadow_matrix[4]*spos;
- frag_color[2] = pcfShadow(shadowMap4, lpos, 0.8, pos_screen);
+ frag_color[2] = pcfSpotShadow(shadowMap4, lpos, 0.8, pos_screen);
//spotlight shadow 2
lpos = shadow_matrix[5]*spos;
- frag_color[3] = pcfShadow(shadowMap5, lpos, 0.8, pos_screen);
+ frag_color[3] = pcfSpotShadow(shadowMap5, lpos, 0.8, pos_screen);
//frag_color.rgb = pos.xyz;
//frag_color.b = shadow;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
index dfe108eb01..039fca9df2 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
@@ -34,10 +34,10 @@ out vec4 frag_color;
uniform sampler2DRect depthMap;
uniform sampler2DRect normalMap;
-uniform sampler2DRectShadow shadowMap0;
-uniform sampler2DRectShadow shadowMap1;
-uniform sampler2DRectShadow shadowMap2;
-uniform sampler2DRectShadow shadowMap3;
+uniform sampler2DShadow shadowMap0;
+uniform sampler2DShadow shadowMap1;
+uniform sampler2DShadow shadowMap2;
+uniform sampler2DShadow shadowMap3;
uniform sampler2DShadow shadowMap4;
uniform sampler2DShadow shadowMap5;
uniform sampler2D noiseMap;
@@ -55,10 +55,11 @@ VARYING vec2 vary_fragcoord;
uniform mat4 inv_proj;
uniform vec2 screen_res;
-uniform vec2 shadow_res;
uniform vec2 proj_shadow_res;
uniform vec3 sun_dir;
+uniform vec2 shadow_res;
+
uniform float shadow_bias;
uniform float shadow_offset;
@@ -139,30 +140,30 @@ float calcAmbientOcclusion(vec4 pos, vec3 norm)
return min(ret, 1.0);
}
-float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
+float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
{
stc.xyz /= stc.w;
- stc.z += shadow_bias*scl;
+ stc.z += shadow_bias;
- stc.x = floor(stc.x + fract(pos_screen.y*0.666666666));
+ stc.x = floor(stc.x*shadow_res.x + fract(pos_screen.y*0.666666666))/shadow_res.x;
+ float cs = shadow2D(shadowMap, stc.xyz).x;
- float cs = shadow2DRect(shadowMap, stc.xyz).x;
float shadow = cs;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x;
- shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x;
-
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
+ shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
+
return shadow*0.2;
}
-float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
+float pcfSpotShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
{
stc.xyz /= stc.w;
stc.z += spot_shadow_bias*scl;
stc.x = floor(proj_shadow_res.x * stc.x + fract(pos_screen.y*0.666666666)) / proj_shadow_res.x; // snap
-
+
float cs = shadow2D(shadowMap, stc.xyz).x;
float shadow = cs;
@@ -223,8 +224,7 @@ void main()
if (spos.z < near_split.z)
{
lpos = shadow_matrix[3]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(spos.z-far_split.z, 0.0)/transition_domain.z;
shadow += pcfShadow(shadowMap3, lpos, 0.25, pos_screen)*w;
@@ -235,8 +235,7 @@ void main()
if (spos.z < near_split.y && spos.z > far_split.z)
{
lpos = shadow_matrix[2]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(spos.z-far_split.y, 0.0)/transition_domain.y;
w -= max(near_split.z-spos.z, 0.0)/transition_domain.z;
@@ -247,8 +246,7 @@ void main()
if (spos.z < near_split.x && spos.z > far_split.y)
{
lpos = shadow_matrix[1]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(spos.z-far_split.x, 0.0)/transition_domain.x;
w -= max(near_split.y-spos.z, 0.0)/transition_domain.y;
@@ -259,8 +257,7 @@ void main()
if (spos.z > far_split.x)
{
lpos = shadow_matrix[0]*spos;
- lpos.xy *= shadow_res;
-
+
float w = 1.0;
w -= max(near_split.x-spos.z, 0.0)/transition_domain.x;
@@ -298,11 +295,11 @@ void main()
//spotlight shadow 1
vec4 lpos = shadow_matrix[4]*spos;
- frag_color[2] = pcfShadow(shadowMap4, lpos, 0.8, pos_screen);
+ frag_color[2] = pcfSpotShadow(shadowMap4, lpos, 0.8, pos_screen);
//spotlight shadow 2
lpos = shadow_matrix[5]*spos;
- frag_color[3] = pcfShadow(shadowMap5, lpos, 0.8, pos_screen);
+ frag_color[3] = pcfSpotShadow(shadowMap5, lpos, 0.8, pos_screen);
//frag_color.rgb = pos.xyz;
//frag_color.b = shadow;