Address Issue 1301: Depth of Field preferences
Thanks a lot to Niran for assistance in this. Tooltips are from Black Dragon's machinima panel. Note: Moves Depth of Field checkbox into the new Depth of Field tab.
This commit is contained in:
@@ -392,6 +392,13 @@ void LLPanelDisplay::refresh()
|
|||||||
childSetValue("fsaa", (LLSD::Integer) mFSAASamples);
|
childSetValue("fsaa", (LLSD::Integer) mFSAASamples);
|
||||||
childSetValue("vsync", (LLSD::Integer) mVsyncMode);
|
childSetValue("vsync", (LLSD::Integer) mVsyncMode);
|
||||||
|
|
||||||
|
// Depth of Field tab
|
||||||
|
mFNumber = gSavedSettings.getF32("CameraFNumber");
|
||||||
|
mFocalLength = gSavedSettings.getF32("CameraFocalLength");
|
||||||
|
mMaxCoF = gSavedSettings.getF32("CameraMaxCoF");
|
||||||
|
mFocusTrans = gSavedSettings.getF32("CameraFocusTransitionTime");
|
||||||
|
mDoFRes = gSavedSettings.getF32("CameraDoFResScale");
|
||||||
|
|
||||||
refreshEnabledState();
|
refreshEnabledState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -638,6 +645,13 @@ void LLPanelDisplay::cancel()
|
|||||||
gSavedSettings.setS32("TextureMemory", mVideoCardMem);
|
gSavedSettings.setS32("TextureMemory", mVideoCardMem);
|
||||||
gSavedSettings.setF32("RenderFogRatio", mFogRatio);
|
gSavedSettings.setF32("RenderFogRatio", mFogRatio);
|
||||||
gSavedSettings.setS32("SHRenderVsyncMode", mVsyncMode);
|
gSavedSettings.setS32("SHRenderVsyncMode", mVsyncMode);
|
||||||
|
|
||||||
|
// Depth of Field tab
|
||||||
|
gSavedSettings.setF32("CameraFNumber", mFNumber);
|
||||||
|
gSavedSettings.setF32("CameraFocalLength", mFocalLength);
|
||||||
|
gSavedSettings.setF32("CameraMaxCoF", mMaxCoF);
|
||||||
|
gSavedSettings.setF32("CameraFocusTransitionTime", mFocusTrans);
|
||||||
|
gSavedSettings.setF32("CameraDoFResScale", mDoFRes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLPanelDisplay::apply()
|
void LLPanelDisplay::apply()
|
||||||
|
|||||||
@@ -153,6 +153,13 @@ protected:
|
|||||||
F32 mFogRatio;
|
F32 mFogRatio;
|
||||||
S32 mVsyncMode;
|
S32 mVsyncMode;
|
||||||
|
|
||||||
|
// Depth of Field tab
|
||||||
|
F32 mFNumber;
|
||||||
|
F32 mFocalLength;
|
||||||
|
F32 mMaxCoF;
|
||||||
|
F32 mFocusTrans;
|
||||||
|
F32 mDoFRes;
|
||||||
|
|
||||||
// if the quality radio buttons are changed
|
// if the quality radio buttons are changed
|
||||||
void onChangeQuality(LLUICtrl* caller);
|
void onChangeQuality(LLUICtrl* caller);
|
||||||
|
|
||||||
|
|||||||
@@ -122,6 +122,14 @@ settings are unavailable (since useless)
|
|||||||
when the Atmospheric Shaders are enabled.
|
when the Atmospheric Shaders are enabled.
|
||||||
</text>
|
</text>
|
||||||
</panel>
|
</panel>
|
||||||
|
<panel border="true" bottom="-400" height="244" left="50" name="DoF" label="Depth of Field" width="500">
|
||||||
|
<check_box bottom="-22" left="5" follows="top|left" control_name="RenderDepthOfField" label="Enable Depth of Field" tool_tip="Toggles a camera like Depth of Field effect on or off, often used to blur out distance or things that shouldnt be in focus" name="RenderDepthOfField"/>
|
||||||
|
<slider bottom_delta="-18" left_delta="6" follows="top|left" height="16" width="298" control_name="CameraFNumber" can_edit_text="true" decimal_digits="1" increment="0.1" label_width="110" max_val="128" min_val="0.50" name="CameraFNum" label="F-Number:" tool_tip="Camera f-number value for Depth of Field effect"/>
|
||||||
|
<slider bottom_delta="-18" follows="top|left" height="16" width="298" control_name="CameraFocalLength" can_edit_text="true" decimal_digits="1" increment="0.1" label_width="110" max_val="300" min_val="0" name="CameraFocal" label="Focal Length(mm):" tool_tip="Camera focal length for Depth of Field effect (in millimeters)"/>
|
||||||
|
<slider bottom_delta="-18" follows="top|left" height="16" width="298" control_name="CameraMaxCoF" can_edit_text="true" decimal_digits="1" increment="0.1" label_width="110" max_val="100" min_val="0" name="CameraCoF" label="Circle of Confusion:" tool_tip="Set the Camera circle of confusion"/>
|
||||||
|
<slider bottom_delta="-18" follows="top|left" height="16" width="298" control_name="CameraFocusTransitionTime" can_edit_text="true" decimal_digits="2" increment="0.01" label_width="110" max_val="20" min_val="0.01" name="CameraFocusTrans" label="Transition Time(secs):" tool_tip="Time taken to alter focus from one place to the next"/>
|
||||||
|
<slider bottom_delta="-18" follows="top|left" height="16" width="298" control_name="CameraDoFResScale" can_edit_text="true" decimal_digits="2" increment="0.01" label_width="110" val_width="35" max_val="1" min_val="0.25" name="CameraDoFRes" label="Resolution:" tool_tip="Set the Resolution (Quality) of each DoF pixel"/>
|
||||||
|
</panel>
|
||||||
</tab_container>
|
</tab_container>
|
||||||
<string name="resolution_format">[RES_X] x [RES_Y]</string>
|
<string name="resolution_format">[RES_X] x [RES_Y]</string>
|
||||||
<string name="aspect_ratio_text">[NUM]:[DEN]</string>
|
<string name="aspect_ratio_text">[NUM]:[DEN]</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user