Opened 18 years ago
Closed 18 years ago
#141 closed defect (fixed)
Shadows are delayed by one frame
Reported by: | Philip Taylor | Owned by: | Nicolai Hähnle |
---|---|---|---|
Priority: | Should Have | Milestone: | |
Component: | Core engine | Keywords: | renderer |
Cc: | Patch: |
Description
Shadows seem to be rendered on the screen one frame later than they should be: click on the minimap to jump somewhere (preferably while having a low framerate), and the screen is momentarily bright before all the shadows pop back in.
Change History (3)
comment:1 by , 18 years ago
Owner: | set to |
---|
comment:2 by , 18 years ago
Keywords: | renderer added |
---|---|
Status: | new → assigned |
comment:3 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
(In [4330]) #Bugfix: Shadows appeared to be rendered one frame too late close #141
The problem was that the shadow matrices were setup in BeginFrame, but GraphicsView calls SetCamera after BeginFrame. The solution was to move the shadow matrix setup into CRenderer::SetCamera.
This caused a second problem because RenderReflections/RenderRefractions used SetCamera to change the OpenGL matrices. Solved this problem by distinguishing explicitly between the camera used for the scene as a whole and the camera used to configure OpenGL. The latter can be a virtual camera for shadow or reflection rendering and similar render-to-texture effects.