mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
- swapped order of textures in burn shader to avoid some problems with the texture samplers.
- fixed: texture sampler state for the burn texture was never set.
This commit is contained in:
parent
c6f4c0b6f0
commit
d5633701b4
2 changed files with 5 additions and 4 deletions
|
@ -150,6 +150,7 @@ bool OpenGLFrameBuffer::WipeStartScreen(int type)
|
||||||
wipestartscreen = new FHardwareTexture(Width, Height, true);
|
wipestartscreen = new FHardwareTexture(Width, Height, true);
|
||||||
wipestartscreen->CreateTexture(NULL, Width, Height, 0, false, 0, false);
|
wipestartscreen->CreateTexture(NULL, Width, Height, 0, false, 0, false);
|
||||||
GLRenderer->mSamplerManager->Bind(0, CLAMP_NOFILTER);
|
GLRenderer->mSamplerManager->Bind(0, CLAMP_NOFILTER);
|
||||||
|
GLRenderer->mSamplerManager->Bind(1, CLAMP_NONE);
|
||||||
glFinish();
|
glFinish();
|
||||||
wipestartscreen->Bind(0, false, false, false);
|
wipestartscreen->Bind(0, false, false, false);
|
||||||
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, Width, Height);
|
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, Width, Height);
|
||||||
|
@ -515,9 +516,9 @@ bool OpenGLFrameBuffer::Wiper_Burn::Run(int ticks, OpenGLFrameBuffer *fb)
|
||||||
gl_RenderState.Apply();
|
gl_RenderState.Apply();
|
||||||
|
|
||||||
// Burn the new screen on top of it.
|
// Burn the new screen on top of it.
|
||||||
fb->wipeendscreen->Bind(1, 0, false, false);
|
fb->wipeendscreen->Bind(0, 0, false, false);
|
||||||
|
|
||||||
BurnTexture->CreateTexture(rgb_buffer, WIDTH, HEIGHT, 0, false, 0, false);
|
BurnTexture->CreateTexture(rgb_buffer, WIDTH, HEIGHT, 1, true, 0, false);
|
||||||
|
|
||||||
GLRenderer->mVBO->RenderArray(GL_TRIANGLE_STRIP, offset, count);
|
GLRenderer->mVBO->RenderArray(GL_TRIANGLE_STRIP, offset, count);
|
||||||
gl_RenderState.SetEffect(EFF_NONE);
|
gl_RenderState.SetEffect(EFF_NONE);
|
||||||
|
|
|
@ -8,8 +8,8 @@ void main()
|
||||||
{
|
{
|
||||||
vec4 frag = vColor;
|
vec4 frag = vColor;
|
||||||
|
|
||||||
vec4 t1 = texture2D(texture2, vTexCoord.xy);
|
vec4 t1 = texture2D(tex, vTexCoord.xy);
|
||||||
vec4 t2 = texture2D(tex, vec2(vTexCoord.x, 1.0-vTexCoord.y));
|
vec4 t2 = texture2D(texture2, vec2(vTexCoord.x, 1.0-vTexCoord.y));
|
||||||
|
|
||||||
FragColor = frag * vec4(t1.r, t1.g, t1.b, t2.a);
|
FragColor = frag * vec4(t1.r, t1.g, t1.b, t2.a);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue