Super-sampling only to be done when taking a snapshot to disk in high-res mode. Clamping to 3x.
Removed 'SHHighResSnapshotForceTile' setting, as tiling is now the only way snapshots can be done.
This commit is contained in:
@@ -68,17 +68,6 @@
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<real>2.0</real>
|
<real>2.0</real>
|
||||||
</map>
|
</map>
|
||||||
<key>SHHighResSnapshotForceTile</key>
|
|
||||||
<map>
|
|
||||||
<key>Comment</key>
|
|
||||||
<string>Force tiling of snapshots (enables AA and supersampling)</string>
|
|
||||||
<key>Persist</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
<key>Type</key>
|
|
||||||
<string>Boolean</string>
|
|
||||||
<key>Value</key>
|
|
||||||
<integer>0</integer>
|
|
||||||
</map>
|
|
||||||
<key>SHHighResSnapshotSuperSample</key>
|
<key>SHHighResSnapshotSuperSample</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|||||||
@@ -569,12 +569,15 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
|
|||||||
S32 width = gViewerWindow->getWindowDisplayWidth();
|
S32 width = gViewerWindow->getWindowDisplayWidth();
|
||||||
S32 height = gViewerWindow->getWindowDisplayHeight();
|
S32 height = gViewerWindow->getWindowDisplayHeight();
|
||||||
|
|
||||||
|
F32 supersample = 1.f;
|
||||||
if (gSavedSettings.getBOOL("HighResSnapshot"))
|
if (gSavedSettings.getBOOL("HighResSnapshot"))
|
||||||
{
|
{
|
||||||
#if 1//SHY_MOD // screenshot improvement
|
#if 1//SHY_MOD // screenshot improvement
|
||||||
const F32 mult = gSavedSettings.getF32("SHHighResSnapshotScale");
|
const F32 mult = gSavedSettings.getF32("SHHighResSnapshotScale");
|
||||||
width *= mult;
|
width *= mult;
|
||||||
height *= mult;
|
height *= mult;
|
||||||
|
static const LLCachedControl<F32> super_sample_scale("SHHighResSnapshotSuperSample",1.f);
|
||||||
|
supersample = super_sample_scale;
|
||||||
#else //shy_mod
|
#else //shy_mod
|
||||||
width *= 2;
|
width *= 2;
|
||||||
height *= 2;
|
height *= 2;
|
||||||
@@ -587,7 +590,10 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
|
|||||||
TRUE,
|
TRUE,
|
||||||
FALSE,
|
FALSE,
|
||||||
gSavedSettings.getBOOL("RenderUIInSnapshot"),
|
gSavedSettings.getBOOL("RenderUIInSnapshot"),
|
||||||
FALSE))
|
FALSE,
|
||||||
|
LLViewerWindow::SNAPSHOT_TYPE_COLOR,
|
||||||
|
6144,
|
||||||
|
supersample))
|
||||||
{
|
{
|
||||||
gViewerWindow->playSnapshotAnimAndSound();
|
gViewerWindow->playSnapshotAnimAndSound();
|
||||||
|
|
||||||
|
|||||||
@@ -4259,7 +4259,7 @@ BOOL LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 p
|
|||||||
|
|
||||||
// Saves the image from the screen to the specified filename and path.
|
// Saves the image from the screen to the specified filename and path.
|
||||||
BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height,
|
BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height,
|
||||||
BOOL keep_window_aspect, BOOL is_texture, BOOL show_ui, BOOL do_rebuild, ESnapshotType type, S32 max_size)
|
BOOL keep_window_aspect, BOOL is_texture, BOOL show_ui, BOOL do_rebuild, ESnapshotType type, S32 max_size, F32 supersample)
|
||||||
{
|
{
|
||||||
if (!raw)
|
if (!raw)
|
||||||
{
|
{
|
||||||
@@ -4308,12 +4308,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
|
|||||||
static const LLCachedControl<bool> force_tile("SHHighResSnapshotForceTile",false);*/
|
static const LLCachedControl<bool> force_tile("SHHighResSnapshotForceTile",false);*/
|
||||||
|
|
||||||
#if 1//SHY_MOD // screenshot improvement
|
#if 1//SHY_MOD // screenshot improvement
|
||||||
F32 internal_scale = 1.f;
|
F32 internal_scale = llmin(llmax(supersample,1.f),3.f);
|
||||||
//if(force_tile)
|
|
||||||
{
|
|
||||||
static const LLCachedControl<F32> super_sample_scale("SHHighResSnapshotSuperSample",1.f);
|
|
||||||
internal_scale = llmax(super_sample_scale.get(),1.f);
|
|
||||||
}
|
|
||||||
// render at specified internal resolution. >1 results in supersampling.
|
// render at specified internal resolution. >1 results in supersampling.
|
||||||
image_height *= internal_scale;
|
image_height *= internal_scale;
|
||||||
image_width *= internal_scale;
|
image_width *= internal_scale;
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ public:
|
|||||||
} ESnapshotType;
|
} ESnapshotType;
|
||||||
BOOL saveSnapshot(const std::string& filename, S32 image_width, S32 image_height, BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, ESnapshotType type = SNAPSHOT_TYPE_COLOR);
|
BOOL saveSnapshot(const std::string& filename, S32 image_width, S32 image_height, BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, ESnapshotType type = SNAPSHOT_TYPE_COLOR);
|
||||||
BOOL rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, BOOL keep_window_aspect = TRUE, BOOL is_texture = FALSE,
|
BOOL rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, BOOL keep_window_aspect = TRUE, BOOL is_texture = FALSE,
|
||||||
BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, ESnapshotType type = SNAPSHOT_TYPE_COLOR, S32 max_size = MAX_SNAPSHOT_IMAGE_SIZE );
|
BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, ESnapshotType type = SNAPSHOT_TYPE_COLOR, S32 max_size = MAX_SNAPSHOT_IMAGE_SIZE, F32 supersample = 1.f );
|
||||||
BOOL thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL do_rebuild, ESnapshotType type) ;
|
BOOL thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL do_rebuild, ESnapshotType type) ;
|
||||||
BOOL isSnapshotLocSet() const { return ! sSnapshotDir.empty(); }
|
BOOL isSnapshotLocSet() const { return ! sSnapshotDir.empty(); }
|
||||||
void resetSnapshotLoc() const { sSnapshotDir.clear(); }
|
void resetSnapshotLoc() const { sSnapshotDir.clear(); }
|
||||||
|
|||||||
Reference in New Issue
Block a user