Commit graph

331 commits

Author SHA1 Message Date
smallmodel
77ecc73631
Implement lens flare / sun flares
Some maps like mohdm1 have a sun flares, now when you look up the sky towards the sun direction, you will see the flare of the sun
2024-09-08 15:31:18 +02:00
smallmodel
86ddec3f76
Clear the world to prevent crashes 2024-09-08 14:59:10 +02:00
smallmodel
4d12bcb184
Export s_sun 2024-09-08 00:52:03 +02:00
smallmodel
8e1a52bbb7
Implement VIS debugging 2024-09-07 23:58:50 +02:00
smallmodel
b7f0f32878
Fix DCL signature on big-endian architectures 2024-09-05 01:14:42 +02:00
smallmodel
71a1df661a
Fix current mark's alpha component not updating properly 2024-09-04 21:54:49 +02:00
smallmodel
e42b6fe0a9
Fix current mark not updating if it has a rotation 2024-09-04 21:51:16 +02:00
smallmodel
2fc091fdf7
Skip loading if the file length is less than the dcl header length 2024-09-04 20:56:41 +02:00
smallmodel
47ba241e7d
Fix file being closed but still used afterwards 2024-09-04 20:50:22 +02:00
smallmodel
c0d37c504a
Fix infinite loop in R_TerrainHeightForPoly 2024-09-04 20:46:10 +02:00
smallmodel
e806c1ddf1
Move MAX_MARK values to tr_types_new.h 2024-09-04 20:23:20 +02:00
smallmodel
4123bef60d
Implement R_ApplyLevelDecal 2024-09-04 20:05:48 +02:00
smallmodel
c6464efa07
Implement level mark loading and updating 2024-09-04 00:02:07 +02:00
smallmodel
25c2904d66
Implement RE_MapVersion and RE_PrintBSPFileSizes 2024-09-02 19:52:30 +02:00
smallmodel
8b5074b6ac
Fix Dot/Texcoords calc
This caused some shaders such as headlights beam on the opeltruck being weirdly rendered
2024-08-27 01:07:51 +02:00
smallmodel
7023184892
Fix subdivisions endianness
See #332
2024-08-26 00:45:21 +02:00
smallmodel
5134aed352
Mark the functions as inline to optimize function calls 2024-08-24 17:35:02 +02:00
smallmodel
6506577787
Add shader flags with tcMod rotate
This fixes vehicle wheels rotating forever. Wheels now rotate consistently depending on the vehicle speed
2024-08-24 00:35:39 +02:00
smallmodel
679bfb90ea
Fix accessing 8th leaves element before finishing the loop
This caused the 8th element to be taken into account when enabling optimizations with GCC (invalid pointer to the leaf)
2024-08-13 20:41:53 +02:00
smallmodel
9150d1cc44
Fix lighting grid being incorrect
It fixes #321 where impacts like bullets would have an incorrect color (like red, green...)
2024-08-08 20:31:19 +02:00
smallmodel
e19b72647e
Use qglGenTextures to guarantee the uniqueness of the texture number 2024-08-08 19:07:09 +02:00
smallmodel
d809975882
Use Q_snprintf because itoa is non-standard 2024-08-07 22:27:02 +02:00
smallmodel
b463c905cf
Free up unused images
This fixes #93 where the game would hit `MAX_DRAWIMAGES` after loading a few maps
2024-08-07 21:11:16 +02:00
smallmodel
7f8a0c9931
Fix the image texture number not properly matching the image
It caused issues with textures being messed up sometimes, after multiple maps were loaded
2024-08-07 21:10:04 +02:00
smallmodel
7b59f07181
Allow precaching image manually with r_precacheimages 2024-08-07 20:01:38 +02:00
smallmodel
d22dea5e8e
Count renderer memory 2024-08-07 19:57:09 +02:00
smallmodel
1d60405eaa
Fix heap corruption when taking screenshots with non-standard resolutions like 1366x768 2024-08-05 19:48:23 +02:00
smallmodel
1d4fe357c8
Fix ShaderForShaderNum incorrectly swapping the shader num 2024-07-29 21:39:24 +02:00
smallmodel
c7900b6048
Fix static model index endianness 2024-07-29 21:13:18 +02:00
smallmodel
6e3f959684
Fix header version incorrectly parsed 2024-07-29 20:32:21 +02:00
smallmodel
eb9a3b1bbf
R_UnpackTerraPatch: no need to get little-endian values as values are already swapped by R_SwapTerraPatch
See #332
2024-07-29 19:04:29 +02:00
smallmodel
391450f090
Swap bsp header on big-endian architectures
See #332 where the lump's offset and length are incorrect on big-endian architectures
2024-07-29 19:03:26 +02:00
smallmodel
60e4fa7005
Handle shader picmip and fix shaders not rendered properly with force32bit (alpha channel was ignored) 2024-07-28 19:25:24 +02:00
smallmodel
c13f9dc9a8
Increase MAX_IMAGE_ANIMATIONS
This fixes emitters not playing correctly
2024-07-28 19:12:08 +02:00
smallmodel
f213943b2d
Fix RB_SetGL2D 2024-07-28 19:02:06 +02:00
smallmodel
5159a534bb
Fix animated images playing at the same time for all entities 2024-07-28 19:01:34 +02:00
smallmodel
89eae68318
Fixed parameter mistake
(Why didn't you tell anything about that, MSVC?)
2024-07-20 22:09:03 +02:00
smallmodel
fc0a995c66
Added code to save image with custom resolution to a file 2024-07-20 16:04:04 +02:00
smallmodel
d6571820fe
Fixes g_pVert/g_pTris being freed even when they are NULL 2024-07-02 18:46:27 +02:00
smallmodel
87baa69d7c
Fixes incorrect lighting color normalization
This fixes #314 where mark colors would have their values warped back to 0, making holes blue
2024-07-01 00:20:33 +02:00
smallmodel
d709dda87a
Use shader's distance range instead of the portal range 2024-06-30 23:57:32 +02:00
smallmodel
d9dc34f06d
Checks for AGEN_TIKI_DIST_FADE and AGEN_ONE_MINUS_TIKI_DIST_FADE for static models 2024-06-21 22:02:59 +02:00
smallmodel
907ff36018
Fixes r_showstaticbboxes freezing the game 2024-06-21 21:49:13 +02:00
smallmodel
64626a767c
Fixes entities not being rendered after number 1023
This fixes #310 where some static models would not be rendered, making it look like there are invisible walls.
2024-06-21 21:48:55 +02:00
smallmodel
a7df73073d
Adds a condition to check if static model poly can be rendered 2024-06-21 20:54:14 +02:00
smallmodel
ca4b1ebdee
Don't render terrain when refdef.render_terrain is set to false 2024-06-11 23:37:45 +02:00
smallmodel
42c20ac008
Portal sky mustn't cause entity surface to be r-eadded
This fixes an issue where an entity would get re-added with a really lower LOD. Fixes #307
2024-06-11 23:35:18 +02:00
smallmodel
4d231fbc50
Call LocalChannel instead of GetLocalFromGlobal 2024-06-11 00:05:28 +02:00
smallmodel
28c6e3b398
Properly swap terrain patches for rendering on big-endian architectures 2024-06-08 12:48:36 +02:00
smallmodel
74ccb03e54
Reduced compilation warnings 2024-06-07 20:34:13 +02:00