Fixed, Visual mode: ExtraFloor_LightOnly effect transferred brightness incorrectly (I broke this in r2236).

Changed, Visual mode: floors and ceilings with sky texture are now always rendered at full brightness.
This commit is contained in:
MaxED 2015-02-26 14:42:58 +00:00
parent 7c8c36a01b
commit 02b902e20c
3 changed files with 17 additions and 5 deletions

View file

@ -177,7 +177,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
// Go for all polygons
int num = polygons.Count;
Plane plane = (l.type == SectorLevelType.Ceiling ? l.plane : l.plane.GetInverted()); //mxd
Plane plane = (l.type == SectorLevelType.Floor ? l.plane.GetInverted() : l.plane); //mxd
for(int pi = 0; pi < num; pi++)
{

View file

@ -117,14 +117,20 @@ namespace CodeImp.DoomBuilder.BuilderModes
else
texscale = new Vector2D(1.0f / 64.0f, 1.0f / 64.0f);
//mxd. Sky is always bright
int color;
if(s.CeilTexture == General.Map.Config.SkyFlatName)
color = -1; // That's white. With alpha. Not very impressive, eh?
else
color = (int)((level.color | General.Clamp(level.alpha, 0, 255) << 24) & 0xffffffff); // Byte offset shinanigans! Yay!
// Make vertices
ReadOnlyCollection<Vector2D> triverts = base.Sector.Sector.Triangles.Vertices;
WorldVertex[] verts = new WorldVertex[triverts.Count];
for(int i = 0; i < triverts.Count; i++)
{
// Color shading
PixelColor c = PixelColor.FromInt(level.color);
verts[i].c = c.WithAlpha((byte)General.Clamp(level.alpha, 0, 255)).ToInt();
verts[i].c = color; //mxd
// Vertex coordinates
verts[i].x = triverts[i].x;

View file

@ -119,14 +119,20 @@ namespace CodeImp.DoomBuilder.BuilderModes
else
texscale = new Vector2D(1.0f / 64.0f, 1.0f / 64.0f);
//mxd. Sky is always bright
int color;
if(s.FloorTexture == General.Map.Config.SkyFlatName)
color = -1; // That's white. With alpha. Not very impressive, eh?
else
color = (int)((level.color | General.Clamp(level.alpha, 0, 255) << 24) & 0xffffffff); // Byte offset shinanigans! Yay!
// Make vertices
ReadOnlyCollection<Vector2D> triverts = base.Sector.Sector.Triangles.Vertices;
WorldVertex[] verts = new WorldVertex[triverts.Count];
for(int i = 0; i < triverts.Count; i++)
{
// Color shading
PixelColor c = PixelColor.FromInt(level.color);
verts[i].c = c.WithAlpha((byte)General.Clamp(level.alpha, 0, 255)).ToInt();
verts[i].c = color; //mxd
// Vertex coordinates
verts[i].x = triverts[i].x;