Commit Graph

8 Commits (88c33aa6294e57dc70e9e992d6afe099fe8d0cf8)

Author SHA1 Message Date
Peter Wortmann 88c33aa629 Alternate light drawing
Not sure I like it too much, but this is a version where lights get
updated quicker.
2015-02-22 23:20:55 +01:00
Nicolas Hake 4db690b0c6 Add copyright header to files that were missing it 2015-02-16 18:40:52 +01:00
Nicolas Hake e21a5bdd44 Rename BoundBy to Clamp
"BoundBy" sounds like a predicate. "Clamp" is a common function name for
the operation in graphics processing, so it should be familiar to users.
2015-02-12 23:05:55 +01:00
Peter Wortmann 1aa8585fa1 Cosmetic light improvements
- Increase light fade-in/fade-out quite a bit (4 times stronger)
- Fixed normal jump when multiple lights intersect (will make things a
  little less nice with only one light, but this takes priority)
- Don't draw objects without light in light-debug mode
2015-01-15 12:30:50 +01:00
Armin Burgmeier a508fb38e7 Remove GL shade model changes
This gets rid of GL state changes for questionable gain. It also fixes drawing
of fade sky backgrounds in global viewports (where, for some reason, the shade
model was set to GL_FLAT instead of GL_SMOOTH).
2014-12-29 22:27:49 +01:00
Peter Wortmann 7dd4d1900b Split fan where the normal maxes out
This gives a more consistent normal distribution across directions.
I actually had to make the "normal region" of the light bigger, because
now the Clonk's face would be all dark otherwise. In the end,
everything looks smoother and less flashy now, which is probably as
it should be.

Also slight refactoring.
2014-11-21 15:32:33 +01:00
Peter Wortmann 9672ae8947 Framebuffer update improvements
Now we use the shader to do a proper blend - this avoids some artefacts
that were visible before. Also after some hair-pulling the coordinate
transformation now seems to be more correct than before. Maybe even
with zoom. We'll see.
2014-11-20 21:48:46 +01:00
Tobias Zwick fd0163ebc6 refactor and document: C4FoWLightSection only calculates the triangles now, C4FoWLight stitches everything together and renders
* intermediate fade triangles are now calculated in C4FoWLight
* rendering takes also place in C4FoWLight, using different C4FoWDrawStrategies
* solved an old TODO from Peter (int -> int32_t)
* refactor and simplify portions of the light vertex calculation code
2014-11-16 18:57:42 +01:00