diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h index 356b075026..6df0252456 100644 --- a/indra/llrender/llshadermgr.h +++ b/indra/llrender/llshadermgr.h @@ -359,6 +359,7 @@ public: SNAPSHOT_BORDER_THICKNESS, // "border_thickness" SNAPSHOT_GUIDE_COLOR, // "guide_color" SNAPSHOT_GUIDE_THICKNESS, // "guide_thickness" + SNAPSHOT_GUIDE_VISIBILITY, // "guide_visibility" SNAPSHOT_GUIDE_STYLE, // "guide_style" SNAPSHOT_FRAME_RECT, // "frame_rect" // diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index fb62a961f3..dd300a1026 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -26650,6 +26650,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1.0 + FSSnapshotFrameGuideVisibility + + Comment + The visibility/opacity of the composition guides (0.0 = invisible, 1.0 = fully visible) + Persist + 1 + Type + F32 + Value + 0.05 + FSManipRotateJointUseNaturalDirection Comment diff --git a/indra/newview/app_settings/shaders/class1/post/snapshotFrameF.glsl b/indra/newview/app_settings/shaders/class1/post/snapshotFrameF.glsl index 36647eb96b..532348d42f 100644 --- a/indra/newview/app_settings/shaders/class1/post/snapshotFrameF.glsl +++ b/indra/newview/app_settings/shaders/class1/post/snapshotFrameF.glsl @@ -7,6 +7,7 @@ uniform vec3 border_color; uniform float border_thickness; // in pixels uniform vec3 guide_color; uniform float guide_thickness; // in pixels +uniform float guide_visibility; // visibility/opacity of guides (0.0 - 1.0) uniform float guide_style; // 0: no guide, 1: rule of thirds, 2: golden spiral in vec2 vary_fragcoord; @@ -68,7 +69,7 @@ void main() (tc.y > frame_rect_px.y + third_y - guide_thickness && tc.y < frame_rect_px.y + third_y + guide_thickness) || (tc.y > frame_rect_px.y + 2.0 * third_y - guide_thickness && tc.y < frame_rect_px.y + 2.0 * third_y + guide_thickness)) { - diff.rgb = mix(diff.rgb, guide_color, 0.5); + diff.rgb = mix(diff.rgb, guide_color, guide_visibility); } } } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 30f591a5aa..988f9fd0ef 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -8101,6 +8101,7 @@ bool LLPipeline::renderSnapshotFrame(LLRenderTarget* src, LLRenderTarget* dst) static LLCachedControl guide_color(gSavedSettings, "FSSnapshotFrameGuideColor", LLColor3(1.f, 1.f, 0.f)); static LLCachedControl border_thickness(gSavedSettings, "FSSnapshotFrameBorderWidth", 2.0f); static LLCachedControl guide_thickness(gSavedSettings, "FSSnapshotFrameGuideWidth", 2.0f); + static LLCachedControl guide_visibility(gSavedSettings, "FSSnapshotFrameGuideVisibility", 0.05f); F32 guide_style = 1.f; // 0:off, 1:rule_of_thirds, others maybe in the future if (!show_guides) @@ -8228,6 +8229,9 @@ bool LLPipeline::renderSnapshotFrame(LLRenderTarget* src, LLRenderTarget* dst) shader->uniform1f( LLShaderMgr::SNAPSHOT_GUIDE_THICKNESS, (GLfloat)guide_thickness); + shader->uniform1f( + LLShaderMgr::SNAPSHOT_GUIDE_VISIBILITY, + (GLfloat)guide_visibility); shader->uniform1f( LLShaderMgr::SNAPSHOT_GUIDE_STYLE, (GLfloat)guide_style);