nvidia fix, soft shadows

This commit is contained in:
2023-02-13 18:35:25 +03:00
parent c8dcd5e9c0
commit 36540468dc
17 changed files with 358 additions and 107 deletions

View File

@@ -32,17 +32,19 @@ using namespace QGLEngineShaders;
QGLView::QGLView(): OpenGLWindow(), renderer_(this), mouse(this) {
setIcon(QIcon(":/icons/qglview.png"));
is_init = false;
timer = 0;
hoverHaloColor_ = QColor(195, 140, 255);
selectionHaloColor_ = QColor(175, 255, 140);
lineWidth_ = 1.;
max_anisotropic = 1;
max_texture_chanels = 8;
lightEnabled_ = true;
shaders_supported = false;
FXAA_ = false;
fps_cnt = 0;
is_init = false;
timer = 0;
hoverHaloColor_ = QColor(195, 140, 255);
selectionHaloColor_ = QColor(175, 255, 140);
lineWidth_ = 1.;
max_anisotropic = 1;
max_texture_chanels = 8;
lightEnabled_ = true;
shaders_supported = false;
FXAA_ = false;
fps_cnt = 0;
soft_shadows_samples = 16;
soft_shadows = false;
fps_tm = fps_ = 0.;
fogColor_ = Qt::darkGray;
fogDensity_ = 0.;
@@ -267,3 +269,24 @@ void QGLView::restoreCamera(const QByteArray & ba) {
camera()->setAngles(ang);
camera()->setFOV(fov);
}
void QGLView::setShadowMapSize(QSize sz) {
shadow_map_size = sz;
}
void QGLView::setTextureMapSize(QSize sz) {
renderer_.maps_size = sz;
renderer_.markReloadMaterials();
}
QSize QGLView::shadowMapSize() const {
return shadow_map_size;
}
QSize QGLView::textureMapSize() const {
return renderer_.maps_size;
}