Compare commits
	
		
			2 Commits
		
	
	
		
			b34131f3b5
			...
			1b962831a0
		
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | 1b962831a0 | |
|  | 7693261cd7 | 
|  | @ -72,7 +72,7 @@ public class LightMapper | |||
|         { | ||||
|             Enabled = rendParams.useSunlight, | ||||
|             QuadLit = rendParams.sunlightMode is RendParams.SunlightMode.QuadUnshadowed or RendParams.SunlightMode.QuadObjcastShadows, | ||||
|             Direction = rendParams.sunlightDirection, | ||||
|             Direction = Vector3.Normalize(rendParams.sunlightDirection), | ||||
|             Color = Utils.HsbToRgb(rendParams.sunlightHue, rendParams.sunlightSaturation, rendParams.sunlightBrightness), | ||||
|         }; | ||||
| 
 | ||||
|  | @ -324,6 +324,11 @@ public class LightMapper | |||
|             cell.LightIndexCount++; | ||||
|             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 | ||||
|             // are actually visited. We're a lot more coarse and just say if a cell is | ||||
|             // in range then we potentially affect the lighting in the cell and add it  | ||||
|  | @ -434,7 +439,7 @@ public class LightMapper | |||
|                             ? tracePoints | ||||
|                             : GetTracePoints(pos, quadOffsets, renderPoly.Center, planeMapper, v2ds); | ||||
|                          | ||||
|                         // TODO: This isn't quite right yet. It seems to be too bright | ||||
|                         // This is almost perfect now. Any issues seem to be related to Dark not carrying HSB strength correctly | ||||
|                         if (settings.Sunlight.Enabled) { | ||||
|                             // Check if plane normal is facing towards the light | ||||
|                             // If it's not then we're never going to be (directly) lit by this | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue