mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 07:53:12 +00:00
GRIM: Perform alpha testing when rendering actors with the shaders renderer
Fixes transparency for the tie rope and Glottis' head
This commit is contained in:
parent
1908a43d18
commit
d1b72c7975
@ -727,6 +727,7 @@ void GfxOpenGLS::startActorDraw(const Actor *actor) {
|
||||
_actorProgram->setUniform("hasZBuffer", hasZBuffer);
|
||||
_actorProgram->setUniform("texcropZBuf", _zBufTexCrop);
|
||||
_actorProgram->setUniform("screenSize", Math::Vector2d(_screenWidth, _screenHeight));
|
||||
_actorProgram->setUniform1f("alphaRef", 0.5f);
|
||||
}
|
||||
|
||||
if (_currentShadowArray) {
|
||||
|
@ -7,6 +7,7 @@ uniform bool textured;
|
||||
uniform bool hasZBuffer;
|
||||
uniform vec2 texcropZBuf;
|
||||
uniform vec2 screenSize;
|
||||
uniform float alphaRef;
|
||||
|
||||
//#define SGSPLUS_FIX
|
||||
#ifndef SGSPLUS_FIX
|
||||
@ -40,4 +41,7 @@ void main()
|
||||
if (textured) {
|
||||
outColor *= texture(tex, Texcoord);
|
||||
}
|
||||
|
||||
if (outColor.a < alphaRef)
|
||||
discard;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user