Merge
commit
a984c5e66a
|
|
@ -389,7 +389,7 @@ bool LLSettingsBase::validate()
|
|||
|
||||
LLSD LLSettingsBase::settingValidation(LLSD &settings, validation_list_t &validations, bool partial)
|
||||
{
|
||||
static Validator validateName(SETTING_NAME, false, LLSD::TypeString, boost::bind(&Validator::verifyStringLength, _1, 32));
|
||||
static Validator validateName(SETTING_NAME, false, LLSD::TypeString, boost::bind(&Validator::verifyStringLength, _1, 63));
|
||||
static Validator validateId(SETTING_ID, false, LLSD::TypeUUID);
|
||||
static Validator validateHash(SETTING_HASH, false, LLSD::TypeInteger);
|
||||
static Validator validateType(SETTING_TYPE, false, LLSD::TypeString);
|
||||
|
|
|
|||
|
|
@ -1276,8 +1276,10 @@ void LLSettingsSky::calculateLightSettings() const
|
|||
LLColor3 tmpAmbient = ambient + (smear(1.f) - ambient) * cloud_shadow;
|
||||
|
||||
//brightness of surface both sunlight and ambient
|
||||
mSunDiffuse = gammaCorrect(componentMult(sunlight, light_transmittance));
|
||||
mSunAmbient = gammaCorrect(componentMult(tmpAmbient, light_transmittance));
|
||||
// reduce range to 0 - 1 before gamma correct to prevent clipping
|
||||
// then restore to full 0 - 3 range before storage
|
||||
mSunDiffuse = gammaCorrect(componentMult(sunlight * 0.33333f, light_transmittance)) * 3.0f;
|
||||
mSunAmbient = gammaCorrect(componentMult(tmpAmbient * 0.33333f, light_transmittance)) * 3.0f;
|
||||
|
||||
F32 moon_brightness = getIsMoonUp() ? getMoonBrightness() : 0.001f;
|
||||
|
||||
|
|
|
|||
|
|
@ -223,8 +223,7 @@ void main()
|
|||
float ambient = da;
|
||||
ambient *= 0.5;
|
||||
ambient *= ambient;
|
||||
//ambient = max(getAmbientClamp(), ambient); // keeps shadows dark
|
||||
ambient = 1.0 - ambient;
|
||||
ambient = min(getAmbientClamp(), 1.0 - ambient);
|
||||
|
||||
vec3 sun_contrib = min(final_da, shadow) * sunlit;
|
||||
|
||||
|
|
|
|||
|
|
@ -320,8 +320,7 @@ void main()
|
|||
float ambient = da;
|
||||
ambient *= 0.5;
|
||||
ambient *= ambient;
|
||||
//ambient = max(getAmbientClamp(), ambient);
|
||||
ambient = 1.0 - ambient;
|
||||
ambient = min(getAmbientClamp(), 1.0 - ambient);
|
||||
|
||||
vec3 sun_contrib = min(final_da, shadow) * sunlit;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ float pcfShadow(sampler2DShadow shadowMap, vec3 norm, vec4 stc, float bias_mul,
|
|||
{
|
||||
float offset = shadow_bias * bias_mul;
|
||||
stc.xyz /= stc.w;
|
||||
stc.z += offset * 3.0;
|
||||
stc.z += offset * 2.0;
|
||||
stc.x = floor(stc.x*shadow_res.x + fract(pos_screen.y*shadow_res.y))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
|
||||
float cs = shadow2D(shadowMap, stc.xyz).x;
|
||||
float shadow = cs * 4.0;
|
||||
|
|
|
|||
|
|
@ -106,8 +106,7 @@ void main()
|
|||
float ambient = da;
|
||||
ambient *= 0.5;
|
||||
ambient *= ambient;
|
||||
//ambient = max(getAmbientClamp(), ambient);
|
||||
ambient = 1.0 - ambient;
|
||||
ambient = min(getAmbientClamp(), 1.0 - ambient);
|
||||
|
||||
vec3 sun_contrib = final_da * sunlit;
|
||||
|
||||
|
|
|
|||
|
|
@ -157,6 +157,6 @@ void main()
|
|||
vec3 screenspacewavef = normalize((norm_mat*vec4(wavef, 1.0)).xyz);
|
||||
|
||||
frag_data[0] = vec4(color.rgb, 0); // diffuse
|
||||
frag_data[1] = vec4(specular * 0.15, 0.5); // speccolor, spec
|
||||
frag_data[1] = vec4(specular * 0.5, 0.5); // speccolor, spec
|
||||
frag_data[2] = vec4(encode_normal(screenspacewavef.xyz), 0.05, 0);// normalxy, 0, 0
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ uniform float sun_moon_glow_factor;
|
|||
|
||||
float getAmbientClamp()
|
||||
{
|
||||
return 0.66f;
|
||||
return 0.2f;
|
||||
}
|
||||
|
||||
void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten) {
|
||||
|
|
@ -137,7 +137,7 @@ void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, o
|
|||
+ tmpAmbient));
|
||||
|
||||
//brightness of surface both sunlight and ambient
|
||||
sunlit = sunlight.rgb * 0.5;
|
||||
amblit = tmpAmbient.rgb * .25;
|
||||
sunlit = sunlight.rgb;
|
||||
amblit = tmpAmbient.rgb;
|
||||
additive *= vec3(1.0 - temp1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,8 +116,7 @@ void main()
|
|||
float ambient = da;
|
||||
ambient *= 0.5;
|
||||
ambient *= ambient;
|
||||
//ambient = max(getAmbientClamp(), ambient);
|
||||
ambient = 1.0 - ambient;
|
||||
ambient = min(getAmbientClamp(), 1.0 - ambient);
|
||||
|
||||
vec3 sun_contrib = min(scol, final_da) * sunlit;
|
||||
|
||||
|
|
@ -190,11 +189,10 @@ vec3 post_atmo = color.rgb;
|
|||
bloom = fogged.a;
|
||||
#endif
|
||||
|
||||
// srgb colorspace debuggables
|
||||
//color.rgb = amblit;
|
||||
//color.rgb = vec3(ambient);
|
||||
//color.rgb = sunlit;
|
||||
//color.rgb = post_ambient;
|
||||
//color.rgb = vec3(final_da);
|
||||
//color.rgb = sun_contrib;
|
||||
//color.rgb = post_sunlight;
|
||||
//color.rgb = diffuse_srgb.rgb;
|
||||
|
|
@ -208,6 +206,11 @@ vec3 post_atmo = color.rgb;
|
|||
color.rgb = srgb_to_linear(color.rgb);
|
||||
}
|
||||
|
||||
// linear debuggables
|
||||
//color.rgb = vec3(final_da);
|
||||
//color.rgb = vec3(ambient);
|
||||
//color.rgb = vec3(scol);
|
||||
|
||||
frag_color.rgb = color.rgb;
|
||||
frag_color.a = bloom;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@
|
|||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// VARYING param funcs
|
||||
void setSunlitColor(vec3 v);
|
||||
|
|
|
|||
|
|
@ -51,11 +51,11 @@ vec3 atmosTransport(vec3 light)
|
|||
vec3 fullbrightAtmosTransport(vec3 light)
|
||||
{
|
||||
float brightness = dot(light.rgb, vec3(0.33333));
|
||||
return atmosTransportFrag(light, getAdditiveColor() * (brightness * 0.5 + 0.5), getAtmosAttenuation());
|
||||
return atmosTransportFrag(light * 0.5, getAdditiveColor() * (brightness * 0.5 + 0.5), getAtmosAttenuation());
|
||||
}
|
||||
|
||||
vec3 fullbrightShinyAtmosTransport(vec3 light)
|
||||
{
|
||||
float brightness = dot(light.rgb, vec3(0.33333));
|
||||
return atmosTransportFrag(light, getAdditiveColor() * (brightness * 0.5 + 0.5), getAtmosAttenuation());
|
||||
return atmosTransportFrag(light * 0.5, getAdditiveColor() * (brightness * brightness), getAtmosAttenuation());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ vec4 sumLights(vec3 pos, vec3 norm, vec4 color);
|
|||
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color)
|
||||
{
|
||||
vec4 c = sumLights(pos, norm, color);
|
||||
c.rgb += atmosAmbient() * color.rgb;
|
||||
c.rgb += atmosAmbient() * color.rgb * 0.25;
|
||||
return c;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,22 +37,29 @@ uniform vec4 blue_density;
|
|||
uniform float haze_horizon;
|
||||
uniform float haze_density;
|
||||
uniform float cloud_shadow;
|
||||
uniform float density_multiplier;
|
||||
uniform float distance_multiplier;
|
||||
uniform float max_y;
|
||||
uniform vec4 glow;
|
||||
uniform float scene_light_strength;
|
||||
uniform mat3 ssao_effect_mat;
|
||||
uniform int no_atmo;
|
||||
uniform float sun_moon_glow_factor;
|
||||
|
||||
vec3 scaleSoftClipFrag(vec3 light);
|
||||
|
||||
vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten)
|
||||
{
|
||||
light *= atten.r;
|
||||
light += additive;
|
||||
return (2.0 * light);
|
||||
if (no_atmo == 1)
|
||||
{
|
||||
return light;
|
||||
}
|
||||
light *= atten.r;
|
||||
light += additive;
|
||||
return light * 2.0;
|
||||
}
|
||||
|
||||
vec3 atmosLighting(vec3 light)
|
||||
{
|
||||
return atmosFragLighting(light, getAdditiveColor(), getAtmosAttenuation());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,10 +35,12 @@ uniform int no_atmo;
|
|||
vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
|
||||
{
|
||||
if (no_atmo == 1)
|
||||
{
|
||||
{
|
||||
return light;
|
||||
}
|
||||
return (light + additive) * atten * 2.0;
|
||||
light *= atten.r;
|
||||
light += additive;
|
||||
return light * 2.0;
|
||||
}
|
||||
|
||||
vec3 atmosTransport(vec3 light)
|
||||
|
|
@ -48,10 +50,12 @@ vec3 atmosTransport(vec3 light)
|
|||
|
||||
vec3 fullbrightAtmosTransport(vec3 light)
|
||||
{
|
||||
return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation());
|
||||
float brightness = dot(light.rgb, vec3(0.33333));
|
||||
return atmosTransportFrag(light * 0.5, getAdditiveColor() * (brightness * 0.5 + 0.5), getAtmosAttenuation());
|
||||
}
|
||||
|
||||
vec3 fullbrightShinyAtmosTransport(vec3 light)
|
||||
{
|
||||
return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation());
|
||||
float brightness = dot(light.rgb, vec3(0.33333));
|
||||
return atmosTransportFrag(light * 0.5, getAdditiveColor() * (brightness * brightness), getAtmosAttenuation());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -388,12 +388,14 @@ void LLFloaterFixedEnvironment::onButtonApply(LLUICtrl *ctrl, const LLSD &data)
|
|||
std::string ctrl_action = ctrl->getName();
|
||||
|
||||
std::string local_desc;
|
||||
LLSettingsBase::ptr_t setting_clone;
|
||||
bool is_local = false; // because getString can be empty
|
||||
if (mSettings->getSettingsType() == "water")
|
||||
{
|
||||
LLSettingsWater::ptr_t water = std::static_pointer_cast<LLSettingsWater>(mSettings);
|
||||
if (water)
|
||||
{
|
||||
setting_clone = water->buildClone();
|
||||
// LLViewerFetchedTexture and check for FTT_LOCAL_FILE or check LLLocalBitmapMgr
|
||||
if (LLLocalBitmapMgr::isLocal(water->getNormalMapID()))
|
||||
{
|
||||
|
|
@ -412,6 +414,7 @@ void LLFloaterFixedEnvironment::onButtonApply(LLUICtrl *ctrl, const LLSD &data)
|
|||
LLSettingsSky::ptr_t sky = std::static_pointer_cast<LLSettingsSky>(mSettings);
|
||||
if (sky)
|
||||
{
|
||||
setting_clone = sky->buildClone();
|
||||
if (LLLocalBitmapMgr::isLocal(sky->getSunTextureId()))
|
||||
{
|
||||
local_desc = LLTrans::getString("EnvironmentSun");
|
||||
|
|
@ -445,19 +448,19 @@ void LLFloaterFixedEnvironment::onButtonApply(LLUICtrl *ctrl, const LLSD &data)
|
|||
|
||||
if (ctrl_action == ACTION_SAVE)
|
||||
{
|
||||
doApplyUpdateInventory();
|
||||
doApplyUpdateInventory(setting_clone);
|
||||
}
|
||||
else if (ctrl_action == ACTION_SAVEAS)
|
||||
{
|
||||
LLSD args;
|
||||
args["DESC"] = mSettings->getName();
|
||||
LLNotificationsUtil::add("SaveSettingAs", args, LLSD(), boost::bind(&LLFloaterFixedEnvironment::onSaveAsCommit, this, _1, _2));
|
||||
LLNotificationsUtil::add("SaveSettingAs", args, LLSD(), boost::bind(&LLFloaterFixedEnvironment::onSaveAsCommit, this, _1, _2, setting_clone));
|
||||
}
|
||||
else if ((ctrl_action == ACTION_APPLY_LOCAL) ||
|
||||
(ctrl_action == ACTION_APPLY_PARCEL) ||
|
||||
(ctrl_action == ACTION_APPLY_REGION))
|
||||
{
|
||||
doApplyEnvironment(ctrl_action);
|
||||
doApplyEnvironment(ctrl_action, setting_clone);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -465,7 +468,7 @@ void LLFloaterFixedEnvironment::onButtonApply(LLUICtrl *ctrl, const LLSD &data)
|
|||
}
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::onSaveAsCommit(const LLSD& notification, const LLSD& response)
|
||||
void LLFloaterFixedEnvironment::onSaveAsCommit(const LLSD& notification, const LLSD& response, const LLSettingsBase::ptr_t &settings)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
if (0 == option)
|
||||
|
|
@ -474,7 +477,7 @@ void LLFloaterFixedEnvironment::onSaveAsCommit(const LLSD& notification, const L
|
|||
LLStringUtil::trim(settings_name);
|
||||
if (mCanMod)
|
||||
{
|
||||
doApplyCreateNewInventory(settings_name);
|
||||
doApplyCreateNewInventory(settings_name, settings);
|
||||
}
|
||||
else if (mInventoryItem)
|
||||
{
|
||||
|
|
@ -514,44 +517,44 @@ void LLFloaterFixedEnvironment::onButtonLoad()
|
|||
checkAndConfirmSettingsLoss([this](){ doSelectFromInventory(); });
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::doApplyCreateNewInventory(std::string settings_name)
|
||||
void LLFloaterFixedEnvironment::doApplyCreateNewInventory(std::string settings_name, const LLSettingsBase::ptr_t &settings)
|
||||
{
|
||||
if (mInventoryItem)
|
||||
{
|
||||
LLUUID parent_id = mInventoryItem->getParentUUID();
|
||||
U32 next_owner_perm = mInventoryItem->getPermissions().getMaskNextOwner();
|
||||
LLSettingsVOBase::createInventoryItem(mSettings, next_owner_perm, parent_id, settings_name,
|
||||
LLSettingsVOBase::createInventoryItem(settings, next_owner_perm, parent_id, settings_name,
|
||||
[this](LLUUID asset_id, LLUUID inventory_id, LLUUID, LLSD results) { onInventoryCreated(asset_id, inventory_id, results); });
|
||||
}
|
||||
else
|
||||
{
|
||||
LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_SETTINGS);
|
||||
// This method knows what sort of settings object to create.
|
||||
LLSettingsVOBase::createInventoryItem(mSettings, parent_id, settings_name,
|
||||
LLSettingsVOBase::createInventoryItem(settings, parent_id, settings_name,
|
||||
[this](LLUUID asset_id, LLUUID inventory_id, LLUUID, LLSD results) { onInventoryCreated(asset_id, inventory_id, results); });
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::doApplyUpdateInventory()
|
||||
void LLFloaterFixedEnvironment::doApplyUpdateInventory(const LLSettingsBase::ptr_t &settings)
|
||||
{
|
||||
LL_DEBUGS("ENVEDIT") << "Update inventory for " << mInventoryId << LL_ENDL;
|
||||
if (mInventoryId.isNull())
|
||||
{
|
||||
LLSettingsVOBase::createInventoryItem(mSettings, gInventory.findCategoryUUIDForType(LLFolderType::FT_SETTINGS), std::string(),
|
||||
LLSettingsVOBase::createInventoryItem(settings, gInventory.findCategoryUUIDForType(LLFolderType::FT_SETTINGS), std::string(),
|
||||
[this](LLUUID asset_id, LLUUID inventory_id, LLUUID, LLSD results) { onInventoryCreated(asset_id, inventory_id, results); });
|
||||
}
|
||||
else
|
||||
{
|
||||
LLSettingsVOBase::updateInventoryItem(mSettings, mInventoryId,
|
||||
LLSettingsVOBase::updateInventoryItem(settings, mInventoryId,
|
||||
[this](LLUUID asset_id, LLUUID inventory_id, LLUUID, LLSD results) { onInventoryUpdated(asset_id, inventory_id, results); });
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where)
|
||||
void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where, const LLSettingsBase::ptr_t &settings)
|
||||
{
|
||||
if (where == ACTION_APPLY_LOCAL)
|
||||
{
|
||||
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, mSettings);
|
||||
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, settings);
|
||||
}
|
||||
else if (where == ACTION_APPLY_PARCEL)
|
||||
{
|
||||
|
|
@ -568,13 +571,13 @@ void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where)
|
|||
{
|
||||
LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1);
|
||||
}
|
||||
else if (mSettings->getSettingsType() == "sky")
|
||||
else if (settings->getSettingsType() == "sky")
|
||||
{
|
||||
LLEnvironment::instance().updateParcel(parcel->getLocalID(), std::static_pointer_cast<LLSettingsSky>(mSettings), -1, -1);
|
||||
LLEnvironment::instance().updateParcel(parcel->getLocalID(), std::static_pointer_cast<LLSettingsSky>(settings), -1, -1);
|
||||
}
|
||||
else if (mSettings->getSettingsType() == "water")
|
||||
else if (settings->getSettingsType() == "water")
|
||||
{
|
||||
LLEnvironment::instance().updateParcel(parcel->getLocalID(), std::static_pointer_cast<LLSettingsWater>(mSettings), -1, -1);
|
||||
LLEnvironment::instance().updateParcel(parcel->getLocalID(), std::static_pointer_cast<LLSettingsWater>(settings), -1, -1);
|
||||
}
|
||||
}
|
||||
else if (where == ACTION_APPLY_REGION)
|
||||
|
|
@ -583,13 +586,13 @@ void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where)
|
|||
{
|
||||
LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1);
|
||||
}
|
||||
else if (mSettings->getSettingsType() == "sky")
|
||||
else if (settings->getSettingsType() == "sky")
|
||||
{
|
||||
LLEnvironment::instance().updateRegion(std::static_pointer_cast<LLSettingsSky>(mSettings), -1, -1);
|
||||
LLEnvironment::instance().updateRegion(std::static_pointer_cast<LLSettingsSky>(settings), -1, -1);
|
||||
}
|
||||
else if (mSettings->getSettingsType() == "water")
|
||||
else if (settings->getSettingsType() == "water")
|
||||
{
|
||||
LLEnvironment::instance().updateRegion(std::static_pointer_cast<LLSettingsWater>(mSettings), -1, -1);
|
||||
LLEnvironment::instance().updateRegion(std::static_pointer_cast<LLSettingsWater>(settings), -1, -1);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -86,9 +86,9 @@ protected:
|
|||
LLSettingsBase::ptr_t mSettings;
|
||||
|
||||
virtual void doImportFromDisk() = 0;
|
||||
virtual void doApplyCreateNewInventory(std::string settings_name);
|
||||
virtual void doApplyUpdateInventory();
|
||||
virtual void doApplyEnvironment(const std::string &where);
|
||||
virtual void doApplyCreateNewInventory(std::string settings_name, const LLSettingsBase::ptr_t &settings);
|
||||
virtual void doApplyUpdateInventory(const LLSettingsBase::ptr_t &settings);
|
||||
virtual void doApplyEnvironment(const std::string &where, const LLSettingsBase::ptr_t &settings);
|
||||
void doCloseInventoryFloater(bool quitting = false);
|
||||
|
||||
bool canUseInventory() const;
|
||||
|
|
@ -116,7 +116,7 @@ protected:
|
|||
void onPanelDirtyFlagChanged(bool);
|
||||
|
||||
virtual void onClickCloseBtn(bool app_quitting = false) override;
|
||||
void onSaveAsCommit(const LLSD& notification, const LLSD& response);
|
||||
void onSaveAsCommit(const LLSD& notification, const LLSD& response, const LLSettingsBase::ptr_t &settings);
|
||||
|
||||
private:
|
||||
void onNameChanged(const std::string &name);
|
||||
|
|
|
|||
|
|
@ -566,14 +566,8 @@ void LLSettingsVOSky::convertAtmosphericsToLegacy(LLSD& legacy, LLSD& settings)
|
|||
legacy[SETTING_BLUE_DENSITY] = ensure_array_4(legacyhaze[SETTING_BLUE_DENSITY], 1.0);
|
||||
legacy[SETTING_BLUE_HORIZON] = ensure_array_4(legacyhaze[SETTING_BLUE_HORIZON], 1.0);
|
||||
|
||||
F32 density_multiplier = legacyhaze[SETTING_DENSITY_MULTIPLIER].asReal();
|
||||
density_multiplier = (density_multiplier < 0.0001f) ? 0.0001f : density_multiplier;
|
||||
density_multiplier *= 0.9f / 2.0f; // take 0 - 2.0 range to 0 - 0.9 range
|
||||
legacy[SETTING_DENSITY_MULTIPLIER] = LLSDArray(density_multiplier)(0.0f)(0.0f)(1.0f);
|
||||
|
||||
F32 distance_multiplier = legacyhaze[SETTING_DISTANCE_MULTIPLIER].asReal();
|
||||
distance_multiplier *= 0.1f; // take 0 - 1000 range to 0 - 100 range
|
||||
legacy[SETTING_DISTANCE_MULTIPLIER] = LLSDArray(distance_multiplier)(0.0f)(0.0f)(1.0f);
|
||||
legacy[SETTING_DENSITY_MULTIPLIER] = LLSDArray(legacyhaze[SETTING_DENSITY_MULTIPLIER].asReal())(0.0f)(0.0f)(1.0f);
|
||||
legacy[SETTING_DISTANCE_MULTIPLIER] = LLSDArray(legacyhaze[SETTING_DISTANCE_MULTIPLIER].asReal())(0.0f)(0.0f)(1.0f);
|
||||
|
||||
legacy[SETTING_HAZE_DENSITY] = LLSDArray(legacyhaze[SETTING_HAZE_DENSITY])(0.0f)(0.0f)(1.0f);
|
||||
legacy[SETTING_HAZE_HORIZON] = LLSDArray(legacyhaze[SETTING_HAZE_HORIZON])(0.0f)(0.0f)(1.0f);
|
||||
|
|
|
|||
|
|
@ -70,8 +70,6 @@
|
|||
#include "lllocalbitmaps.h"
|
||||
#include "llerror.h"
|
||||
|
||||
static const F32 CONTEXT_FADE_TIME = 0.08f;
|
||||
|
||||
static const S32 LOCAL_TRACKING_ID_COLUMN = 1;
|
||||
|
||||
//static const char CURRENT_IMAGE_NAME[] = "Current Texture";
|
||||
|
|
@ -408,59 +406,8 @@ BOOL LLFloaterTexturePicker::postBuild()
|
|||
// virtual
|
||||
void LLFloaterTexturePicker::draw()
|
||||
{
|
||||
if (mOwner)
|
||||
{
|
||||
// draw cone of context pointing back to texture swatch
|
||||
LLRect owner_rect;
|
||||
mOwner->localRectToOtherView(mOwner->getLocalRect(), &owner_rect, this);
|
||||
LLRect local_rect = getLocalRect();
|
||||
if (gFocusMgr.childHasKeyboardFocus(this) && mOwner->isInVisibleChain() && mContextConeOpacity > 0.001f)
|
||||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
LLGLEnable(GL_CULL_FACE);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
{
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(owner_rect.mLeft, owner_rect.mTop);
|
||||
gGL.vertex2i(owner_rect.mRight, owner_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(owner_rect.mLeft, owner_rect.mBottom);
|
||||
gGL.vertex2i(owner_rect.mLeft, owner_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(owner_rect.mRight, owner_rect.mTop);
|
||||
gGL.vertex2i(owner_rect.mRight, owner_rect.mBottom);
|
||||
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(owner_rect.mRight, owner_rect.mBottom);
|
||||
gGL.vertex2i(owner_rect.mLeft, owner_rect.mBottom);
|
||||
}
|
||||
gGL.end();
|
||||
}
|
||||
}
|
||||
|
||||
if (gFocusMgr.childHasMouseCapture(getDragHandle()))
|
||||
{
|
||||
mContextConeOpacity = lerp(mContextConeOpacity, gSavedSettings.getF32("PickerContextOpacity"), LLSmoothInterpolation::getInterpolant(CONTEXT_FADE_TIME));
|
||||
}
|
||||
else
|
||||
{
|
||||
mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLSmoothInterpolation::getInterpolant(CONTEXT_FADE_TIME));
|
||||
}
|
||||
static LLCachedControl<F32> max_opacity(gSavedSettings, "PickerContextOpacity", 0.4f);
|
||||
drawConeToOwner(mContextConeOpacity, max_opacity, mOwner);
|
||||
|
||||
updateImageStats();
|
||||
|
||||
|
|
|
|||
|
|
@ -207,10 +207,14 @@ void LLSkyTex::create(const F32 brightness)
|
|||
|
||||
void LLSkyTex::createGLImage(S32 which)
|
||||
{
|
||||
if (LLPipeline::RenderDeferred) {
|
||||
#if USE_SRGB_DECODE
|
||||
if (LLPipeline::RenderDeferred)
|
||||
{
|
||||
mTexture[which]->setExplicitFormat(GL_SRGB8_ALPHA8, GL_RGBA);
|
||||
}
|
||||
else {
|
||||
else
|
||||
#endif
|
||||
{
|
||||
mTexture[which]->setExplicitFormat(GL_RGBA8, GL_RGBA);
|
||||
}
|
||||
mTexture[which]->createGLTexture(0, mImageRaw[which], 0, TRUE, LLGLTexture::LOCAL);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -44,7 +44,7 @@
|
|||
width="250"
|
||||
name="settings_name"
|
||||
prevalidate_callback="ascii"
|
||||
max_length_chars="32"
|
||||
max_length_chars="63"
|
||||
height="20"/>
|
||||
<button
|
||||
height="23"
|
||||
|
|
|
|||
Loading…
Reference in New Issue