diff options
author | Dave Parks <davep@lindenlab.com> | 2012-04-04 14:16:17 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-04-04 14:16:17 -0500 |
commit | d21dd289b0543d1043424067de230561e531999c (patch) | |
tree | f24c59959a6c3bc155902360fcb9e0eb2e042d70 | |
parent | 499a43df65a49fd667fb666015b8900a4fd6aa6b (diff) |
Cleanup edge render and resolve assertions from lack of normals in edges.
-rw-r--r-- | autobuild.xml | 12 | ||||
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llviewershadermgr.h | 1 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 29 |
4 files changed, 48 insertions, 6 deletions
diff --git a/autobuild.xml b/autobuild.xml index 5199ce0d19..ac7105c8b5 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1110,9 +1110,9 @@ <key>archive</key> <map> <key>hash</key> - <string>6f0127b409cda1635cf7d52f5ec52365</string> + <string>dfd1e738be5d48f5d99a903936cbce31</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary_xray/rev/252974/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120404.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary_xray/rev/252987/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120404.tar.bz2</string> </map> <key>name</key> <string>darwin</string> @@ -1122,9 +1122,9 @@ <key>archive</key> <map> <key>hash</key> - <string>cb639c760253d1315dda8a283a6f2715</string> + <string>2656b0b7eddf19ca67ad5b55100b8782</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary_xray/rev/252974/arch/Linux/installer/llphysicsextensions-0.1-linux-20120404.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary_xray/rev/252987/arch/Linux/installer/llphysicsextensions-0.1-linux-20120404.tar.bz2</string> </map> <key>name</key> <string>linux</string> @@ -1134,9 +1134,9 @@ <key>archive</key> <map> <key>hash</key> - <string>dbac794b95a4180f75d1190aee6a91f1</string> + <string>5ad3230901d4683902aa3bdf995309b2</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary_xray/rev/252974/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120404.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary_xray/rev/252987/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120404.tar.bz2</string> </map> <key>name</key> <string>windows</string> diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 0948e261ce..65b6634c57 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -135,6 +135,7 @@ LLGLSLShader gUnderWaterProgram; //interface shaders LLGLSLShader gHighlightProgram; LLGLSLShader gPathfindingProgram; +LLGLSLShader gPathfindingNoNormalsProgram; //avatar shader handles LLGLSLShader gAvatarProgram; @@ -596,6 +597,7 @@ void LLViewerShaderMgr::unloadShaders() gAlphaMaskProgram.unload(); gUIProgram.unload(); gPathfindingProgram.unload(); + gPathfindingNoNormalsProgram.unload(); gCustomAlphaProgram.unload(); gGlowCombineProgram.unload(); gSplatTextureRectProgram.unload(); @@ -2524,6 +2526,16 @@ BOOL LLViewerShaderMgr::loadShadersInterface() if (success) { + gPathfindingNoNormalsProgram.mName = "PathfindingNoNormals Shader"; + gPathfindingNoNormalsProgram.mShaderFiles.clear(); + gPathfindingNoNormalsProgram.mShaderFiles.push_back(make_pair("interface/pathfindingNoNormalV.glsl", GL_VERTEX_SHADER_ARB)); + gPathfindingNoNormalsProgram.mShaderFiles.push_back(make_pair("interface/pathfindingF.glsl", GL_FRAGMENT_SHADER_ARB)); + gPathfindingNoNormalsProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE]; + success = gPathfindingNoNormalsProgram.createShader(NULL, NULL); + } + + if (success) + { gCustomAlphaProgram.mName = "Custom Alpha Shader"; gCustomAlphaProgram.mShaderFiles.clear(); gCustomAlphaProgram.mShaderFiles.push_back(make_pair("interface/customalphaV.glsl", GL_VERTEX_SHADER_ARB)); diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h index 2f4edc2659..ceb14870d4 100644 --- a/indra/newview/llviewershadermgr.h +++ b/indra/newview/llviewershadermgr.h @@ -289,6 +289,7 @@ extern LLGLSLShader gGlowExtractProgram; //interface shaders extern LLGLSLShader gHighlightProgram; extern LLGLSLShader gPathfindingProgram; +extern LLGLSLShader gPathfindingNoNormalsProgram; // avatar shader handles extern LLGLSLShader gAvatarProgram; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 6f75c09803..fb6e97ea9d 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -4364,6 +4364,21 @@ void LLPipeline::renderDebug() int materialIndex = pathfindingConsole->getHeatMapType(); llPathingLibInstance->renderNavMesh( materialIndex ); + + //render edges + if (LLGLSLShader::sNoFixedFunction) + { + gPathfindingNoNormalsProgram.bind(); + gPathfindingNoNormalsProgram.uniform1f("tint", 1.f); + gPathfindingNoNormalsProgram.uniform1f("alpha_scale", 1.f); + llPathingLibInstance->renderNavMeshEdges( materialIndex ); + gPathfindingProgram.bind(); + } + else + { + llPathingLibInstance->renderNavMeshEdges( materialIndex ); + } + gGL.flush(); glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); glLineWidth(1.0f); @@ -4504,6 +4519,20 @@ void LLPipeline::renderDebug() gPathfindingProgram.uniform1f("ambiance", ambiance); llPathingLibInstance->renderNavMesh( materialIndex ); } + + //render edges + if (LLGLSLShader::sNoFixedFunction) + { + gPathfindingNoNormalsProgram.bind(); + gPathfindingNoNormalsProgram.uniform1f("tint", gSavedSettings.getF32("PathfindingXRayTint")); + gPathfindingNoNormalsProgram.uniform1f("alpha_scale", gSavedSettings.getF32("PathfindingXRayOpacity")); + llPathingLibInstance->renderNavMeshEdges( materialIndex ); + gPathfindingProgram.bind(); + } + else + { + llPathingLibInstance->renderNavMeshEdges( materialIndex ); + } gGL.flush(); glLineWidth(1.0f); |