soft shadows fixes

This commit is contained in:
2023-02-23 11:03:20 +03:00
parent 52e9b19f37
commit 51562dec9d
7 changed files with 78 additions and 41 deletions

View File

@@ -66,6 +66,7 @@ void ViewEditor::assignQGLView(QGLView * v) {
ui->spinFogDensity->setValue(view->fogDensity());
ui->checkSoftShadows->setChecked(view->softShadows());
ui->spinSoftShadowSamples->setValue(view->softShadowsSamples());
ui->spinSoftShadowQuality->setValue(view->softShadowsQuality());
auto setMapSize = [](QComboBox * combo, QSize sz) {
for (int i = 0; i < combo->count(); ++i) {
if (combo->itemData(i).toSize() == sz) {
@@ -247,6 +248,12 @@ void ViewEditor::on_spinSoftShadowSamples_valueChanged(double arg1) {
}
void ViewEditor::on_spinSoftShadowQuality_valueChanged(double arg1) {
if (!view || !active) return;
view->setSoftShadowsQuality(arg1);
}
void ViewEditor::on_checkVSync_clicked(bool val) {
if (!view || !active) return;
view->setVSync(val);