mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Remove "Enable noise" oprion. Emulation of noise is always enabled.
This commit is contained in:
parent
41ecf66e80
commit
2600a6bc90
|
@ -38,7 +38,6 @@ void Config::resetToDefaults()
|
||||||
texture.screenShotFormat = 0;
|
texture.screenShotFormat = 0;
|
||||||
|
|
||||||
generalEmulation.enableLOD = 1;
|
generalEmulation.enableLOD = 1;
|
||||||
generalEmulation.enableNoise = 1;
|
|
||||||
generalEmulation.ditheringMode = DitheringMode::dmNoise;
|
generalEmulation.ditheringMode = DitheringMode::dmNoise;
|
||||||
generalEmulation.bufferDitheringMode = BufferDitheringMode::bdmBlueNoise;
|
generalEmulation.bufferDitheringMode = BufferDitheringMode::bdmBlueNoise;
|
||||||
generalEmulation.enableHWLighting = 0;
|
generalEmulation.enableHWLighting = 0;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "Types.h"
|
#include "Types.h"
|
||||||
|
|
||||||
#define CONFIG_WITH_PROFILES 23U
|
#define CONFIG_WITH_PROFILES 23U
|
||||||
#define CONFIG_VERSION_CURRENT 28U
|
#define CONFIG_VERSION_CURRENT 29U
|
||||||
|
|
||||||
#define BILINEAR_3POINT 0
|
#define BILINEAR_3POINT 0
|
||||||
#define BILINEAR_STANDARD 1
|
#define BILINEAR_STANDARD 1
|
||||||
|
@ -62,7 +62,6 @@ struct Config
|
||||||
};
|
};
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
u32 enableNoise;
|
|
||||||
u32 ditheringMode;
|
u32 ditheringMode;
|
||||||
u32 bufferDitheringMode;
|
u32 bufferDitheringMode;
|
||||||
u32 enableLOD;
|
u32 enableLOD;
|
||||||
|
|
|
@ -155,7 +155,6 @@ void ConfigDialog::_init(bool reInit, bool blockCustomSettings)
|
||||||
|
|
||||||
// Emulation settings
|
// Emulation settings
|
||||||
ui->emulateLodCheckBox->setChecked(config.generalEmulation.enableLOD != 0);
|
ui->emulateLodCheckBox->setChecked(config.generalEmulation.enableLOD != 0);
|
||||||
ui->emulateNoiseCheckBox->setChecked(config.generalEmulation.enableNoise != 0);
|
|
||||||
ui->enableHWLightingCheckBox->setChecked(config.generalEmulation.enableHWLighting != 0);
|
ui->enableHWLightingCheckBox->setChecked(config.generalEmulation.enableHWLighting != 0);
|
||||||
ui->enableShadersStorageCheckBox->setChecked(config.generalEmulation.enableShadersStorage != 0);
|
ui->enableShadersStorageCheckBox->setChecked(config.generalEmulation.enableShadersStorage != 0);
|
||||||
if (!blockCustomSettings)
|
if (!blockCustomSettings)
|
||||||
|
@ -466,7 +465,6 @@ void ConfigDialog::accept(bool justSave) {
|
||||||
|
|
||||||
// Emulation settings
|
// Emulation settings
|
||||||
config.generalEmulation.enableLOD = ui->emulateLodCheckBox->isChecked() ? 1 : 0;
|
config.generalEmulation.enableLOD = ui->emulateLodCheckBox->isChecked() ? 1 : 0;
|
||||||
config.generalEmulation.enableNoise = ui->emulateNoiseCheckBox->isChecked() ? 1 : 0;
|
|
||||||
config.generalEmulation.enableHWLighting = ui->enableHWLightingCheckBox->isChecked() ? 1 : 0;
|
config.generalEmulation.enableHWLighting = ui->enableHWLightingCheckBox->isChecked() ? 1 : 0;
|
||||||
config.generalEmulation.enableShadersStorage = ui->enableShadersStorageCheckBox->isChecked() ? 1 : 0;
|
config.generalEmulation.enableShadersStorage = ui->enableShadersStorageCheckBox->isChecked() ? 1 : 0;
|
||||||
config.generalEmulation.enableCustomSettings = ui->customSettingsCheckBox->isChecked() ? 1 : 0;
|
config.generalEmulation.enableCustomSettings = ui->customSettingsCheckBox->isChecked() ? 1 : 0;
|
||||||
|
|
|
@ -40,7 +40,6 @@ void _loadSettings(QSettings & settings)
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
settings.beginGroup("generalEmulation");
|
settings.beginGroup("generalEmulation");
|
||||||
config.generalEmulation.enableNoise = settings.value("enableNoise", config.generalEmulation.enableNoise).toInt();
|
|
||||||
config.generalEmulation.ditheringMode = settings.value("ditheringMode", config.generalEmulation.ditheringMode).toInt();
|
config.generalEmulation.ditheringMode = settings.value("ditheringMode", config.generalEmulation.ditheringMode).toInt();
|
||||||
config.generalEmulation.enableLOD = settings.value("enableLOD", config.generalEmulation.enableLOD).toInt();
|
config.generalEmulation.enableLOD = settings.value("enableLOD", config.generalEmulation.enableLOD).toInt();
|
||||||
config.generalEmulation.enableHWLighting = settings.value("enableHWLighting", config.generalEmulation.enableHWLighting).toInt();
|
config.generalEmulation.enableHWLighting = settings.value("enableHWLighting", config.generalEmulation.enableHWLighting).toInt();
|
||||||
|
@ -213,7 +212,6 @@ void writeSettings(const QString & _strIniFolder)
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
settings.beginGroup("generalEmulation");
|
settings.beginGroup("generalEmulation");
|
||||||
settings.setValue("enableNoise", config.generalEmulation.enableNoise);
|
|
||||||
settings.setValue("ditheringMode", config.generalEmulation.ditheringMode);
|
settings.setValue("ditheringMode", config.generalEmulation.ditheringMode);
|
||||||
settings.setValue("enableLOD", config.generalEmulation.enableLOD);
|
settings.setValue("enableLOD", config.generalEmulation.enableLOD);
|
||||||
settings.setValue("enableHWLighting", config.generalEmulation.enableHWLighting);
|
settings.setValue("enableHWLighting", config.generalEmulation.enableHWLighting);
|
||||||
|
@ -404,7 +402,6 @@ void saveCustomRomSettings(const QString & _strIniFolder, const char * _strRomNa
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
settings.beginGroup("generalEmulation");
|
settings.beginGroup("generalEmulation");
|
||||||
WriteCustomSetting(generalEmulation, enableNoise);
|
|
||||||
WriteCustomSetting(generalEmulation, ditheringMode);
|
WriteCustomSetting(generalEmulation, ditheringMode);
|
||||||
WriteCustomSetting(generalEmulation, enableLOD);
|
WriteCustomSetting(generalEmulation, enableLOD);
|
||||||
WriteCustomSetting(generalEmulation, enableHWLighting);
|
WriteCustomSetting(generalEmulation, enableHWLighting);
|
||||||
|
|
|
@ -1196,19 +1196,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="emulateNoiseCheckBox">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>This option emulates effects that use random color input. Checking this option may cause rare performance problems.</p><p>[Recommended: <span style=" font-style:italic;">Checked</span>]</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable noise</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="enableHWLightingCheckBox">
|
<widget class="QCheckBox" name="enableHWLightingCheckBox">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
|
|
@ -12,7 +12,6 @@ namespace graphics {
|
||||||
vecOptions.push_back(config.texture.bilinearMode);
|
vecOptions.push_back(config.texture.bilinearMode);
|
||||||
vecOptions.push_back(config.texture.enableHalosRemoval);
|
vecOptions.push_back(config.texture.enableHalosRemoval);
|
||||||
vecOptions.push_back(config.generalEmulation.enableHWLighting);
|
vecOptions.push_back(config.generalEmulation.enableHWLighting);
|
||||||
vecOptions.push_back(config.generalEmulation.enableNoise);
|
|
||||||
vecOptions.push_back(config.generalEmulation.ditheringMode == Config::DitheringMode::dmNoise ? 1 : 0);
|
vecOptions.push_back(config.generalEmulation.ditheringMode == Config::DitheringMode::dmNoise ? 1 : 0);
|
||||||
vecOptions.push_back(config.generalEmulation.ditheringMode == Config::DitheringMode::dmNoiseWithQuant ? 1 : 0);
|
vecOptions.push_back(config.generalEmulation.ditheringMode == Config::DitheringMode::dmNoiseWithQuant ? 1 : 0);
|
||||||
vecOptions.push_back(config.generalEmulation.ditheringMode == Config::DitheringMode::dmFull ? 1 : 0);
|
vecOptions.push_back(config.generalEmulation.ditheringMode == Config::DitheringMode::dmFull ? 1 : 0);
|
||||||
|
|
|
@ -1623,40 +1623,25 @@ class ShaderNoise : public ShaderPart
|
||||||
public:
|
public:
|
||||||
ShaderNoise(const opengl::GLInfo & _glinfo)
|
ShaderNoise(const opengl::GLInfo & _glinfo)
|
||||||
{
|
{
|
||||||
if (config.generalEmulation.enableNoise == 0) {
|
if (_glinfo.isGLES2) {
|
||||||
// Dummy noise
|
|
||||||
m_part =
|
m_part =
|
||||||
"lowp float snoise() \n"
|
"uniform sampler2D uTexNoise; \n"
|
||||||
"{ \n"
|
"lowp float snoise() \n"
|
||||||
" return 0.5; \n"
|
"{ \n"
|
||||||
"} \n"
|
" mediump vec2 texSize = vec2(640.0, 580.0); \n"
|
||||||
|
" mediump vec2 coord = gl_FragCoord.xy/uScreenScale/texSize; \n"
|
||||||
|
" return texture2D(uTexNoise, coord).r; \n"
|
||||||
|
"} \n"
|
||||||
;
|
;
|
||||||
if (config.generalEmulation.ditheringMode != Config::DitheringMode::dmDisable) {
|
|
||||||
m_part +=
|
|
||||||
"uniform sampler2D uTexNoise; \n"
|
|
||||||
;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (_glinfo.isGLES2) {
|
m_part =
|
||||||
m_part =
|
"uniform sampler2D uTexNoise; \n"
|
||||||
"uniform sampler2D uTexNoise; \n"
|
"lowp float snoise() \n"
|
||||||
"lowp float snoise() \n"
|
"{ \n"
|
||||||
"{ \n"
|
" ivec2 coord = ivec2(gl_FragCoord.xy/uScreenScale); \n"
|
||||||
" mediump vec2 texSize = vec2(640.0, 580.0); \n"
|
" return texelFetch(uTexNoise, coord, 0).r; \n"
|
||||||
" mediump vec2 coord = gl_FragCoord.xy/uScreenScale/texSize; \n"
|
"} \n"
|
||||||
" return texture2D(uTexNoise, coord).r; \n"
|
|
||||||
"} \n"
|
|
||||||
;
|
;
|
||||||
} else {
|
|
||||||
m_part =
|
|
||||||
"uniform sampler2D uTexNoise; \n"
|
|
||||||
"lowp float snoise() \n"
|
|
||||||
"{ \n"
|
|
||||||
" ivec2 coord = ivec2(gl_FragCoord.xy/uScreenScale); \n"
|
|
||||||
" return texelFetch(uTexNoise, coord, 0).r; \n"
|
|
||||||
"} \n"
|
|
||||||
;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1042,10 +1042,7 @@ void CombinerProgramUniformFactory::buildUniforms(GLuint _program,
|
||||||
const CombinerKey & _key,
|
const CombinerKey & _key,
|
||||||
UniformGroups & _uniforms)
|
UniformGroups & _uniforms)
|
||||||
{
|
{
|
||||||
if (config.generalEmulation.enableNoise != 0 ||
|
_uniforms.emplace_back(new UNoiseTex(_program));
|
||||||
config.generalEmulation.ditheringMode != Config::DitheringMode::dmDisable) {
|
|
||||||
_uniforms.emplace_back(new UNoiseTex(_program));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!m_glInfo.isGLES2) {
|
if (!m_glInfo.isGLES2) {
|
||||||
_uniforms.emplace_back(new UDepthTex(_program));
|
_uniforms.emplace_back(new UDepthTex(_program));
|
||||||
|
|
|
@ -106,11 +106,6 @@ void NoiseTexture::_fillTextureData()
|
||||||
|
|
||||||
void NoiseTexture::init()
|
void NoiseTexture::init()
|
||||||
{
|
{
|
||||||
if (config.generalEmulation.enableNoise == 0 &&
|
|
||||||
config.generalEmulation.ditheringMode == Config::DitheringMode::dmDisable) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_texData[0].empty())
|
if (m_texData[0].empty())
|
||||||
_fillTextureData();
|
_fillTextureData();
|
||||||
|
|
||||||
|
|
|
@ -67,8 +67,6 @@ bool Config_SetDefault()
|
||||||
res = ConfigSetDefaultInt(g_configVideoGliden64, "MaxAnisotropy", config.texture.maxAnisotropy, "Max level of Anisotropic Filtering, 0 for off");
|
res = ConfigSetDefaultInt(g_configVideoGliden64, "MaxAnisotropy", config.texture.maxAnisotropy, "Max level of Anisotropic Filtering, 0 for off");
|
||||||
assert(res == M64ERR_SUCCESS);
|
assert(res == M64ERR_SUCCESS);
|
||||||
//#Emulation Settings
|
//#Emulation Settings
|
||||||
res = ConfigSetDefaultBool(g_configVideoGliden64, "EnableNoise", config.generalEmulation.enableNoise, "Enable color noise emulation.");
|
|
||||||
assert(res == M64ERR_SUCCESS);
|
|
||||||
res = ConfigSetDefaultInt(g_configVideoGliden64, "DitheringMode", config.generalEmulation.ditheringMode, "Dithering mode. (0=disable, 1=noise dithering (default), 2=noise dithering with 5bit quantization, 3=full dithering, 4=full dithering with 5bit quantization)");
|
res = ConfigSetDefaultInt(g_configVideoGliden64, "DitheringMode", config.generalEmulation.ditheringMode, "Dithering mode. (0=disable, 1=noise dithering (default), 2=noise dithering with 5bit quantization, 3=full dithering, 4=full dithering with 5bit quantization)");
|
||||||
assert(res == M64ERR_SUCCESS);
|
assert(res == M64ERR_SUCCESS);
|
||||||
res = ConfigSetDefaultInt(g_configVideoGliden64, "BufferDitheringMode", config.generalEmulation.bufferDitheringMode, "Dithering mode for buffer in RDRAM. (0=disable, 1=bayer, 2=magic square, 3=blue noise)");
|
res = ConfigSetDefaultInt(g_configVideoGliden64, "BufferDitheringMode", config.generalEmulation.bufferDitheringMode, "Dithering mode for buffer in RDRAM. (0=disable, 1=bayer, 2=magic square, 3=blue noise)");
|
||||||
|
@ -274,8 +272,6 @@ void Config_LoadCustomConfig()
|
||||||
result = ConfigExternalGetParameter(fileHandle, sectionName, "texture\\screenShotFormat", value, sizeof(value));
|
result = ConfigExternalGetParameter(fileHandle, sectionName, "texture\\screenShotFormat", value, sizeof(value));
|
||||||
if (result == M64ERR_SUCCESS) config.texture.screenShotFormat = atoi(value);
|
if (result == M64ERR_SUCCESS) config.texture.screenShotFormat = atoi(value);
|
||||||
|
|
||||||
result = ConfigExternalGetParameter(fileHandle, sectionName, "generalEmulation\\enableNoise", value, sizeof(value));
|
|
||||||
if (result == M64ERR_SUCCESS) config.generalEmulation.enableNoise = atoi(value);
|
|
||||||
result = ConfigExternalGetParameter(fileHandle, sectionName, "generalEmulation\\ditheringMode", value, sizeof(value));
|
result = ConfigExternalGetParameter(fileHandle, sectionName, "generalEmulation\\ditheringMode", value, sizeof(value));
|
||||||
if (result == M64ERR_SUCCESS) config.generalEmulation.ditheringMode = atoi(value);
|
if (result == M64ERR_SUCCESS) config.generalEmulation.ditheringMode = atoi(value);
|
||||||
result = ConfigExternalGetParameter(fileHandle, sectionName, "generalEmulation\\bufferDitheringMode", value, sizeof(value));
|
result = ConfigExternalGetParameter(fileHandle, sectionName, "generalEmulation\\bufferDitheringMode", value, sizeof(value));
|
||||||
|
@ -402,7 +398,6 @@ void Config_LoadConfig()
|
||||||
config.texture.maxAnisotropy = ConfigGetParamInt(g_configVideoGliden64, "MaxAnisotropy");
|
config.texture.maxAnisotropy = ConfigGetParamInt(g_configVideoGliden64, "MaxAnisotropy");
|
||||||
config.texture.enableHalosRemoval = ConfigGetParamBool(g_configVideoGliden64, "enableHalosRemoval");
|
config.texture.enableHalosRemoval = ConfigGetParamBool(g_configVideoGliden64, "enableHalosRemoval");
|
||||||
//#Emulation Settings
|
//#Emulation Settings
|
||||||
config.generalEmulation.enableNoise = ConfigGetParamBool(g_configVideoGliden64, "EnableNoise");
|
|
||||||
config.generalEmulation.ditheringMode = ConfigGetParamInt(g_configVideoGliden64, "DitheringMode");
|
config.generalEmulation.ditheringMode = ConfigGetParamInt(g_configVideoGliden64, "DitheringMode");
|
||||||
config.generalEmulation.bufferDitheringMode = ConfigGetParamInt(g_configVideoGliden64, "BufferDitheringMode");
|
config.generalEmulation.bufferDitheringMode = ConfigGetParamInt(g_configVideoGliden64, "BufferDitheringMode");
|
||||||
config.generalEmulation.enableLOD = ConfigGetParamBool(g_configVideoGliden64, "EnableLOD");
|
config.generalEmulation.enableLOD = ConfigGetParamBool(g_configVideoGliden64, "EnableLOD");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user