Fixed: 3D floor with translucent texture but 255 alpha was rendered opaque.

This commit is contained in:
ZZYZX 2017-03-19 18:19:14 +02:00
parent 6fc1dac37b
commit 480a11529c
3 changed files with 8 additions and 8 deletions

View file

@ -191,8 +191,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.RenderPass = RenderPass.Mask;
else if(extrafloor.RenderAdditive) //mxd
this.RenderPass = RenderPass.Additive;
else if(level.alpha < 255)
this.RenderPass = RenderPass.Alpha;
else if ((level.alpha < 255) || Texture.IsTranslucent)
this.RenderPass = RenderPass.Alpha;
else
this.RenderPass = RenderPass.Mask;
}

View file

@ -173,11 +173,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Determine render pass
if(extrafloor != null)
{
if(extrafloor.Sloped3dFloor) //mxd
if (extrafloor.Sloped3dFloor) //mxd
this.RenderPass = RenderPass.Mask;
else if(extrafloor.RenderAdditive) //mxd
else if (extrafloor.RenderAdditive) //mxd
this.RenderPass = RenderPass.Additive;
else if(level.alpha < 255)
else if ((level.alpha < 255) || Texture.IsTranslucent)
this.RenderPass = RenderPass.Alpha;
else
this.RenderPass = RenderPass.Mask;

View file

@ -285,9 +285,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
List<WorldVertex> verts = CreatePolygonVertices(polygons, tp, sd, lightvalue, lightabsolute);
if(verts.Count > 2)
{
if(extrafloor.Sloped3dFloor) this.RenderPass = RenderPass.Mask; //mxd
else if(extrafloor.RenderAdditive) this.RenderPass = RenderPass.Additive; //mxd
else if(extrafloor.Alpha < 255) this.RenderPass = RenderPass.Alpha;
if (extrafloor.Sloped3dFloor) this.RenderPass = RenderPass.Mask; //mxd
else if (extrafloor.RenderAdditive) this.RenderPass = RenderPass.Additive; //mxd
else if ((extrafloor.Alpha < 255) || Texture.IsTranslucent) this.RenderPass = RenderPass.Alpha; // [ZZ] translucent texture should trigger Alpha pass
else this.RenderPass = RenderPass.Mask;
if(extrafloor.Alpha < 255)