diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llmath/llmath.h | 20 | ||||
-rw-r--r-- | indra/llmath/v3color.h | 8 | ||||
-rw-r--r-- | indra/llmath/v4color.h | 11 | ||||
-rw-r--r-- | indra/llmath/v4math.h | 12 | ||||
-rw-r--r-- | indra/llprimitive/llprimitive.h | 4 | ||||
-rw-r--r-- | indra/llrender/llcubemap.cpp | 18 | ||||
-rw-r--r-- | indra/llrender/llcubemap.h | 3 | ||||
-rw-r--r-- | indra/llrender/llimagegl.cpp | 47 | ||||
-rw-r--r-- | indra/llrender/llrender.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lldrawpoolwlsky.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llvosky.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llvovolume.h | 1 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 21 |
14 files changed, 152 insertions, 35 deletions
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index e508c9a199..bb19248f1f 100644 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -537,6 +537,26 @@ inline void ll_remove_outliers(std::vector<VEC_TYPE>& data, F32 k) } } +// This converts from a non-linear sRGB floating point value (0..1) to a linear value. +// Useful for gamma correction and such. Note: any values passed through this should not be serialized. You should also ideally cache the output of this. +inline float sRGBtoLinear(const float val) { + if (val < 0.0031308f) { + return val * 12.92f; + } + else { + return 1.055f * pow(val, 1.0f / 2.4f) - 0.055f; + } +} + +inline float linearTosRGB(const float val) { + if (val < 0.04045f) { + return val / 12.92f; + } + else { + return pow((val + 0.055f) / 1.055f, 2.4f); + } +} + // Include simd math header #include "llsimdmath.h" diff --git a/indra/llmath/v3color.h b/indra/llmath/v3color.h index 43910a1bbe..ac78197510 100644 --- a/indra/llmath/v3color.h +++ b/indra/llmath/v3color.h @@ -475,5 +475,13 @@ inline LLColor3 lerp(const LLColor3 &a, const LLColor3 &b, F32 u) a.mV[VZ] + (b.mV[VZ] - a.mV[VZ]) * u); } +inline const LLColor3 srgbColor3(const LLColor3 &a) { + LLColor3 srgbColor; + srgbColor.mV[0] = linearTosRGB(a.mV[0]); + srgbColor.mV[1] = linearTosRGB(a.mV[1]); + srgbColor.mV[2] = linearTosRGB(a.mV[2]); + + return srgbColor; +} #endif diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h index 614cdc9f3e..d9dd28ec54 100644 --- a/indra/llmath/v4color.h +++ b/indra/llmath/v4color.h @@ -656,5 +656,16 @@ void LLColor4::clamp() } } +inline const LLColor4 srgbColor4(const LLColor4 &a) { + LLColor4 srgbColor; + + srgbColor.mV[0] = linearTosRGB(a.mV[0]); + srgbColor.mV[1] = linearTosRGB(a.mV[1]); + srgbColor.mV[2] = linearTosRGB(a.mV[2]); + srgbColor.mV[3] = a.mV[3]; + + return srgbColor; +} + #endif diff --git a/indra/llmath/v4math.h b/indra/llmath/v4math.h index 3f6d480ed9..00baeefa5c 100644 --- a/indra/llmath/v4math.h +++ b/indra/llmath/v4math.h @@ -534,6 +534,18 @@ inline F32 LLVector4::normVec(void) return (mag); } +// Because apparently some parts of the viewer use this for color info. +inline const LLVector4 srgbVector4(const LLVector4 &a) { + LLVector4 srgbColor; + + srgbColor.mV[0] = linearTosRGB(a.mV[0]); + srgbColor.mV[1] = linearTosRGB(a.mV[1]); + srgbColor.mV[2] = linearTosRGB(a.mV[2]); + srgbColor.mV[3] = a.mV[3]; + + return srgbColor; +} + #endif diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h index c138c2ac2b..677606abd1 100644 --- a/indra/llprimitive/llprimitive.h +++ b/indra/llprimitive/llprimitive.h @@ -133,6 +133,7 @@ class LLLightParams : public LLNetworkData { protected: LLColor4 mColor; // alpha = intensity + LLColor4 msRGBColor; // Only used in deferred (for now?) F32 mRadius; F32 mFalloff; F32 mCutoff; @@ -150,12 +151,13 @@ public: bool fromLLSD(LLSD& sd); - void setColor(const LLColor4& color) { mColor = color; mColor.clamp(); } + void setColor(const LLColor4& color) { mColor = color; mColor.clamp(); msRGBColor = srgbColor4(mColor); } void setRadius(F32 radius) { mRadius = llclamp(radius, LIGHT_MIN_RADIUS, LIGHT_MAX_RADIUS); } void setFalloff(F32 falloff) { mFalloff = llclamp(falloff, LIGHT_MIN_FALLOFF, LIGHT_MAX_FALLOFF); } void setCutoff(F32 cutoff) { mCutoff = llclamp(cutoff, LIGHT_MIN_CUTOFF, LIGHT_MAX_CUTOFF); } LLColor4 getColor() const { return mColor; } + LLColor4 getsRGBColor() const { return msRGBColor; } F32 getRadius() const { return mRadius; } F32 getFalloff() const { return mFalloff; } F32 getCutoff() const { return mCutoff; } diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp index af4e3fdda0..fcac016ed7 100644 --- a/indra/llrender/llcubemap.cpp +++ b/indra/llrender/llcubemap.cpp @@ -53,10 +53,11 @@ const BOOL use_cube_mipmaps = FALSE; //current build works best without cube mi bool LLCubeMap::sUseCubeMaps = true; -LLCubeMap::LLCubeMap() +LLCubeMap::LLCubeMap(bool init_as_srgb) : mTextureStage(0), mTextureCoordStage(0), - mMatrixStage(0) + mMatrixStage(0), + mIssRGB(init_as_srgb) { mTargets[0] = GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB; mTargets[1] = GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB; @@ -82,12 +83,15 @@ void LLCubeMap::initGL() U32 texname = 0; LLImageGL::generateTextures(1, &texname); - + for (int i = 0; i < 6; i++) { - mImages[i] = new LLImageGL(64, 64, 4, (use_cube_mipmaps? TRUE : FALSE)); + mImages[i] = new LLImageGL(RESOLUTION, RESOLUTION, 4, FALSE); + if (mIssRGB) { + mImages[i]->setExplicitFormat(GL_SRGB8_ALPHA8, GL_RGBA); + } mImages[i]->setTarget(mTargets[i], LLTexUnit::TT_CUBE_MAP); - mRawImages[i] = new LLImageRaw(64, 64, 4); + mRawImages[i] = new LLImageRaw(RESOLUTION, RESOLUTION, 4); mImages[i]->createGLTexture(0, mRawImages[i], texname); gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_CUBE_MAP, texname); @@ -154,7 +158,7 @@ void LLCubeMap::initGLData() { for (int i = 0; i < 6; i++) { - mImages[i]->setSubImage(mRawImages[i], 0, 0, 64, 64); + mImages[i]->setSubImage(mRawImages[i], 0, 0, RESOLUTION, RESOLUTION); } } @@ -484,7 +488,7 @@ void LLCubeMap::paintIn(LLVector3 dir[4], const LLColor4U& col) td[offset + cc] = U8((td[offset + cc] + col.mV[cc]) * 0.5); } } - mImages[side]->setSubImage(mRawImages[side], 0, 0, 64, 64); + mImages[side]->setSubImage(mRawImages[side], 0, 0, RESOLUTION, RESOLUTION); } } diff --git a/indra/llrender/llcubemap.h b/indra/llrender/llcubemap.h index ee2c41e026..95b6d12099 100644 --- a/indra/llrender/llcubemap.h +++ b/indra/llrender/llcubemap.h @@ -36,8 +36,9 @@ class LLVector3; // Environment map hack! class LLCubeMap : public LLRefCount { + bool mIssRGB; public: - LLCubeMap(); + LLCubeMap(bool init_as_srgb); void init(const std::vector<LLPointer<LLImageRaw> >& rawimages); void initGL(); void initRawData(const std::vector<LLPointer<LLImageRaw> >& rawimages); diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 7d8f512c93..d3f8431654 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -187,15 +187,20 @@ S32 LLImageGL::dataFormatBits(S32 dataformat) switch (dataformat) { case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: return 4; + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: return 4; case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: return 8; + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: return 8; case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: return 8; + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: return 8; case GL_LUMINANCE: return 8; case GL_ALPHA: return 8; case GL_COLOR_INDEX: return 8; case GL_LUMINANCE_ALPHA: return 16; case GL_RGB: return 24; + case GL_SRGB: return 24; case GL_RGB8: return 24; case GL_RGBA: return 32; + case GL_SRGB_ALPHA: return 32; case GL_BGRA: return 32; // Used for QuickTime media textures on the Mac default: LL_ERRS() << "LLImageGL::Unknown format: " << dataformat << LL_ENDL; @@ -206,11 +211,19 @@ S32 LLImageGL::dataFormatBits(S32 dataformat) //static S32 LLImageGL::dataFormatBytes(S32 dataformat, S32 width, S32 height) { - if (dataformat >= GL_COMPRESSED_RGB_S3TC_DXT1_EXT && - dataformat <= GL_COMPRESSED_RGBA_S3TC_DXT5_EXT) + switch (dataformat) { + case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: + case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: + case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: if (width < 4) width = 4; if (height < 4) height = 4; + break; + default: + break; } S32 bytes ((width*height*dataFormatBits(dataformat)+7)>>3); S32 aligned = (bytes+3)&~3; @@ -223,14 +236,19 @@ S32 LLImageGL::dataFormatComponents(S32 dataformat) switch (dataformat) { case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: return 3; + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: return 3; case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: return 4; + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: return 4; case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: return 4; + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: return 4; case GL_LUMINANCE: return 1; case GL_ALPHA: return 1; case GL_COLOR_INDEX: return 1; case GL_LUMINANCE_ALPHA: return 2; case GL_RGB: return 3; + case GL_SRGB: return 3; case GL_RGBA: return 4; + case GL_SRGB_ALPHA: return 4; case GL_BGRA: return 4; // Used for QuickTime media textures on the Mac default: LL_ERRS() << "LLImageGL::Unknown format: " << dataformat << LL_ENDL; @@ -650,9 +668,19 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) { LL_RECORD_BLOCK_TIME(FTM_SET_IMAGE); bool is_compressed = false; - if (mFormatPrimary >= GL_COMPRESSED_RGBA_S3TC_DXT1_EXT && mFormatPrimary <= GL_COMPRESSED_RGBA_S3TC_DXT5_EXT) + + switch (mFormatPrimary) { + case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: + case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: + case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: is_compressed = true; + break; + default: + break; } @@ -1227,10 +1255,18 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt case GL_RGB8: intformat = GL_COMPRESSED_RGB; break; + case GL_SRGB: + case GL_SRGB8: + intformat = GL_COMPRESSED_SRGB; + break; case GL_RGBA: case GL_RGBA8: intformat = GL_COMPRESSED_RGBA; break; + case GL_SRGB_ALPHA: + case GL_SRGB8_ALPHA8: + intformat = GL_COMPRESSED_SRGB_ALPHA; + break; case GL_LUMINANCE: case GL_LUMINANCE8: intformat = GL_COMPRESSED_LUMINANCE; @@ -1798,10 +1834,12 @@ void LLImageGL::calcAlphaChannelOffsetAndStride() mAlphaStride = 2; break; case GL_RGB: + case GL_SRGB: mNeedsAlphaAndPickMask = FALSE ; mIsMask = FALSE; return ; //no alpha channel. case GL_RGBA: + case GL_SRGB_ALPHA: mAlphaStride = 4; break; case GL_BGRA_EXT: @@ -1993,7 +2031,8 @@ void LLImageGL::updatePickMask(S32 width, S32 height, const U8* data_in) freePickMask(); if (mFormatType != GL_UNSIGNED_BYTE || - mFormatPrimary != GL_RGBA) + mFormatPrimary != GL_RGBA || + mFormatPrimary != GL_SRGB_ALPHA) { //cannot generate a pick mask for this texture return; diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 2bf7ad9902..fe6010fabd 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -1193,7 +1193,7 @@ void LLRender::syncLightState() shader->uniform3fv(LLShaderMgr::LIGHT_DIRECTION, 8, direction[0].mV); shader->uniform4fv(LLShaderMgr::LIGHT_ATTENUATION, 8, attenuation[0].mV); shader->uniform3fv(LLShaderMgr::LIGHT_DIFFUSE, 8, diffuse[0].mV); - shader->uniform4fv(LLShaderMgr::LIGHT_AMBIENT, 1, mAmbientLightColor.mV); + shader->uniform4fv(LLShaderMgr::LIGHT_AMBIENT, 1, srgbColor4(mAmbientLightColor).mV); shader->uniform1i(LLShaderMgr::SUN_UP_FACTOR, sun_primary[0] ? 1 : 0); shader->uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, diffuse_b[0].mV); } diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index e608f6eaf2..7f59852b62 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -503,7 +503,12 @@ void LLDrawPoolWLSky::renderHeavenlyBodies() LLColor4 color(gSky.mVOSkyp->getSun().getInterpColor()); - sun_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, color.mV); + if (LLPipeline::RenderDeferred) { + sun_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, srgbColor4(color).mV); + } + else { + sun_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, color.mV); + } sun_shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); LLFacePool::LLOverrideFaceColor color_override(this, color); @@ -554,9 +559,15 @@ void LLDrawPoolWLSky::renderHeavenlyBodies() F32 moon_brightness = (float)psky->getMoonBrightness(); moon_shader->uniform1f(LLShaderMgr::MOON_BRIGHTNESS, moon_brightness); - moon_shader->uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, gSky.mVOSkyp->getMoon().getColor().mV); - moon_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, color.mV); + if (LLPipeline::RenderDeferred) { + moon_shader->uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, srgbColor4(gSky.mVOSkyp->getMoon().getColor()).mV); + moon_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, srgbColor4(color).mV); + } + else { + moon_shader->uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, gSky.mVOSkyp->getMoon().getColor().mV); + moon_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, color.mV); + } moon_shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); LLFacePool::LLOverrideFaceColor color_override(this, color); diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 96363045d3..954a590682 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -207,6 +207,12 @@ void LLSkyTex::create(const F32 brightness) void LLSkyTex::createGLImage(S32 which) { + if (LLPipeline::RenderDeferred) { + mTexture[which]->setExplicitFormat(GL_SRGB8_ALPHA8, GL_RGBA); + } + else { + mTexture[which]->setExplicitFormat(GL_RGBA8, GL_RGBA); + } mTexture[which]->createGLTexture(0, mImageRaw[which], 0, TRUE, LLGLTexture::LOCAL); mTexture[which]->setAddressMode(LLTexUnit::TAM_CLAMP); } @@ -613,7 +619,9 @@ void LLVOSky::initCubeMap() } else if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps) { - mCubeMap = new LLCubeMap(); + bool wantsRGB = LLPipeline::RenderDeferred; + + mCubeMap = new LLCubeMap(wantsRGB); mCubeMap->init(images); } gGL.getTexUnit(0)->disable(); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index b4b3e19abc..16fca58f8c 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3239,6 +3239,19 @@ LLColor3 LLVOVolume::getLightColor() const } } +LLColor3 LLVOVolume::getLightsRGBColor() const +{ + const LLLightParams *param_block = (const LLLightParams *)getParameterEntry(LLNetworkData::PARAMS_LIGHT); + if (param_block) + { + return LLColor3(param_block->getsRGBColor()) * param_block->getsRGBColor().mV[3]; + } + else + { + return LLColor3(1, 1, 1); + } +} + LLUUID LLVOVolume::getLightTextureID() const { if (getParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE)) diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 0882fc095d..aeabcda911 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -251,6 +251,7 @@ public: BOOL getIsLight() const; LLColor3 getLightBaseColor() const; // not scaled by intensity LLColor3 getLightColor() const; // scaled by intensity + LLColor3 getLightsRGBColor() const; // Used to get the (cached) light color in sRGB color space. Also scaled by intensity. LLUUID getLightTextureID() const; bool isLightSpotlight() const; LLVector3 getSpotLightParams() const; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 4c93d16fb1..b8c8a42125 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -8368,7 +8368,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_ shader.uniform1f(LLShaderMgr::DEFERRED_NORM_CUTOFF, RenderEdgeNormCutoff); shader.uniform4fv(LLShaderMgr::SUNLIGHT_COLOR, 1, mSunDiffuse.mV); - shader.uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, mMoonDiffuse.mV); + shader.uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, srgbColor4(mMoonDiffuse).mV); LLEnvironment& environment = LLEnvironment::instance(); shader.uniform1i(LLShaderMgr::SUN_UP_FACTOR, environment.getIsSunUp() ? 1 : 0); @@ -8705,7 +8705,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target) const F32* c = center.getF32ptr(); F32 s = volume->getLightRadius()*1.5f; - LLColor3 col = volume->getLightColor(); + LLColor3 col = volume->getLightsRGBColor(); if (col.magVecSquared() < 0.001f) { @@ -8742,10 +8742,6 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target) continue; } - /*col.mV[0] = powf(col.mV[0], 2.2f); - col.mV[1] = powf(col.mV[1], 2.2f); - col.mV[2] = powf(col.mV[2], 2.2f);*/ - LL_RECORD_BLOCK_TIME(FTM_LOCAL_LIGHTS); gDeferredLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, c); gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s); @@ -8801,7 +8797,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target) setupSpotLight(gDeferredSpotLightProgram, drawablep); - LLColor3 col = volume->getLightColor(); + LLColor3 col = volume->getLightsRGBColor(); /*col.mV[0] = powf(col.mV[0], 2.2f); col.mV[1] = powf(col.mV[1], 2.2f); col.mV[2] = powf(col.mV[2], 2.2f);*/ @@ -8850,12 +8846,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target) col[count] = light_colors.front(); light_colors.pop_front(); - /*col[count].mV[0] = powf(col[count].mV[0], 2.2f); - col[count].mV[1] = powf(col[count].mV[1], 2.2f); - col[count].mV[2] = powf(col[count].mV[2], 2.2f);*/ - far_z = llmin(light[count].mV[2]-light[count].mV[3], far_z); - //col[count] = pow4fsrgb(col[count], 2.2f); count++; if (count == max_count || fullscreen_lights.empty()) { @@ -8897,11 +8888,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target) setupSpotLight(gDeferredMultiSpotLightProgram, drawablep); - LLColor3 col = volume->getLightColor(); - - /*col.mV[0] = powf(col.mV[0], 2.2f); - col.mV[1] = powf(col.mV[1], 2.2f); - col.mV[2] = powf(col.mV[2], 2.2f);*/ + LLColor3 col = volume->getLightsRGBColor(); gDeferredMultiSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, tc.v); gDeferredMultiSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s); |