mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
![Sergey Lipskiy](/assets/img/avatar_default.png)
Parts of shaders code created on start. Some parts depend on config options. When config changed with GUI shaders updated but code parts not updated. Thus new shaders do not correspond to current state of config.
26 lines
922 B
C++
26 lines
922 B
C++
#include <vector>
|
|
#include "CombinerProgram.h"
|
|
#include <Config.h>
|
|
|
|
namespace graphics {
|
|
|
|
u32 CombinerProgram::getShaderCombinerOptionsBits()
|
|
{
|
|
// WARNING: Shader Storage format version must be increased after any change in this function.
|
|
std::vector<u32> vecOptions;
|
|
vecOptions.push_back(config.video.multisampling > 0 ? 1 : 0);
|
|
vecOptions.push_back(config.texture.bilinearMode);
|
|
vecOptions.push_back(config.generalEmulation.enableHWLighting);
|
|
vecOptions.push_back(config.generalEmulation.enableNoise);
|
|
vecOptions.push_back(config.generalEmulation.enableLOD);
|
|
vecOptions.push_back(config.frameBufferEmulation.N64DepthCompare);
|
|
vecOptions.push_back(config.generalEmulation.enableLegacyBlending);
|
|
vecOptions.push_back(config.generalEmulation.enableFragmentDepthWrite);
|
|
u32 optionsSet = 0;
|
|
for (u32 i = 0; i < vecOptions.size(); ++i)
|
|
optionsSet |= vecOptions[i] << i;
|
|
return optionsSet;
|
|
}
|
|
|
|
}
|