From b19c284eb77fbbc829eaa6d308ad54c4846235e3 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Tue, 10 Jul 2012 05:34:50 +0200 Subject: [PATCH] Make void water subdivision tunable --- indra/newview/app_settings/settings.xml | 13 +++++++++++++ indra/newview/llvowater.cpp | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2eca82c95..a4d94dd95 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -21,6 +21,19 @@ 1 + SianaVoidWaterSubdivision + + Comment + Number of tiles of void water + Persist + 1 + Type + U32 + Value + 8 + + + SGAbsolutePointer Comment diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp index 9ba977f22..05e033392 100644 --- a/indra/newview/llvowater.cpp +++ b/indra/newview/llvowater.cpp @@ -170,7 +170,8 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable) static const unsigned int indices_per_quad = 6; static const LLCachedControl render_transparent_water("RenderTransparentWater",false); - const S32 size = (render_transparent_water && LLGLSLShader::sNoFixedFunction) ? 16 : 1; + static const LLCachedControl water_subdiv("SianaVoidWaterSubdivision", 16); + const S32 size = (render_transparent_water && LLGLSLShader::sNoFixedFunction) ? water_subdiv : 1; const S32 num_quads = size * size; face->setSize(vertices_per_quad * num_quads, indices_per_quad * num_quads);