diff options
-rw-r--r-- | indra/newview/app_settings/shaders/class1/environment/terrainV.glsl | 3 | ||||
-rw-r--r-- | indra/newview/lldrawpoolterrain.cpp | 5 | ||||
-rw-r--r-- | indra/newview/lldrawpoolterrain.h | 3 | ||||
-rw-r--r-- | indra/newview/llvosurfacepatch.cpp | 24 | ||||
-rw-r--r-- | indra/newview/llvosurfacepatch.h | 7 |
5 files changed, 7 insertions, 35 deletions
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl index f183b885d1..d09c5f9247 100644 --- a/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl +++ b/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl @@ -33,7 +33,6 @@ uniform vec4 object_plane_s; ATTRIBUTE vec3 position; ATTRIBUTE vec3 normal; -ATTRIBUTE vec4 diffuse_color; ATTRIBUTE vec2 texcoord0; ATTRIBUTE vec2 texcoord1; @@ -72,7 +71,7 @@ void main() /// Potentially better without it for water. pos /= pos.w; - vec4 color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0)); + vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0)); vertex_color = color; diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index ce601325c8..d61df9c048 100644 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -189,6 +189,8 @@ void LLDrawPoolTerrain::render(S32 pass) compp->mDetailTextures[i]->addTextureStats(1024.f*1024.f); // assume large pixel area } + LLOverrideFaceColor override(this, 1.f, 1.f, 1.f, 1.f); + if (!gGLManager.mHasMultitexture) { // No multitexture, render simple land. @@ -203,8 +205,7 @@ void LLDrawPoolTerrain::render(S32 pass) } LLGLSPipeline gls; - LLOverrideFaceColor override(this, 1.f, 1.f, 1.f, 1.f); - + if (mVertexShaderLevel > 1 && sShader->mShaderLevel > 0) { gPipeline.enableLightsDynamic(); diff --git a/indra/newview/lldrawpoolterrain.h b/indra/newview/lldrawpoolterrain.h index 3056da44d5..283ed87f1a 100644 --- a/indra/newview/lldrawpoolterrain.h +++ b/indra/newview/lldrawpoolterrain.h @@ -40,8 +40,7 @@ public: LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_TEXCOORD2 | - LLVertexBuffer::MAP_TEXCOORD3 | - LLVertexBuffer::MAP_COLOR + LLVertexBuffer::MAP_TEXCOORD3 }; virtual U32 getVertexDataMask(); diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index bc82b0df13..0108690538 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -317,7 +317,6 @@ BOOL LLVOSurfacePatch::updateLOD() void LLVOSurfacePatch::getGeometry(LLStrider<LLVector3> &verticesp, LLStrider<LLVector3> &normalsp, - LLStrider<LLColor4U> &colorsp, LLStrider<LLVector2> &texCoords0p, LLStrider<LLVector2> &texCoords1p, LLStrider<U16> &indicesp) @@ -329,7 +328,6 @@ void LLVOSurfacePatch::getGeometry(LLStrider<LLVector3> &verticesp, updateMainGeometry(facep, verticesp, normalsp, - colorsp, texCoords0p, texCoords1p, indicesp, @@ -337,7 +335,6 @@ void LLVOSurfacePatch::getGeometry(LLStrider<LLVector3> &verticesp, updateNorthGeometry(facep, verticesp, normalsp, - colorsp, texCoords0p, texCoords1p, indicesp, @@ -345,7 +342,6 @@ void LLVOSurfacePatch::getGeometry(LLStrider<LLVector3> &verticesp, updateEastGeometry(facep, verticesp, normalsp, - colorsp, texCoords0p, texCoords1p, indicesp, @@ -355,7 +351,6 @@ void LLVOSurfacePatch::getGeometry(LLStrider<LLVector3> &verticesp, void LLVOSurfacePatch::updateMainGeometry(LLFace *facep, LLStrider<LLVector3> &verticesp, LLStrider<LLVector3> &normalsp, - LLStrider<LLColor4U> &colorsp, LLStrider<LLVector2> &texCoords0p, LLStrider<LLVector2> &texCoords1p, LLStrider<U16> &indicesp, @@ -396,7 +391,6 @@ void LLVOSurfacePatch::updateMainGeometry(LLFace *facep, x = i * render_stride; y = j * render_stride; mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get()); - *colorsp++ = LLColor4U::white; verticesp++; normalsp++; texCoords0p++; @@ -461,7 +455,6 @@ void LLVOSurfacePatch::updateMainGeometry(LLFace *facep, void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep, LLStrider<LLVector3> &verticesp, LLStrider<LLVector3> &normalsp, - LLStrider<LLColor4U> &colorsp, LLStrider<LLVector2> &texCoords0p, LLStrider<LLVector2> &texCoords1p, LLStrider<U16> &indicesp, @@ -499,7 +492,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep, y = 16 - render_stride; mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get()); - *colorsp++ = LLColor4U::white; verticesp++; normalsp++; texCoords0p++; @@ -515,7 +507,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep, mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get()); verticesp++; normalsp++; - *colorsp++ = LLColor4U::white; texCoords0p++; texCoords1p++; vertex_count++; @@ -554,7 +545,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep, mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get()); verticesp++; normalsp++; - *colorsp++ = LLColor4U::white; texCoords0p++; texCoords1p++; vertex_count++; @@ -569,7 +559,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep, mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get()); verticesp++; normalsp++; - *colorsp++ = LLColor4U::white; texCoords0p++; texCoords1p++; vertex_count++; @@ -613,7 +602,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep, y = 16 - render_stride; mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get()); - *colorsp++ = LLColor4U::white; verticesp++; normalsp++; texCoords0p++; @@ -630,7 +618,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep, mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get()); verticesp++; normalsp++; - *colorsp++ = LLColor4U::white; texCoords0p++; texCoords1p++; vertex_count++; @@ -668,7 +655,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep, void LLVOSurfacePatch::updateEastGeometry(LLFace *facep, LLStrider<LLVector3> &verticesp, LLStrider<LLVector3> &normalsp, - LLStrider<LLColor4U> &colorsp, LLStrider<LLVector2> &texCoords0p, LLStrider<LLVector2> &texCoords1p, LLStrider<U16> &indicesp, @@ -702,7 +688,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep, mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get()); verticesp++; normalsp++; - *colorsp++ = LLColor4U::white; texCoords0p++; texCoords1p++; } @@ -715,7 +700,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep, mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get()); verticesp++; normalsp++; - *colorsp++ = LLColor4U::white; texCoords0p++; texCoords1p++; } @@ -753,7 +737,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep, mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get()); verticesp++; normalsp++; - *colorsp++ = LLColor4U::white; texCoords0p++; texCoords1p++; } @@ -766,7 +749,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep, mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get()); verticesp++; normalsp++; - *colorsp++ = LLColor4U::white; texCoords0p++; texCoords1p++; } @@ -810,7 +792,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep, mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get()); verticesp++; normalsp++; - *colorsp++ = LLColor4U::white; texCoords0p++; texCoords1p++; } @@ -823,7 +804,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep, mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get()); verticesp++; normalsp++; - *colorsp++ = LLColor4U::white; texCoords0p++; texCoords1p++; } @@ -1094,14 +1074,12 @@ void LLTerrainPartition::getGeometry(LLSpatialGroup* group) LLStrider<LLVector3> normals; LLStrider<LLVector2> texcoords2; LLStrider<LLVector2> texcoords; - LLStrider<LLColor4U> colors; LLStrider<U16> indices; llassert_always(buffer->getVertexStrider(vertices)); llassert_always(buffer->getNormalStrider(normals)); llassert_always(buffer->getTexCoord0Strider(texcoords)); llassert_always(buffer->getTexCoord1Strider(texcoords2)); - llassert_always(buffer->getColorStrider(colors)); llassert_always(buffer->getIndexStrider(indices)); U32 indices_index = 0; @@ -1116,7 +1094,7 @@ void LLTerrainPartition::getGeometry(LLSpatialGroup* group) facep->setVertexBuffer(buffer); LLVOSurfacePatch* patchp = (LLVOSurfacePatch*) facep->getViewerObject(); - patchp->getGeometry(vertices, normals, colors, texcoords, texcoords2, indices); + patchp->getGeometry(vertices, normals, texcoords, texcoords2, indices); indices_index += facep->getIndicesCount(); index_offset += facep->getGeomCount(); diff --git a/indra/newview/llvosurfacepatch.h b/indra/newview/llvosurfacepatch.h index 8e75ff2e6e..a15878368e 100644 --- a/indra/newview/llvosurfacepatch.h +++ b/indra/newview/llvosurfacepatch.h @@ -44,8 +44,7 @@ public: VERTEX_DATA_MASK = (1 << LLVertexBuffer::TYPE_VERTEX) | (1 << LLVertexBuffer::TYPE_NORMAL) | (1 << LLVertexBuffer::TYPE_TEXCOORD0) | - (1 << LLVertexBuffer::TYPE_TEXCOORD1) | - (1 << LLVertexBuffer::TYPE_COLOR) + (1 << LLVertexBuffer::TYPE_TEXCOORD1) }; LLVOSurfacePatch(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); @@ -64,7 +63,6 @@ public: /*virtual*/ void updateFaceSize(S32 idx); void getGeometry(LLStrider<LLVector3> &verticesp, LLStrider<LLVector3> &normalsp, - LLStrider<LLColor4U> &colorsp, LLStrider<LLVector2> &texCoords0p, LLStrider<LLVector2> &texCoords1p, LLStrider<U16> &indicesp); @@ -116,7 +114,6 @@ protected: void updateMainGeometry(LLFace *facep, LLStrider<LLVector3> &verticesp, LLStrider<LLVector3> &normalsp, - LLStrider<LLColor4U> &colorsp, LLStrider<LLVector2> &texCoords0p, LLStrider<LLVector2> &texCoords1p, LLStrider<U16> &indicesp, @@ -124,7 +121,6 @@ protected: void updateNorthGeometry(LLFace *facep, LLStrider<LLVector3> &verticesp, LLStrider<LLVector3> &normalsp, - LLStrider<LLColor4U> &colorsp, LLStrider<LLVector2> &texCoords0p, LLStrider<LLVector2> &texCoords1p, LLStrider<U16> &indicesp, @@ -132,7 +128,6 @@ protected: void updateEastGeometry(LLFace *facep, LLStrider<LLVector3> &verticesp, LLStrider<LLVector3> &normalsp, - LLStrider<LLColor4U> &colorsp, LLStrider<LLVector2> &texCoords0p, LLStrider<LLVector2> &texCoords1p, LLStrider<U16> &indicesp, |