Commit graph

263 commits

Author SHA1 Message Date
Christoph Oelckers
91eafed5d3 - fixed coordinate calculations for trimmed sprites which were quite a bit broken. 2015-04-04 13:37:55 +02:00
Christoph Oelckers
67334bfa2b - calculate weapon positions fully in floating point to avoid roundoff errors.
- In order to get reliable results the empty border around scaled sprites must be the same scale as the sprite (i.e. 2 pixels for 2x scale and 4 pixels for 4x scale.)
2015-04-04 12:35:10 +02:00
Christoph Oelckers
48e21f6759 - consider MBF sky transfers when checking for skybox precaching. 2015-04-01 12:08:42 +02:00
Christoph Oelckers
1e9a6e667e - GL code adjustments for reworked precaching. 2015-04-01 11:59:41 +02:00
Christoph Oelckers
7701d54b1f - fixed: associated dynamic lights took the sprite/frame info from the actor's current state instead of from the actor's current sprite and frame, which may differ in case some placeholder sprite is used in the state. 2015-03-15 12:24:28 +01:00
Christoph Oelckers
fad3a54100 - fixed positioning for sky textures that are less than 128 pixels tall. 2015-03-15 12:10:22 +01:00
Christoph Oelckers
a5a53c51e6 - fixed: The flat drawing code assumed that the first element of the light list originated from the sector itself. This had been true formerly but in some situations it no longer is. 2015-02-10 21:52:19 +01:00
Christoph Oelckers
00639121c0 - added the missed parts of camera roll in gl_scene.cpp. 2015-02-10 20:34:10 +01:00
Christoph Oelckers
8a9692c29f - fixed: The code which decided whether to clamp two sided middle textures used the texture size instead of the render size for the specific linedef, meaning that any per-sidedef scaling was ignored. 2015-02-10 20:16:25 +01:00
Christoph Oelckers
a578ff5d06 - fixed a problem with some older AMD drivers: Normally calling glBindBufferBase should imply a call to glBindBuffer, but on these drivers it was never done, which resulted in the light uniform buffer never being created... 2015-01-24 13:13:54 +01:00
Christoph Oelckers
d4d041d5fc - fixed: FMaterial::ValidateTexture must determine whether to expand sprites before actually constructing the FMaterial object. 2015-01-08 18:44:55 +01:00
Christoph Oelckers
a8398e70b0 - fixed: The brightfog flag in the GL related map settings was never initialized.
- fixed: brightfog should not disable colored lighting for the weapon sprite.
2014-12-31 23:01:06 +01:00
Christoph Oelckers
4f08b20df5 - consider pixel stretching when rendering models. For non-voxels an aspect ratio of 1:1 must always be assumed while voxels need to be stretched so that 1 voxel unit == 1 map unit. 2014-12-31 12:53:29 +01:00
Christoph Oelckers
e6d59ec429 - fixed: with aspect ratio compensation in the view matrix it is necessary to adjust the view pitch for this because the playsim does not know anything about pixel ratio. 2014-12-31 12:04:55 +01:00
Christoph Oelckers
315827015c - made aspect ratio correction factor configurable through MAPINFO. 2014-12-29 23:52:20 +01:00
Christoph Oelckers
45cf65afbd - moved the aspect ratio correction factor from the projection to the view matrix where it should have been from the start.
- removed the mCameraPos variable in FGLRenderer because it was only used in one place where it is just as easy to use the global viewx/y/z variables directly.
2014-12-29 22:42:19 +01:00
Christoph Oelckers
045725de15 - use strncpy instead of sprintf tp init static char array to ensure that all elements get initialized. 2014-12-29 16:35:30 +01:00
Christoph Oelckers
fbfe0f1e7a - fixed: y-clamped textures with negative scale need to shift their texture coordinates into the proper [0..1] range. 2014-12-26 11:53:38 +01:00
Christoph Oelckers
c66a211200 - fixed: The sky renderer must not only alter the light mode but also reset the software light level to a 'disabled' value. 2014-12-25 22:45:40 +01:00
Christoph Oelckers
ffa069205f - fixed: For fullbright sprites, a weapon's extra light must be ignored because it can be negative. 2014-12-25 18:30:34 +01:00
Christoph Oelckers
0bc2c0094a - fixed: For cubemapped skies with one texture for all 4 sides the texture was never set before rendering. 2014-12-19 16:35:34 +01:00
Christoph Oelckers
717c82ee4a - On Intel, we have to disable shader storage buffers because their complier contains a bug disallowing unsized arrays. 2014-12-01 09:58:23 +01:00
Christoph Oelckers
ec627d94dd - fixed: The depth clamp setting needs to be tracked per portal so that it can be properly restored afterward.
Regular skies need it off but SkyViewpoints need it on - and all others need to use the parent's setting.
So without engine side tracking we can end up rendering the sky with this setting off, resulting in omission of the fog layer.
2014-11-27 12:26:52 +01:00
Christoph Oelckers
eb753a0b7c - fixed: We also should use the proper 'copied' info for the non-inverted planes. 2014-11-27 10:49:03 +01:00
Christoph Oelckers
99d81621f9 - fixed: The 'copied' information of a 3D floor plane should only apply to that particular plane, but never the opposite one of the same 3D floor. 2014-11-27 10:46:28 +01:00
alexey.lysiuk
60d78bcdf6 - implemented hqNx image scaling algorithms using MMX and SSE2 intrinsics 2014-11-27 10:58:34 +02:00
Christoph Oelckers
a7f4185981 - now that we don't have to care anymore about SVN-related merging problems, let's save the 3 global variables of the GL renderer unconditionally, even if the software renderer is running. 2014-11-16 09:08:47 +01:00
Christoph Oelckers
b0a6c94fa4 - fixed: the translucency flag for the flags renderer was inconsistent between the light pass and the render pass on GL 3.x hardware, resulting in bad buffer indices being sent to the shader. 2014-11-09 12:10:33 +01:00
Christoph Oelckers
3e50db9bf0 - fixed: When setting the object color for a shaded decal, the alpha channel must be forced to be 255. The decal's AlphaColor contains the palette index in those bits. 2014-10-26 15:11:04 +01:00
Christoph Oelckers
3c7664a460 - we don't really need a bBrightmap in a texture. All it did was duplicate some functionality of bMasked.
- renamed bBrightmapDisablesFullbright flag.
2014-10-26 08:41:52 +01:00
Christoph Oelckers
5a91fd0ad4 - fixed: DMD models didn't load their triangle data.
- fixed: MD2 models didn't handle the triangles' byte order.
2014-10-24 13:03:26 +02:00
Christoph Oelckers
f8016bef86 - fixed: voxels didn't set their index count. 2014-10-24 11:52:45 +02:00
Christoph Oelckers
e5cd90f323 - use separate vertex buffers per model to avoid large memory usage peaks. Also delete the geometry data for the models once it has been copied into the vertex buffer. 2014-10-24 11:43:25 +02:00
Christoph Oelckers
bca47bb9bc - removed debug code.
- fixed: planes that are created by splitting translucent 3D-floors may never be rendered.
2014-10-23 17:35:58 +02:00
Christoph Oelckers
36b35e85f3 - fixed: overflow checks for dynamic light buffer were not correct. 2014-10-23 12:06:00 +02:00
Christoph Oelckers
066e53ae4c - fixed: sprites rendered as 'bright' should not be affected by dynamic lights. 2014-10-23 10:54:26 +02:00
Christoph Oelckers
618c23303f - fixed: The interpolation factor for models was never passed to the shader. 2014-10-23 09:57:27 +02:00
Christoph Oelckers
5302a10a7d - diable software lighting for textured automap.
* since it is designed for software-style light diminishing it doesn't work for 2D.
* additionally it left the lighting state in an unsuitable setting for further 2D rendering.
2014-10-23 09:19:30 +02:00
Christoph Oelckers
89ce0b8cb7 - test if GLSL version 1.4 can handle uniform buffers on old Intel hardware without making problems... 2014-10-22 16:54:26 +02:00
Christoph Oelckers
9f1f17c306 - fixed: The PolyBSPs weren't fully initialized. Some GZDoom-only fields in the segs were skipped. 2014-10-14 08:54:08 +02:00
Christoph Oelckers
5d032f3fcf - fixed: Since the engine can no longer change renderers on the fly, thanks to ZDoom's messed up video startup code, we have to abort with a fatal error if we can't create a GL context. Otherwise the user will never see a meaningful message. 2014-10-06 10:00:02 +02:00
Christoph Oelckers
3e2a17538b - fixed: HUD weapons were affected by dynamic lights even when the CVARs said that they shouldn't. 2014-10-06 09:05:42 +02:00
Christoph Oelckers
ead8a2874d - fixed: The texture mode implied by render style did not work for models. 2014-10-05 12:03:55 +02:00
Christoph Oelckers
fd3128a164 - fixed: When changing enhanced nightvision mode the shaders need to have their fixed colormap state reset to ensure that the new settings get used.
- fixed: The shader code for handling special fixed colormaps did not use the color vertex attribute which was most evident with the 'shadow' render style on the spectre.
2014-10-05 09:40:36 +02:00
Christoph Oelckers
48da2f87bb - fixed: The light buffer index must not be reset between rendering a camera texture and the main scene.
Since rendering is asynchronous, the camera texture scene may not be finished once the main scene's lights get filled in. Unfortunately forcing a synchronization with glFinisg has bad side effects on performance the only remaining option is to use separate parts of the buffer for both scenes, which in extreme cases may increase the light buffer's size - but on modern hardware that shouldn't be a problem.
2014-09-21 21:01:11 +02:00
Christoph Oelckers
b2cf7d6512 - fixed memory leak: The sector links for dynamic lights were never freed. 2014-09-21 12:40:08 +02:00
Christoph Oelckers
7359631a43 - fixed weapon drawing rules to account for the death camera. 2014-09-21 11:08:38 +02:00
Christoph Oelckers
4682736585 - fixed: non-tiled mid textures on a fog boundary require some special clamping to be performed in the shader. 2014-09-21 11:08:17 +02:00
Christoph Oelckers
da87a34a6f - fixed: MODELDEF's FrameIndex command was case sensitive. 2014-09-21 09:40:41 +02:00
Christoph Oelckers
43e2d704a3 - always use glPolygonOffset to render translucent geometry. 2014-09-20 09:04:36 +02:00