QtCraft API C++ classes QML types Handbook

QcRenderOptions Struct

How the world is drawn (decision E-899): the classic look or the realistic render mode (stage 45) with its quality and exposure. More...

Header: #include <clientcore/settings/QcRenderOptions.h>

Public Types

struct Materials
struct Shadows
struct Water
enum class Mode { Classic, Realistic }
enum class Quality { Low, Medium, High }

Public Functions

int bloomLevels() const
QcRenderOptions::Materials materials() const
int movingLights() const
int occlusionSamples() const
bool realistic() const
void save(QSettings &file) const
QcRenderOptions::Shadows shadows() const
QcRenderOptions::Water water() const

Public Variables

double exposure
QcRenderOptions::Mode mode
QcRenderOptions::Quality quality

Static Public Members

const double defaultExposure
const int highBloomLevels
const int highOcclusionSamples
bool isExposure(double exposure)
QcRenderOptions load(const QSettings &file)
const int lowMovingLights
const double maxExposure
const int maxMovingLights
const int maxShadowCascades
const int mediumBloomLevels
const int mediumMovingLights
const int mediumOcclusionSamples
const double minExposure
std::optional<QcRenderOptions::Mode> modeFromName(const QString &name)
QString modeName(QcRenderOptions::Mode mode)
std::optional<QcRenderOptions::Quality> qualityFromName(const QString &name)
QString qualityName(QcRenderOptions::Quality quality)

Detailed Description

Stored in settings.ini as render/<key>; a value that makes no sense gives the default.

Member Type Documentation

enum class QcRenderOptions::Mode

Classic: the picture of the game as it always was, straight into the window.

Realistic: the world into an HDR picture first, with height fog, bloom and tonemapping on the way to the window.

ConstantValueDescription
QcRenderOptions::Mode::Classic0the classic look
QcRenderOptions::Mode::Realistic1the realistic render mode

enum class QcRenderOptions::Quality

What the realistic mode spends on effects: Low without bloom and ambient occlusion and with the fewest moving lights, Medium with a bloom of mediumBloomLevels, ambient occlusion of mediumOcclusionSamples and mediumMovingLights, High with the wider bloom, more samples and lights; later stages add their effects by quality.

ConstantValueDescription
QcRenderOptions::Quality::Low0no bloom and ambient occlusion, the fewest moving lights
QcRenderOptions::Quality::Medium1the default
QcRenderOptions::Quality::High2the most of every effect

Member Function Documentation

int QcRenderOptions::bloomLevels() const

Returns the halvings of the bloom chain, 0 for none (the classic mode and quality Low).

[static] bool QcRenderOptions::isExposure(double exposure)

Returns whether exposure is a finite value in [minExposure, maxExposure].

[static] QcRenderOptions QcRenderOptions::load(const QSettings &file)

Returns the options stored in file; defaults for missing values or values that make no sense.

QcRenderOptions::Materials QcRenderOptions::materials() const

Returns the material maps of the quality (Medium the maps, High also the moving lights' highlights); none in the classic mode and on Low.

[static] std::optional<QcRenderOptions::Mode> QcRenderOptions::modeFromName(const QString &name)

Returns the mode named name (modeName()); nothing for an unknown name.

[static] QString QcRenderOptions::modeName(QcRenderOptions::Mode mode)

Returns the name of mode in settings.ini: "classic" or "realistic".

int QcRenderOptions::movingLights() const

Returns the most moving lights drawn, 0 in the classic mode (decision E-902).

int QcRenderOptions::occlusionSamples() const

Returns the samples per pixel of the ambient occlusion, 0 for none (the classic mode and quality Low).

[static] std::optional<QcRenderOptions::Quality> QcRenderOptions::qualityFromName(const QString &name)

Returns the quality named name (qualityName()); nothing for an unknown name.

[static] QString QcRenderOptions::qualityName(QcRenderOptions::Quality quality)

Returns the name of quality in settings.ini: "low", "medium" or "high".

bool QcRenderOptions::realistic() const

Returns whether the realistic render mode is chosen.

void QcRenderOptions::save(QSettings &file) const

Stores the options in file.

QcRenderOptions::Shadows QcRenderOptions::shadows() const

Returns the sun's shadows of the quality (Low one small cascade, Medium two, High three and the widest filter); no cascades in the classic mode.

QcRenderOptions::Water QcRenderOptions::water() const

Returns the water of the quality (Low waves, Fresnel, sky and sun; Medium also refraction and caustics; High also screen-space reflections); nothing in the classic mode.

Member Variable Documentation

const double QcRenderOptions::defaultExposure

The exposure of a new setting: the classic brightness.

double QcRenderOptions::exposure

Brightness of the realistic mode before tonemapping (1: the classic brightness of the mid tones).

const int QcRenderOptions::highBloomLevels

Halvings of the bloom chain on quality High.

const int QcRenderOptions::highOcclusionSamples

Samples per pixel of the ambient occlusion on quality High.

const double QcRenderOptions::maxExposure

Brightest exposure that can be set.

const int QcRenderOptions::maxShadowCascades

Most cascades of the sun's shadow map (quality High).

const int QcRenderOptions::mediumBloomLevels

Halvings of the bloom chain on quality Medium.

const int QcRenderOptions::mediumOcclusionSamples

Samples per pixel of the screen-space ambient occlusion (decision E-902).

const double QcRenderOptions::minExposure

Darkest exposure that can be set.

QcRenderOptions::Mode QcRenderOptions::mode

The classic look or the realistic render mode.

QcRenderOptions::Quality QcRenderOptions::quality

What the realistic mode spends on effects.