Opened 13 years ago

Closed 2 years ago

Last modified 2 years ago

#720 closed defect (wontfix)

Fix lighting of units in FoW, with shadows enabled

Reported by: Philip Taylor Owned by:
Priority: If Time Permits Milestone:
Component: Core engine Keywords:
Cc: Patch:

Description (last modified by Vladislav Belov)

Get some objects to render in fog-of-war (i.e. explored but not still visible). With shadows disabled, they look much darker than objects in visible regions. With shadows enabled, they look almost the same as in visible regions.

The dark colour is set via CModel::SetShadingColor. It looks like PlainRenderModifier applies the shading colour to ambient+diffuse via ModelRenderer::BuildColor4ub, whereas PlainLitRenderModifier applies it only to diffuse and then applies shadow and then adds ambient. It'd probably be okay if the shading colour was folded into the ambient value.

Need to make sure this works for all the other variations of the renderer (player colour, transparency, shader vs FF).

Change History (10)

comment:1 by Kieran P, 13 years ago

Milestone: Alpha 4Alpha 5

comment:2 by Kieran P, 13 years ago

Milestone: Alpha 5Alpha 6

comment:3 by Philip Taylor, 13 years ago

The problem now is when renderpath=fixed - objects in fog-of-war are fully bright. Maybe a reasonable solution is for the renderer to sample the LOS texture and multiply the object shading colour by that, rather than having the renderer query the simulation state directly or having the simulation code compute the rendering colour itself.

comment:4 by Kieran P, 13 years ago

Milestone: Alpha 6Alpha 7
Owner: set to philip
Priority: Should HaveIf Time Permits

comment:5 by Kieran P, 13 years ago

Milestone: Alpha 7Alpha 8

comment:6 by Kieran P, 12 years ago

Milestone: Alpha 8Alpha 9

comment:7 by Kieran P, 12 years ago

Milestone: Alpha 9Backlog

comment:8 by historic_bruno, 11 years ago

Owner: philip removed

comment:9 by Vladislav Belov, 2 years ago

Description: modified (diff)
Resolution: wontfix
Status: newclosed

Fixed Function Pipeline and related code were removed, so the ticket isn't needed anymore.

Refs r3690, r11423.

comment:10 by Vladislav Belov, 2 years ago

Milestone: Backlog
Note: See TracTickets for help on using tickets.