mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Fix ShaderBlender1::write method. Up ShaderStorage version.
Fixed #1553 Resetting once breaks rendering via transparency of many textures. Thanks Logan McNaughton for finding the root of the problem.
This commit is contained in:
parent
d4dbe7c094
commit
da2becd57e
|
@ -469,13 +469,6 @@ public:
|
||||||
if (_glinfo.isGLESX) {
|
if (_glinfo.isGLESX) {
|
||||||
m_part =
|
m_part =
|
||||||
" muxPM[0] = clampedColor; \n"
|
" muxPM[0] = clampedColor; \n"
|
||||||
;
|
|
||||||
if (g_cycleType == G_CYC_2CYCLE) {
|
|
||||||
m_part +=
|
|
||||||
" muxPM[1] = clampedColor; \n"
|
|
||||||
;
|
|
||||||
}
|
|
||||||
m_part +=
|
|
||||||
" if (uForceBlendCycle1 != 0) { \n"
|
" if (uForceBlendCycle1 != 0) { \n"
|
||||||
" muxA[0] = clampedColor.a; \n"
|
" muxA[0] = clampedColor.a; \n"
|
||||||
" lowp float muxa; \n"
|
" lowp float muxa; \n"
|
||||||
|
@ -533,13 +526,6 @@ public:
|
||||||
} else {
|
} else {
|
||||||
m_part =
|
m_part =
|
||||||
" muxPM[0] = clampedColor; \n"
|
" muxPM[0] = clampedColor; \n"
|
||||||
;
|
|
||||||
if (g_cycleType == G_CYC_2CYCLE) {
|
|
||||||
m_part +=
|
|
||||||
" muxPM[1] = clampedColor; \n"
|
|
||||||
;
|
|
||||||
}
|
|
||||||
m_part +=
|
|
||||||
" if (uForceBlendCycle1 != 0) { \n"
|
" if (uForceBlendCycle1 != 0) { \n"
|
||||||
" muxA[0] = clampedColor.a; \n"
|
" muxA[0] = clampedColor.a; \n"
|
||||||
" muxB[0] = 1.0 - muxA[uBlendMux1[1]]; \n"
|
" muxB[0] = 1.0 - muxA[uBlendMux1[1]]; \n"
|
||||||
|
@ -550,6 +536,14 @@ public:
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void write(std::stringstream & shader) const override
|
||||||
|
{
|
||||||
|
if (g_cycleType == G_CYC_2CYCLE)
|
||||||
|
shader << " muxPM[1] = clampedColor; \n";
|
||||||
|
|
||||||
|
ShaderPart::write(shader);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class ShaderBlender2 : public ShaderPart
|
class ShaderBlender2 : public ShaderPart
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace glsl {
|
||||||
class ShaderPart
|
class ShaderPart
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void write(std::stringstream & shader) const
|
virtual void write(std::stringstream & shader) const
|
||||||
{
|
{
|
||||||
shader << m_part;
|
shader << m_part;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace glsl {
|
||||||
bool loadShadersStorage(graphics::Combiners & _combiners);
|
bool loadShadersStorage(graphics::Combiners & _combiners);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const u32 m_formatVersion = 0x13U;
|
const u32 m_formatVersion = 0x14U;
|
||||||
const opengl::GLInfo & m_glinfo;
|
const opengl::GLInfo & m_glinfo;
|
||||||
opengl::CachedUseProgram * m_useProgram;
|
opengl::CachedUseProgram * m_useProgram;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user