| 125 | } |
| 126 | |
| 127 | void DLSSPass::renderUI(Gui::Widgets& widget) |
| 128 | { |
| 129 | widget.checkbox("Enable", mEnabled); |
| 130 | |
| 131 | // Controls for output size. |
| 132 | // When output size requirements change, we'll trigger a graph recompile to update the render pass I/O sizes. |
| 133 | if (widget.dropdown("Output size", mOutputSizeSelection)) |
| 134 | requestRecompile(); |
| 135 | widget.tooltip( |
| 136 | "Specifies the pass output size.\n" |
| 137 | "'Default' means that the output is sized based on requirements of connected passes.\n" |
| 138 | "'Fixed' means the output is fixed to the optimal size determined by DLSS.\n" |
| 139 | "If the output is of a different size than the DLSS output resolution, the image will be rescaled bilinearly.", |
| 140 | true |
| 141 | ); |
| 142 | |
| 143 | if (mEnabled) |
| 144 | { |
| 145 | mRecreate |= widget.dropdown("Profile", mProfile); |
| 146 | |
| 147 | widget.dropdown("Motion vector scale", mMotionVectorScale); |
| 148 | widget.tooltip( |
| 149 | "Absolute: Motion vectors are provided in absolute screen space length (pixels)\n" |
| 150 | "Relative: Motion vectors are provided in relative screen space length (pixels divided by screen width/height)." |
| 151 | ); |
| 152 | |
| 153 | mRecreate |= widget.checkbox("HDR", mIsHDR); |
| 154 | widget.tooltip("Enable if input color is HDR."); |
| 155 | |
| 156 | widget.slider("Sharpness", mSharpness, -1.f, 1.f); |
| 157 | widget.tooltip("Sharpening value between 0.0 and 1.0."); |
| 158 | |
| 159 | if (widget.var("Exposure", mExposure, -10.f, 10.f, 0.01f)) |
| 160 | mExposureUpdated = true; |
| 161 | |
| 162 | widget.text("Input resolution: " + std::to_string(mInputSize.x) + "x" + std::to_string(mInputSize.y)); |
| 163 | widget.text("DLSS output resolution: " + std::to_string(mDLSSOutputSize.x) + "x" + std::to_string(mDLSSOutputSize.y)); |
| 164 | widget.text("Pass output resolution: " + std::to_string(mPassOutputSize.x) + "x" + std::to_string(mPassOutputSize.y)); |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | void DLSSPass::initializeDLSS(RenderContext* pRenderContext) |
| 169 | { |