Compare commits
No commits in common. "1b962831a025497dadf75e067e358c28c8ad2fff" and "b34131f3b5ca429eabeecc58d89e1e032ccb478f" have entirely different histories.
1b962831a0
...
b34131f3b5
|
@ -72,7 +72,7 @@ public class LightMapper
|
||||||
{
|
{
|
||||||
Enabled = rendParams.useSunlight,
|
Enabled = rendParams.useSunlight,
|
||||||
QuadLit = rendParams.sunlightMode is RendParams.SunlightMode.QuadUnshadowed or RendParams.SunlightMode.QuadObjcastShadows,
|
QuadLit = rendParams.sunlightMode is RendParams.SunlightMode.QuadUnshadowed or RendParams.SunlightMode.QuadObjcastShadows,
|
||||||
Direction = Vector3.Normalize(rendParams.sunlightDirection),
|
Direction = rendParams.sunlightDirection,
|
||||||
Color = Utils.HsbToRgb(rendParams.sunlightHue, rendParams.sunlightSaturation, rendParams.sunlightBrightness),
|
Color = Utils.HsbToRgb(rendParams.sunlightHue, rendParams.sunlightSaturation, rendParams.sunlightBrightness),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -323,11 +323,6 @@ public class LightMapper
|
||||||
// Odd choice I know
|
// Odd choice I know
|
||||||
cell.LightIndexCount++;
|
cell.LightIndexCount++;
|
||||||
cell.LightIndices.Add(0);
|
cell.LightIndices.Add(0);
|
||||||
|
|
||||||
// Additionally we'll add the sun to everything (yucky)
|
|
||||||
cell.LightIndexCount++;
|
|
||||||
cell.LightIndices.Add(0);
|
|
||||||
cell.LightIndices[0]++;
|
|
||||||
|
|
||||||
// The OG lightmapper uses the cell traversal to work out all the cells that
|
// The OG lightmapper uses the cell traversal to work out all the cells that
|
||||||
// are actually visited. We're a lot more coarse and just say if a cell is
|
// are actually visited. We're a lot more coarse and just say if a cell is
|
||||||
|
@ -439,7 +434,7 @@ public class LightMapper
|
||||||
? tracePoints
|
? tracePoints
|
||||||
: GetTracePoints(pos, quadOffsets, renderPoly.Center, planeMapper, v2ds);
|
: GetTracePoints(pos, quadOffsets, renderPoly.Center, planeMapper, v2ds);
|
||||||
|
|
||||||
// This is almost perfect now. Any issues seem to be related to Dark not carrying HSB strength correctly
|
// TODO: This isn't quite right yet. It seems to be too bright
|
||||||
if (settings.Sunlight.Enabled) {
|
if (settings.Sunlight.Enabled) {
|
||||||
// Check if plane normal is facing towards the light
|
// Check if plane normal is facing towards the light
|
||||||
// If it's not then we're never going to be (directly) lit by this
|
// If it's not then we're never going to be (directly) lit by this
|
||||||
|
|
Loading…
Reference in New Issue