Reduces vertex redundancy.
In TinyGL, fixes checkbox border on Copal computer (actually, works around
yet another discrepancy between OpenGL and TinyGL on 1-pixel-thick
[T]GL_QUADS).
Enabling quadratic atenuation, even with values as low as 0.1, reduces spot
lighting too much in (at least) sets "do" (see Domino), "al" (see Manny when
walking along the garage door), "hq" (see Salvador).
Disabling is not perfect either, as attenuation can be seen (at least) in
set "tu" (see fire extinguisher), but it should be overall better.
Also, it should be noted that perfect fidelity cannot be achieved with openGL
fixed pipeline, as DirectX spotlight have two angles (0 <= phi <= theta <= pi),
atenuation being null below phi, full above theta, transitioning with a
configurable exponent between both (defaults to angle-linear). OpenGL would
correspond to phi=0 and theta=pi (ie, transition is always done between fixed
angles), plus a configurable hard cutoff.
Determined by enabling a single omnidirectional light (newlight9 in set
"ce", which stands at set entrance toward elevator) and comparing
luminosity level on Manny at several locations in that scene with original
software renderer.
This set is quite convenient for this comparison, as Manny position can be
easily controlled: stick to the wall with the red arrow pointing at the
stairs, making movements one-dimensional.
For spotlight, set "tu" was used with the single spotlight on, walking
from the fire extinguisher to server door, confirming similar attenuation.
From these tests, it seems only quadratic attenuation is used, which makes
sense as it gives a realistic effect.
Determined by keping a single directional light source enabled, as they are
not subject to attenuation (having no position), and comparing with
original software renderer.
Default DirectX material reflects all diffuse light, so 1.0f coefficient is
likely correct.
My initial idea that GRIM would use specular likely came from a difference
between DirectX and OpenGL lighting for spotlights: DirectX allows for an
extra penumbra angle, allowing stronger center spots while maintaining a
smooth fade (which I emulated with a fixed 2.0 exponent).
Also, specular involves an extra light color value and material definition
for specular reflection, which are not visible in game data files.
All this making the use of specular very unlikely to match original renderer.
Instead of using the number of sub-images to decide whether bitmaps
should be drawn using TIL information, better use the existance
of texture coordinates which are distinctive for tiles.
Use bit 0x20 in the mesh face flags to disable ligthing. This
fixes the problem that once a previous screen is used as
texture (e.g. in the intro or for the transition effects
in set kab when walking eastwards or westwards), it is shown
too dark due to the applied static lighting for overworld
actors.
- if Lua_V2::SetActorGlobalAlpha() is called with a mesh name,
set a mesh-specific alpha value / mode
- use this alpha value in drawEMIModelFace()
- fixes the problem that the whole actor vanishes in some scenes
(e.g. when entering or leaving the porch of the of LUA bar)
- delete screenshot after texture is created
- free _data[] entries in BitmapData::freeData()
- destroy _specialtyTextures[] entries in
graphic driver's destructors
Per convention, in residualvm the default GL current color
should be (1.0f, 1.0f, 1.0f). If a function changes the color,
it is required to reset it before returning.
This fixes the issue that some videos were not correctly displayed
until the next glColor call (e.g. when drawing the sub-titles) was
issued.
- instead of re-calculating the color values when dimming the screen,
better draw a half-transparent plane after drawing all non-overworld
characters
- fixes the issue that overworld actors were dimmed and that the
pause screen is transparent when the inventory is open
Bit 0x40000 in the mesh face flags (set only in the intro) should
enable blending, too. This fix lets the various screens of the intro
fade into each other.