From 6e184e33018a5395bfbb2c92812229d115944ab5 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 2 Apr 2012 17:55:04 -0500 Subject: Cleaner render of walkables and materials. Convert Vector3 color parameters to Color4. --- indra/newview/app_settings/settings.xml | 237 +++++---------------- .../shaders/class1/interface/pathfindingF.glsl | 35 +++ .../shaders/class1/interface/pathfindingV.glsl | 40 ++++ 3 files changed, 134 insertions(+), 178 deletions(-) create mode 100644 indra/newview/app_settings/shaders/class1/interface/pathfindingF.glsl create mode 100644 indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 1d616a76fb..d18df2d9b2 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13516,332 +13516,213 @@ Value 0 - NavMeshClearRGB + PathfindingNavMeshClear Comment yay! Persist 1 Type - Vector3 + Color4 Value 0.5 0.5 0.5 + 1.0 - WalkableRGB + PathfindingWalkable Comment yay! Persist 1 Type - Vector3 + Color4 Value 0.0 - 255.0 + 1.0 0.0 + 0.3 - WalkableA - - Comment - yay! - Persist - 1 - Type - F32 - Value - 75 - - ObstacleRGB + PathfindingObstacle Comment yay! Persist 1 Type - Vector3 + Color4 Value - 255.0 + 1.0 0.0 0.0 + 0.3 - ObstacleA - - Comment - yay! - Persist - 1 - Type - F32 - Value - 75 - - MaterialRGB + PathfindingMaterial Comment yay! Persist 1 Type - Vector3 + Color4 Value - 128.0 + 0.5 0.0 - 255.0 + 1.0 + 0.3 - MaterialA - - Comment - yay! - Persist - 1 - Type - F32 - Value - 75 - - ExclusionRGB + PathfindingExclusion Comment yay! Persist 1 Type - Vector3 + Color4 Value - 255.0 - 255.0 + 1.0 + 1.0 0.0 + 0.3 - ExclusionA - - Comment - yay! - Persist - 1 - Type - F32 - Value - 75 - -ConnectedEdgeRGB + PathfindingConnectedEdge Comment yay! Persist 1 Type - Vector3 + Color4 Value - 220.0 - 220.0 - 220.0 + 0.86 + 0.86 + 0.86 + 1.0 - ConnectedEdgeA + PathfindingBoundaryEdge Comment yay! Persist 1 Type - F32 - Value - 255 - -BoundaryEdgeRGB - - Comment - yay! - Persist - 1 - Type - Vector3 + Color4 Value - 255.0 + 1.0 0.0 0.0 + 1.0 - BoundaryEdgeA + PathfindingHeatColorBase Comment yay! Persist 1 Type - F32 - Value - 255 - -HeatColorBase - - Comment - yay! - Persist - 1 - Type - Vector3 + Color4 Value 0.0 1.0 0.5 + 1.0 - HeatColorBaseA - - Comment - yay! - Persist - 1 - Type - F32 - Value - 1.0 - -HeatColorMax + PathfindingHeatColorMax Comment yay! Persist 1 Type - Vector3 + Color4 Value 0.0 1.0 1.0 + 1.0 - HeatColorMaxA - - Comment - yay! - Persist - 1 - Type - F32 - Value - 1.0 - - FaceColorRGB + PathfindingFaceColor Comment yay! Persist 1 Type - Vector3 + Color4 Value - 255.0 - 255.0 - 255.0 + 1.0 + 1.0 + 1.0 + 1.0 - FaceColorA - - Comment - yay! - Persist - 1 - Type - F32 - Value - 255 - - StarValidColorRGB + PathfindingStarValidColor Comment yay! Persist 1 Type - Vector3 + Color4 Value - 200.0 - 120.0 + 0.78 + 0.47 0.0 + 1.0 - StarValidColorA - - Comment - yay! - Persist - 1 - Type - F32 - Value - 255 - - StarInvalidRGB + PathfindingStarInvalidColor Comment yay! Persist 1 Type - Vector3 + Color4 Value - 255.0 + 1.0 0.0 - 255.0 + 1.0 + 1.0 - StarInvalidA + PathfindingTestPathColor Comment yay! Persist 1 Type - F32 - Value - 255 - - TestPathColorRGB - - Comment - yay! - Persist - 1 - Type - Vector3 + Color4 Value - 255.0 - 150.0 + 1.0 + 0.59 0.0 + 1.0 - TestPathColorA - - Comment - yay! - Persist - 1 - Type - F32 - Value - 255 - - + 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..40605bee78 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/interface/pathfindingF.glsl @@ -0,0 +1,35 @@ +/** + * @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 gl_FragColor; +#endif + +VARYING vec4 vertex_color; + +void main() +{ + gl_FragColor = vertex_color; +} 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..dc9fefd156 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl @@ -0,0 +1,40 @@ +/** + * @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; + +void main() +{ + gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); + vertex_color = diffuse_color * tint; +} + -- cgit v1.2.3 From 817f1629bdafd6c28efa2a868a7aad75eb8a9514 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 3 Apr 2012 02:52:34 -0500 Subject: Pathfinding visualization WIP -- add many controls for x-ray render, add lighting, and better combat z-fighting and noise from wireframes and overlays --- indra/newview/app_settings/settings.xml | 84 +++++++++++++++++++--- .../shaders/class1/interface/pathfindingV.glsl | 18 ++++- 2 files changed, 89 insertions(+), 13 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8e2d69ea9b..ed9bcb0380 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13519,7 +13519,7 @@ PathfindingNavMeshClear Comment - yay! + Background color Persist 1 Type @@ -13535,7 +13535,7 @@ PathfindingWalkable Comment - yay! + Walkable color Persist 1 Type @@ -13551,7 +13551,7 @@ PathfindingObstacle Comment - yay! + Obstacle color Persist 1 Type @@ -13567,7 +13567,7 @@ PathfindingMaterial Comment - yay! + Material volume color Persist 1 Type @@ -13583,7 +13583,7 @@ PathfindingExclusion Comment - yay! + Exclusion volume color Persist 1 Type @@ -13599,7 +13599,7 @@ PathfindingConnectedEdge Comment - yay! + Connected edge color Persist 1 Type @@ -13615,7 +13615,7 @@ PathfindingBoundaryEdge Comment - yay! + Boundary edge color Persist 1 Type @@ -13631,7 +13631,7 @@ PathfindingHeatColorBase Comment - yay! + Least walkable heat map color Persist 1 Type @@ -13647,7 +13647,7 @@ PathfindingHeatColorMax Comment - yay! + Most walkable heat map color Persist 1 Type @@ -13663,7 +13663,7 @@ PathfindingFaceColor Comment - yay! + Nav mesh color? Persist 1 Type @@ -13724,6 +13724,66 @@ 1.0 + PathfindingAmbiance + + Comment + Ambiance of lit pathfinding displays. + Persist + 0 + Type + F32 + Value + 0.5 + + + PathfindingXRayTint + + Comment + Amount to darken/lighten x-ray lines in pathfinding display + Persist + 0 + Type + F32 + Value + 0.8 + + + PathfindingXRayOpacity + + Comment + Opacity of xray lines in pathfinding display. + Persist + 0 + Type + F32 + Value + 0.25 + + + PathfindingLineWidth + + Comment + Width of volume outlines in pathfinding display. + Persist + 0 + Type + F32 + Value + 2.0 + + + PathfindingLineOffset + + Comment + Depth offset of volume outlines in pathfinding display. + Persist + 0 + Type + F32 + Value + 1.6 + + PathfindingDisablePermanentObjects Comment @@ -13746,5 +13806,7 @@ Value 0 - + + + diff --git a/indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl b/indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl index dc9fefd156..31e878ebc6 100644 --- a/indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl @@ -27,14 +27,28 @@ 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); - vertex_color = diffuse_color * tint; + + vec3 l1 = vec3(-0.75, 1, 1.0); + 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); } -- cgit v1.2.3 From 6b64ea6779a6d35bb6c9f94e354f5635ee633366 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 3 Apr 2012 17:05:44 -0500 Subject: Switch x-ray render to non-wirefrmae by default. --- indra/newview/app_settings/settings.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ed9bcb0380..425f624180 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13760,6 +13760,18 @@ 0.25 + PathfindingXRayWireframe + + Comment + Render pathfinding xray as a wireframe. + Persist + 0 + Type + Boolean + Value + 0 + + PathfindingLineWidth Comment -- cgit v1.2.3 From 5c68a69af0249728cef2b1e58683c03ecf462e95 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 3 Apr 2012 17:52:32 -0500 Subject: Cleanup -- use falcon's default colors -- fix bug where screen remains blank after closing pathfinding console --- indra/newview/app_settings/settings.xml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 425f624180..7988aba954 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13526,9 +13526,9 @@ Color4 Value - 0.5 - 0.5 - 0.5 + 0 + 0 + 0 1.0 @@ -13542,10 +13542,10 @@ Color4 Value - 0.0 + 0.5 + 0.5 + 0.5 1.0 - 0.0 - 0.3 PathfindingObstacle @@ -13561,7 +13561,7 @@ 1.0 0.0 0.0 - 0.3 + 1.0 PathfindingMaterial @@ -13591,8 +13591,8 @@ Value 1.0 - 1.0 - 0.0 + 0.01 + 0.1 0.3 @@ -13638,9 +13638,9 @@ Color4 Value - 0.0 1.0 - 0.5 + 0.0 + 0.07 1.0 @@ -13654,9 +13654,9 @@ Color4 Value - 0.0 - 1.0 1.0 + 0.93 + 0.936 1.0 @@ -13793,7 +13793,7 @@ Type F32 Value - 1.6 + 2.3 PathfindingDisablePermanentObjects -- cgit v1.2.3 From 382c4bdfeb8350aeea1363b4ca8e01bf233a08be Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 4 Apr 2012 00:01:02 -0500 Subject: Better contrast between shapes and their outlines. --- indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl b/indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl index 31e878ebc6..91f252cf1e 100644 --- a/indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl @@ -39,7 +39,7 @@ void main() { gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); - vec3 l1 = vec3(-0.75, 1, 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; -- cgit v1.2.3 From 59f57a7b67ba200135b8a2d2c8904b4168edbb32 Mon Sep 17 00:00:00 2001 From: prep Date: Wed, 4 Apr 2012 11:35:45 -0400 Subject: Support for navmesh vbo. Navmesh vb supports heat map. --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7988aba954..9fff0b398c 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13514,7 +13514,7 @@ Type Boolean Value - 0 + 1 PathfindingNavMeshClear -- cgit v1.2.3 From 0f22e20bcef5e4344394e4cda1f8bafd52dc5dd2 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 4 Apr 2012 15:48:43 -0500 Subject: Add pathfindingNoNormal shader. --- .../class1/interface/pathfindingNoNormalV.glsl | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 indra/newview/app_settings/shaders/class1/interface/pathfindingNoNormalV.glsl (limited to 'indra/newview/app_settings') 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); +} + -- cgit v1.2.3