diff --git a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl
index 5dcfa87066..4fec3d1936 100644
--- a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl
@@ -35,6 +35,9 @@ ATTRIBUTE vec2 texcoord0;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
+// FIRE-3661; Uniform variable for color.
+uniform vec4 color;
+//
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
@@ -50,8 +53,12 @@ void main()
calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0.));
- vertex_color = color;
+// USe color passed by uniform instead of hardcoded value
+
+// vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0.));
+// vertex_color = color;
+
+ vertex_color = calcLighting(pos.xyz, norm, color, vec4(0.));
+//
-
}
diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index 6491e8baa3..4ab29753ee 100644
--- a/indra/newview/llfloaterimagepreview.cpp
+++ b/indra/newview/llfloaterimagepreview.cpp
@@ -911,6 +911,11 @@ BOOL LLImagePreviewSculpted::render()
const F32 BRIGHTNESS = 0.9f;
gGL.color3f(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS);
+ // FIRE-3661; set color to 1/1/1/1, this is the value that was
+ // previously hard coded in previewV.glsl
+ gGL.diffuseColor4f( 1., 1., 1., 1. );
+ //
+
mVertexBuffer->setBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0);
mVertexBuffer->draw(LLRender::TRIANGLES, num_indices, 0);