mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Don't add blending to shaders for COPY and FILL cycle modes.
This commit is contained in:
parent
de388cbc56
commit
71caf75b7a
|
@ -330,15 +330,17 @@ void ShaderCombiner::updateFogMode(bool _bForce)
|
||||||
|
|
||||||
void ShaderCombiner::updateBlendMode(bool _bForce)
|
void ShaderCombiner::updateBlendMode(bool _bForce)
|
||||||
{
|
{
|
||||||
m_uniforms.uBlendMux1.set(gDP.otherMode.c1_m1a,
|
if (gDP.otherMode.cycleType <= G_CYC_2CYCLE) {
|
||||||
gDP.otherMode.c1_m1b,
|
m_uniforms.uBlendMux1.set(gDP.otherMode.c1_m1a,
|
||||||
gDP.otherMode.c1_m2a,
|
gDP.otherMode.c1_m1b,
|
||||||
gDP.otherMode.c1_m2b,
|
gDP.otherMode.c1_m2a,
|
||||||
_bForce);
|
gDP.otherMode.c1_m2b,
|
||||||
|
_bForce);
|
||||||
|
}
|
||||||
int forceBlend1 = gDP.otherMode.cycleType == G_CYC_2CYCLE ? 1 : 0;
|
int forceBlend1 = gDP.otherMode.cycleType == G_CYC_2CYCLE ? 1 : 0;
|
||||||
int forceBlend2 = 0;
|
int forceBlend2 = 0;
|
||||||
|
|
||||||
if (gDP.otherMode.forceBlender != 0 && gDP.otherMode.cycleType < G_CYC_COPY) {
|
if (gDP.otherMode.forceBlender != 0 && gDP.otherMode.cycleType <= G_CYC_2CYCLE) {
|
||||||
forceBlend1 = 1;
|
forceBlend1 = 1;
|
||||||
if (gDP.otherMode.cycleType == G_CYC_2CYCLE) {
|
if (gDP.otherMode.cycleType == G_CYC_2CYCLE) {
|
||||||
forceBlend2 = 1;
|
forceBlend2 = 1;
|
||||||
|
|
|
@ -635,15 +635,17 @@ void ShaderCombiner::updateFogMode(bool _bForce)
|
||||||
|
|
||||||
void ShaderCombiner::updateBlendMode(bool _bForce)
|
void ShaderCombiner::updateBlendMode(bool _bForce)
|
||||||
{
|
{
|
||||||
m_uniforms.uBlendMux1.set(gDP.otherMode.c1_m1a,
|
if (gDP.otherMode.cycleType <= G_CYC_2CYCLE) {
|
||||||
gDP.otherMode.c1_m1b,
|
m_uniforms.uBlendMux1.set(gDP.otherMode.c1_m1a,
|
||||||
gDP.otherMode.c1_m2a,
|
gDP.otherMode.c1_m1b,
|
||||||
gDP.otherMode.c1_m2b,
|
gDP.otherMode.c1_m2a,
|
||||||
_bForce);
|
gDP.otherMode.c1_m2b,
|
||||||
|
_bForce);
|
||||||
|
}
|
||||||
int forceBlend1 = gDP.otherMode.cycleType == G_CYC_2CYCLE ? 1 : 0;
|
int forceBlend1 = gDP.otherMode.cycleType == G_CYC_2CYCLE ? 1 : 0;
|
||||||
int forceBlend2 = 0;
|
int forceBlend2 = 0;
|
||||||
|
|
||||||
if (gDP.otherMode.forceBlender != 0 && gDP.otherMode.cycleType < G_CYC_COPY) {
|
if (gDP.otherMode.forceBlender != 0 && gDP.otherMode.cycleType <= G_CYC_2CYCLE) {
|
||||||
forceBlend1 = 1;
|
forceBlend1 = 1;
|
||||||
if (gDP.otherMode.cycleType == G_CYC_2CYCLE) {
|
if (gDP.otherMode.cycleType == G_CYC_2CYCLE) {
|
||||||
forceBlend2 = 1;
|
forceBlend2 = 1;
|
||||||
|
|
|
@ -308,13 +308,14 @@ int compileCombiner(Combiner & _color, Combiner & _alpha, std::string & _strShad
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_strShader.append(fragment_shader_blender1);
|
if (gDP.otherMode.cycleType <= G_CYC_2CYCLE)
|
||||||
|
_strShader.append(fragment_shader_blender1);
|
||||||
if (gDP.otherMode.cycleType == G_CYC_2CYCLE)
|
if (gDP.otherMode.cycleType == G_CYC_2CYCLE)
|
||||||
_strShader.append(fragment_shader_blender2);
|
_strShader.append(fragment_shader_blender2);
|
||||||
|
|
||||||
_strShader.append(
|
_strShader.append(
|
||||||
" fragColor = vec4(color2, alpha2); \n"
|
" fragColor = vec4(color2, alpha2); \n"
|
||||||
);
|
);
|
||||||
|
|
||||||
return nInputs;
|
return nInputs;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user