Make void water subdivision tunable

This commit is contained in:
Siana Gearz
2012-07-10 05:34:50 +02:00
parent 18638cd47c
commit b19c284eb7
2 changed files with 15 additions and 1 deletions

View File

@@ -21,6 +21,19 @@
<integer>1</integer>
</map>
<key>SianaVoidWaterSubdivision</key>
<map>
<key>Comment</key>
<string>Number of tiles of void water</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>8</integer>
</map>
<key>SGAbsolutePointer</key>
<map>
<key>Comment</key>

View File

@@ -170,7 +170,8 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable)
static const unsigned int indices_per_quad = 6;
static const LLCachedControl<bool> render_transparent_water("RenderTransparentWater",false);
const S32 size = (render_transparent_water && LLGLSLShader::sNoFixedFunction) ? 16 : 1;
static const LLCachedControl<U32> 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);