summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTofu Buzzard <no-email>2011-03-01 14:47:46 -0800
committerTofu Buzzard <no-email>2011-03-01 14:47:46 -0800
commitb3a0dd4e164a8ab119bd01c9b4e5d91b04dfb985 (patch)
treedebfe4c894273cae38ccab7e94c14abe66d8adbe /indra
parent6fa702719c27c15e34942f76896e45c85f377937 (diff)
parente0099952942595f4ff90fd66cfeea570c17a81c5 (diff)
merge
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/app_settings/settings.xml12
-rw-r--r--indra/newview/llviewerwindow.cpp2
-rw-r--r--indra/newview/llvovolume.cpp7
-rwxr-xr-xindra/newview/pipeline.cpp43
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml16
5 files changed, 57 insertions, 23 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 6b49502619..05096fdec9 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1323,6 +1323,18 @@
<integer>0</integer>
</map>
+ <key>CameraFocusTransitionTime</key>
+ <map>
+ <key>Comment</key>
+ <string>How many seconds it takes the camera to transition between focal distances</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.5</real>
+ </map>
+
<key>CameraFNumber</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 94fb0b7d31..7aa90bd76d 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -3698,7 +3698,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de
{
found = gPipeline.lineSegmentIntersectInWorld(mouse_world_start, mouse_world_end, pick_transparent,
face_hit, intersection, uv, normal, binormal);
- if (found)
+ if (found && !pick_transparent)
{
gDebugRaycastIntersection = *intersection;
}
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index e3cc2f2589..132e50904a 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3365,8 +3365,15 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& e
end_face = face+1;
}
+ bool special_cursor = specialHoverCursor();
for (S32 i = start_face; i < end_face; ++i)
{
+ if (!special_cursor && !pick_transparent && getTE(i)->getColor().mV[3] == 0.f)
+ { //don't attempt to pick completely transparent faces unless
+ //pick_transparent is true
+ continue;
+ }
+
face_hit = volume->lineSegmentIntersect(v_start, v_end, i,
&p, &tc, &n, &bn);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index c280805516..b29e32f1d8 100755
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -6160,7 +6160,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
LLVertexBuffer::unbind();
- if (LLPipeline::sRenderDeferred)
+ if (LLPipeline::sRenderDeferred && !LLViewerCamera::getInstance()->cameraUnderWater())
{
LLGLSLShader* shader = &gDeferredPostProgram;
if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 2)
@@ -6173,26 +6173,39 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
//depth of field focal plane calculations
- F32 subject_distance = 16.f;
- if (LLViewerJoystick::getInstance()->getOverrideCamera())
- {
- //flycam mode, use mouse cursor as focus point
- LLVector3 eye = LLViewerCamera::getInstance()->getOrigin();
- subject_distance = (eye-gDebugRaycastIntersection).magVec();
+ static F32 current_distance = 16.f;
+ static F32 start_distance = 16.f;
+ static F32 transition_time = 1.f;
+
+ LLVector3 eye = LLViewerCamera::getInstance()->getOrigin();
+ F32 target_distance = LLViewerCamera::getInstance()->getAtAxis() * (gDebugRaycastIntersection-eye);
+
+ if (transition_time >= 1.f &&
+ fabsf(current_distance-target_distance)/current_distance > 0.01f)
+ { //large shift happened, interpolate smoothly to new target distance
+ llinfos << "start" << llendl;
+ transition_time = 0.f;
+ start_distance = current_distance;
}
- else
- {
- LLViewerObject* obj = gAgentCamera.getFocusObject();
- if (obj)
+ else if (transition_time < 1.f)
+ { //currently in a transition, continue interpolating
+ transition_time += 1.f/gSavedSettings.getF32("CameraFocusTransitionTime")*gFrameIntervalSeconds;
+ if (transition_time >= 1.f)
{
- LLVector3 focus = LLVector3(gAgentCamera.getFocusGlobal()-gAgent.getRegion()->getOriginGlobal());
- LLVector3 eye = LLViewerCamera::getInstance()->getOrigin();
- subject_distance = (focus-eye).magVec();
+ llinfos << "stop" << llendl;
}
+ transition_time = llmin(transition_time, 1.f);
+
+ F32 t = cosf(transition_time*F_PI+F_PI)*0.5f+0.5f;
+ current_distance = start_distance + (target_distance-start_distance)*t;
+ }
+ else
+ { //small or no change, just snap to target distance
+ current_distance = target_distance;
}
//convert to mm
- subject_distance *= 1000.f;
+ F32 subject_distance = current_distance*1000.f;
F32 fnumber = gSavedSettings.getF32("CameraFNumber");
const F32 default_focal_length = gSavedSettings.getF32("CameraFocalLength");
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 53cc808e70..0b241a9796 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -757,7 +757,7 @@
follows="left|top"
halign="right"
layout="topleft"
- right="-100"
+ right="-120"
name="linked_set_count"
top="144"
width="80">
@@ -772,7 +772,7 @@
halign="right"
layout="topleft"
top_delta="0"
- right="-10"
+ right="-8"
name="linked_set_cost"
tool_tip="Cost of currently selected linked sets as [prims],[physics complexity]"
width="80">
@@ -786,7 +786,7 @@
halign="right"
layout="topleft"
top_pad="5"
- right="-100"
+ right="-120"
name="object_count"
width="80">
Objects: [COUNT]
@@ -799,7 +799,7 @@
halign="right"
layout="topleft"
top_delta="0"
- right="-10"
+ right="-8"
name="object_cost"
tool_tip="Cost of currently selected objects as [prims] / [physics complexity]"
width="80">
@@ -843,7 +843,8 @@
tab_height="25"
top="173"
width="295">
- <panel
+
+<panel
border="false"
follows="all"
label="General"
@@ -1537,17 +1538,18 @@ even though the user gets a free copy.
layout="topleft"
left_delta="0"
name="label physicsshapetype"
- top_pad="10"
+ top_pad="50"
width="121">
Physics Shape Type:
</text>
<combo_box
height="23"
+ top_delta="-5"
layout="topleft"
follows="left|top"
name="Physics Shape Type Combo Ctrl"
tool_tip="Choose the physics shape type"
- left_pad="0"
+ left_pad="5"
width="108"/>
<spinner