FIRE-33085 Add beacons for region corners
parent
46e1627e30
commit
541398de2f
|
|
@ -18420,6 +18420,17 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>fsregioncornerbeacons</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show beacons at region corners to help avoid region boundary disconnects</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>renderhighlights</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -11584,6 +11584,13 @@ class LLViewToggleBeacon : public view_listener_t
|
|||
LLPipeline::toggleRenderSoundBeacons();
|
||||
gSavedSettings.setBOOL( "soundsbeacon", LLPipeline::getRenderSoundBeacons() );
|
||||
}
|
||||
// <FS:PP> FIRE-33085 Region corner markers
|
||||
else if (beacon == "fsregioncornerbeacons")
|
||||
{
|
||||
LLPipeline::toggleRenderRegionCornerBeacons();
|
||||
gSavedSettings.setBOOL( "fsregioncornerbeacons", LLPipeline::getRenderRegionCornerBeacons() );
|
||||
}
|
||||
// </FS:PP>
|
||||
else if (beacon == "particlesbeacon")
|
||||
{
|
||||
LLPipeline::toggleRenderParticleBeacons();
|
||||
|
|
@ -11661,6 +11668,13 @@ class LLViewCheckBeaconEnabled : public view_listener_t
|
|||
new_value = gSavedSettings.getBOOL( "soundsbeacon");
|
||||
LLPipeline::setRenderSoundBeacons(new_value);
|
||||
}
|
||||
// <FS:PP> FIRE-33085 Region corner markers
|
||||
else if (beacon == "fsregioncornerbeacons")
|
||||
{
|
||||
new_value = gSavedSettings.getBOOL( "fsregioncornerbeacons");
|
||||
LLPipeline::setRenderRegionCornerBeacons(new_value);
|
||||
}
|
||||
// </FS:PP>
|
||||
else if (beacon == "particlesbeacon")
|
||||
{
|
||||
new_value = gSavedSettings.getBOOL( "particlesbeacon");
|
||||
|
|
|
|||
|
|
@ -491,6 +491,7 @@ public:
|
|||
static const std::string beacon_scripted = LLTrans::getString("BeaconScripted");
|
||||
static const std::string beacon_scripted_touch = LLTrans::getString("BeaconScriptedTouch");
|
||||
static const std::string beacon_sound = LLTrans::getString("BeaconSound");
|
||||
static const std::string beacon_region_corners = LLTrans::getString("BeaconRegionCorners"); // <FS:PP> FIRE-33085 Region corner markers
|
||||
static const std::string beacon_media = LLTrans::getString("BeaconMedia");
|
||||
static const std::string beacon_sun = LLTrans::getString("BeaconSun");
|
||||
static const std::string beacon_moon = LLTrans::getString("BeaconMoon");
|
||||
|
|
@ -920,6 +921,14 @@ public:
|
|||
ypos += y_inc;
|
||||
}
|
||||
|
||||
// <FS:PP> FIRE-33085 Region corner markers
|
||||
if (LLPipeline::getRenderRegionCornerBeacons())
|
||||
{
|
||||
addText(xpos, ypos, beacon_region_corners);
|
||||
ypos += y_inc;
|
||||
}
|
||||
// </FS:PP>
|
||||
|
||||
if (LLPipeline::getRenderScriptedBeacons())
|
||||
{
|
||||
addText(xpos, ypos, beacon_scripted);
|
||||
|
|
|
|||
|
|
@ -328,6 +328,7 @@ bool LLPipeline::sRenderScriptedBeacons = false;
|
|||
bool LLPipeline::sRenderScriptedTouchBeacons = true;
|
||||
bool LLPipeline::sRenderParticleBeacons = false;
|
||||
bool LLPipeline::sRenderSoundBeacons = false;
|
||||
bool LLPipeline::sRenderRegionCornerBeacons = false; // <FS:PP> FIRE-33085 Region corner markers
|
||||
bool LLPipeline::sRenderBeacons = false;
|
||||
bool LLPipeline::sRenderHighlight = true;
|
||||
LLRender::eTexIndex LLPipeline::sRenderHighlightTextureChannel = LLRender::DIFFUSE_MAP;
|
||||
|
|
@ -470,6 +471,7 @@ void LLPipeline::init()
|
|||
sRenderScriptedTouchBeacons = gSavedSettings.getBOOL("scripttouchbeacon");
|
||||
sRenderParticleBeacons = gSavedSettings.getBOOL("particlesbeacon");
|
||||
sRenderSoundBeacons = gSavedSettings.getBOOL("soundsbeacon");
|
||||
sRenderRegionCornerBeacons = gSavedSettings.getBOOL("fsregioncornerbeacons"); // <FS:PP> FIRE-33085 Region corner markers
|
||||
sRenderBeacons = gSavedSettings.getBOOL("renderbeacons");
|
||||
sRenderHighlight = gSavedSettings.getBOOL("renderhighlights");
|
||||
|
||||
|
|
@ -663,6 +665,9 @@ void LLPipeline::init()
|
|||
connectRefreshCachedSettingsSafe("FSFocusPointFollowsPointer");
|
||||
connectRefreshCachedSettingsSafe("FSFocusPointLocked");
|
||||
// </FS:Beq>
|
||||
// <FS:PP> FIRE-33085 Region corner markers
|
||||
connectRefreshCachedSettingsSafe("fsregioncornerbeacons");
|
||||
// </FS:PP>
|
||||
|
||||
LLPointer<LLControlVariable> cntrl_ptr = gSavedSettings.getControl("CollectFontVertexBuffers");
|
||||
if (cntrl_ptr.notNull())
|
||||
|
|
@ -1168,6 +1173,9 @@ void LLPipeline::refreshCachedSettings()
|
|||
LLPipeline::sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights");
|
||||
LLPipeline::sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles");
|
||||
// </FS:Ansariel>
|
||||
// <FS:PP> FIRE-33085 Region corner markers
|
||||
LLPipeline::sRenderRegionCornerBeacons = gSavedSettings.getBOOL("fsregioncornerbeacons");
|
||||
// </FS:PP>
|
||||
|
||||
LLPipeline::sUseOcclusion =
|
||||
(!gUseWireframe
|
||||
|
|
@ -3917,6 +3925,39 @@ void LLPipeline::postSort(LLCamera &camera)
|
|||
// now deal with highlights for all those seeable sound sources
|
||||
forAllVisibleDrawables(renderSoundHighlights);
|
||||
}
|
||||
|
||||
// <FS:PP> FIRE-33085 Region corner markers
|
||||
if (sRenderRegionCornerBeacons)
|
||||
{
|
||||
LLViewerRegion* region = gAgent.getRegion();
|
||||
if (!region)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLVector3 origin = region->getOriginAgent();
|
||||
F32 width = region->getWidth();
|
||||
|
||||
LLVector3 corner1 = origin; // Southwest
|
||||
LLVector3 corner2 = origin + LLVector3(width, 0, 0); // Southeast
|
||||
LLVector3 corner3 = origin + LLVector3(0, width, 0); // Northwest
|
||||
LLVector3 corner4 = origin + LLVector3(width, width, 0); // Northeast
|
||||
|
||||
corner1.mV[VZ] = region->getLandHeightRegion(LLVector3(0, 0, 0));
|
||||
corner2.mV[VZ] = region->getLandHeightRegion(LLVector3(width, 0, 0));
|
||||
corner3.mV[VZ] = region->getLandHeightRegion(LLVector3(0, width, 0));
|
||||
corner4.mV[VZ] = region->getLandHeightRegion(LLVector3(width, width, 0));
|
||||
|
||||
LLColor4 corner_color(1.0f, 1.0f, 0.0f, 0.8f);
|
||||
LLColor4 text_color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
|
||||
gObjectList.addDebugBeacon(corner1, "SW", corner_color, text_color, DebugBeaconLineWidth);
|
||||
gObjectList.addDebugBeacon(corner2, "SE", corner_color, text_color, DebugBeaconLineWidth);
|
||||
gObjectList.addDebugBeacon(corner3, "NW", corner_color, text_color, DebugBeaconLineWidth);
|
||||
gObjectList.addDebugBeacon(corner4, "NE", corner_color, text_color, DebugBeaconLineWidth);
|
||||
}
|
||||
// </FS:PP>
|
||||
|
||||
}
|
||||
}
|
||||
LL_PUSH_CALLSTACKS();
|
||||
|
|
@ -6709,6 +6750,23 @@ bool LLPipeline::getRenderHighlights()
|
|||
return sRenderHighlight;
|
||||
}
|
||||
|
||||
// <FS:PP> FIRE-33085 Region corner markers
|
||||
void LLPipeline::setRenderRegionCornerBeacons(bool val)
|
||||
{
|
||||
sRenderRegionCornerBeacons = val;
|
||||
}
|
||||
|
||||
void LLPipeline::toggleRenderRegionCornerBeacons()
|
||||
{
|
||||
sRenderRegionCornerBeacons = !sRenderRegionCornerBeacons;
|
||||
}
|
||||
|
||||
bool LLPipeline::getRenderRegionCornerBeacons()
|
||||
{
|
||||
return sRenderRegionCornerBeacons;
|
||||
}
|
||||
// </FS:PP>
|
||||
|
||||
// static
|
||||
void LLPipeline::setRenderHighlightTextureChannel(LLRender::eTexIndex channel)
|
||||
{
|
||||
|
|
@ -8821,12 +8879,12 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
|
|||
shader.uniform1f(LLShaderMgr::DEFERRED_BLUR_SIZE, RenderShadowBlurSize);
|
||||
|
||||
// <FS:WW> Compute scale factor to match AO appearance between view and snapshot.
|
||||
F32 screen_to_target_scale_factor = (F32)gViewerWindow->getWindowHeightRaw() / deferred_target->getHeight();
|
||||
//shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_RADIUS, RenderSSAOScale);
|
||||
shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_RADIUS, RenderSSAOScale / screen_to_target_scale_factor);
|
||||
//shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_MAX_RADIUS, (GLfloat)RenderSSAOMaxScale);
|
||||
shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_MAX_RADIUS, RenderSSAOMaxScale / screen_to_target_scale_factor);
|
||||
// </FS:WW>
|
||||
F32 screen_to_target_scale_factor = (F32)gViewerWindow->getWindowHeightRaw() / deferred_target->getHeight();
|
||||
//shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_RADIUS, RenderSSAOScale);
|
||||
shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_RADIUS, RenderSSAOScale / screen_to_target_scale_factor);
|
||||
//shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_MAX_RADIUS, (GLfloat)RenderSSAOMaxScale);
|
||||
shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_MAX_RADIUS, RenderSSAOMaxScale / screen_to_target_scale_factor);
|
||||
// </FS:WW>
|
||||
|
||||
F32 ssao_factor = RenderSSAOFactor;
|
||||
shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_FACTOR, ssao_factor);
|
||||
|
|
|
|||
|
|
@ -436,6 +436,12 @@ public:
|
|||
static void toggleRenderSoundBeacons();
|
||||
static bool getRenderSoundBeacons();
|
||||
|
||||
// <FS:PP> FIRE-33085 Region corner markers
|
||||
static void setRenderRegionCornerBeacons(bool val);
|
||||
static void toggleRenderRegionCornerBeacons();
|
||||
static bool getRenderRegionCornerBeacons();
|
||||
// </FS:PP>
|
||||
|
||||
static void setRenderMOAPBeacons(bool val);
|
||||
static void toggleRenderMOAPBeacons();
|
||||
static bool getRenderMOAPBeacons();
|
||||
|
|
@ -1023,6 +1029,7 @@ protected:
|
|||
static bool sRenderScriptedBeacons;
|
||||
static bool sRenderParticleBeacons;
|
||||
static bool sRenderSoundBeacons;
|
||||
static bool sRenderRegionCornerBeacons; // <FS:PP> FIRE-33085 Region corner markers
|
||||
public:
|
||||
static bool sRenderBeacons;
|
||||
static bool sRenderHighlight;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater
|
||||
legacy_header_height="18"
|
||||
height="332"
|
||||
height="363"
|
||||
layout="topleft"
|
||||
name="beacons"
|
||||
help_topic="beacons"
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
width="240">
|
||||
<panel
|
||||
follows="left|top|right|bottom"
|
||||
height="327"
|
||||
height="358"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="beacons_panel"
|
||||
|
|
@ -40,7 +40,25 @@
|
|||
parameter="lights"/>
|
||||
</check_box>
|
||||
<check_box
|
||||
control_name="fsregioncornerbeacons"
|
||||
top_pad="2"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
label="Region corners"
|
||||
name="fsregioncornerbeacons">
|
||||
<check_box.commit_callback
|
||||
function="Beacons.UICheck" />
|
||||
</check_box>
|
||||
<view_border
|
||||
bevel_style="in"
|
||||
height="0"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
name="cost_text_border"
|
||||
top_pad="5"
|
||||
width="220"/>
|
||||
<check_box
|
||||
top_pad="7"
|
||||
control_name="renderbeacons"
|
||||
height="16"
|
||||
width="100"
|
||||
|
|
|
|||
|
|
@ -2703,6 +2703,7 @@ Try enclosing path to the editor with double quotes.
|
|||
<string name="BeaconScripted">Viewing scripted object beacons (red)</string>
|
||||
<string name="BeaconScriptedTouch">Viewing scripted object with touch function beacons (red)</string>
|
||||
<string name="BeaconSound">Viewing sound beacons (yellow)</string>
|
||||
<string name="BeaconRegionCorners">Viewing region corners (yellow)</string>
|
||||
<string name="BeaconMedia">Viewing media beacons (white)</string>
|
||||
<string name="BeaconSun">Viewing sun direction beacon (orange)</string>
|
||||
<string name="BeaconMoon">Viewing moon direction beacon (purple)</string>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
Pokaż:
|
||||
</text>
|
||||
<check_box label="Bryły brzegowe świateł sceny" name="lights_bounding_boxes"/>
|
||||
<check_box label="Narożniki regionu" name="fsregioncornerbeacons" />
|
||||
<check_box label="Emitery" name="beacons"/>
|
||||
<check_box label="Podświetlenia" name="highlights"/>
|
||||
<check_box label="Pokazuj objaśnienia emiterów" name="FSRenderBeaconText"/>
|
||||
|
|
|
|||
|
|
@ -5329,6 +5329,9 @@ Spróbuj załączyć ścieżkę do edytora w cytowaniu.
|
|||
<string name="BeaconSound">
|
||||
Emitery dźwięków (żółty)
|
||||
</string>
|
||||
<string name="BeaconRegionCorners">
|
||||
Narożniki regionu (żółty)
|
||||
</string>
|
||||
<string name="BeaconMedia">
|
||||
Emitery mediów (biały)
|
||||
</string>
|
||||
|
|
|
|||
Loading…
Reference in New Issue