Commit graph

391 commits

Author SHA1 Message Date
smallmodel
f9d264058b
Use safe version of sprintf and strcpy 2024-09-20 23:08:53 +02:00
smallmodel
047a7bb949
Deprecate r_forceClampToEdge in favor of automatic detection
This avoids setting the variable manually to fix sky seams and weird graphical artifacts. Now, it's detected automatically
2024-09-19 21:00:22 +02:00
smallmodel
3e70a9fab8
Fix mistakes that lead to compilation errors 2024-09-19 19:19:58 +02:00
smallmodel
7c0f0672bd
Add r_vidmode1024 and r_vidmodemax so the display resolution can be changed in Spearhead and Breakthrough 2024-09-18 22:59:30 +02:00
smallmodel
f4c8b0c21f
Initialize the cube build info
This should fix lighting being too dark or incorrect in some places
2024-09-17 22:22:42 +02:00
smallmodel
bba7031f3d
Add more clarity to code 2024-09-17 22:20:20 +02:00
smallmodel
4785913e02
compare_light_intensities should compare intensity as integers directly 2024-09-17 21:31:50 +02:00
smallmodel
a6808d1f6a
Fix incorrect light color for point lights and spot lights, also handle negative point light intensity
This fixes lighting from sphere being computed incorrectly for entities, making entities often look black or having strange lighting color
2024-09-17 21:27:14 +02:00
smallmodel
7188e9832a
Fix leaf iteration 2024-09-17 20:51:00 +02:00
smallmodel
0cce0c81fb
Prevent world values from being overridden by entities 2024-09-17 20:32:39 +02:00
smallmodel
a60baa03e0
Add MAX_SPHERE_LIGHTS 2024-09-17 20:06:35 +02:00
smallmodel
b0c8dafb33
Correctly compute colors for static model in vertex lit texture 2024-09-17 20:02:37 +02:00
smallmodel
b672fc8b29
Add #if, #if_not and #else shader statements 2024-09-17 20:00:24 +02:00
smallmodel
eac69f659f
For dot/oneminusdot, shader needs normal 2024-09-17 20:00:00 +02:00
smallmodel
d9ab65154c
Fix incorrect lighting grid blend 2024-09-17 00:27:01 +02:00
smallmodel
c120aed8bb
Fix incorrect static model grid lighting 2024-09-16 22:11:58 +02:00
smallmodel
ecdbe3d959
Don't check lightmap for RB_StageIteratorVertexLitTextureUnfogged to be used 2024-09-16 22:01:04 +02:00
smallmodel
96d10fb8b0
Mark r_light_nolight as cheat 2024-09-16 20:50:02 +02:00
smallmodel
a72da9b73e
Fix incorrect terrain height for poly
This caused decals to float in the air when they were placed on the terrain
2024-09-15 23:49:42 +02:00
smallmodel
df53d35967
Fix real dynamic lighting algorithm for both terrain and patch
This fixes #356 where real dynamic lighting would look completely wrong, making it look like there are graphical artifacts on surfaces
2024-09-15 21:23:17 +02:00
smallmodel
e5e7421d3c
Fix terrain lightmap when there is a dynamic light map
This fixes terrain having a completely wrong lightmap texture coordinates for dynamic lighting
2024-09-15 21:21:38 +02:00
smallmodel
6ff25d00fc
Use lightmap offset for grid surface when a dlightmap is specified 2024-09-15 21:15:01 +02:00
smallmodel
4a5b0b3105
Fix y lightmap position when allocating a new lightmap block
See the issue with dynamic lights: #356
2024-09-15 19:39:22 +02:00
smallmodel
d05d964432
Fix NaN lmapStep for terrain patches 2024-09-15 19:34:25 +02:00
smallmodel
daa4a67b49
Reuse dlightmap in R_CheckDlightSurface and R_CheckDlightTerrain 2024-09-15 19:34:06 +02:00
smallmodel
9c0224911c
Reset the number of dynamic lights when calculating the real terrain lighting
This fixes a crash that can occur when there is only the terrain that can be lit with dlights
2024-09-15 12:02:05 +02:00
smallmodel
6fb9ab078e
Implement RE_DrawBackground_DrawPixels 2024-09-15 01:12:00 +02:00
smallmodel
d04a32920a
Fix an incorrect parameter value passed to FS_Read when reading the DCL file 2024-09-13 21:49:45 +02:00
smallmodel
792b676c11
Set the number of brush models
The level marks system depends on the number of brush models and leafs, having a number that doesn't match what was saved would cause a crash
2024-09-13 21:47:57 +02:00
smallmodel
b510452260
Remove useless comment 2024-09-12 23:48:46 +02:00
smallmodel
89b8d5a67b
Use source files in renderercommon 2024-09-12 23:46:13 +02:00
smallmodel
500e3a3b2c
Add support for JPEG screenshots 2024-09-12 23:33:39 +02:00
smallmodel
47e575ed9a
define USE_INTERNAL_JPEG for compatible JPEG struct size 2024-09-12 23:33:21 +02:00
smallmodel
eb899be95e
Implement RE_GetGraphicsInfo 2024-09-12 21:40:07 +02:00
smallmodel
6d993af419
Fix compiler warning 2024-09-12 21:09:07 +02:00
smallmodel
a136cccbe1
Implement R_CraterTerrain 2024-09-12 21:02:04 +02:00
smallmodel
2b43ebfca4
Add ter_crater command 2024-09-12 20:43:24 +02:00
smallmodel
06f4980ee1
Implement ghost textures with particles 2024-09-12 20:09:05 +02:00
smallmodel
6cdf5b7b7e
Process .gst files 2024-09-12 19:44:36 +02:00
smallmodel
117b9a5579
Add declarations for GHOST functions 2024-09-12 19:42:41 +02:00
smallmodel
9475be8f6f
Remove entityNumIndexes/staticModelNumIndexes from declaration as it causes compilation issue on some compilers 2024-09-11 23:41:47 +02:00
smallmodel
41ca1797f9
Implement basic GHOST methods and functions 2024-09-11 23:21:50 +02:00
smallmodel
735ffaf80b
Implement swipe 2024-09-11 19:57:45 +02:00
smallmodel
ed52d1c648
Implement R_FastDlightTerrain 2024-09-11 19:19:38 +02:00
smallmodel
78fa90c59b
Move RB_StaticMesh to tr_model.cpp for info world tris 2024-09-11 19:03:41 +02:00
smallmodel
548a3efe5a
Implement R_InfoWorldTris_f and R_PrintInfoWorldtris 2024-09-11 18:57:50 +02:00
smallmodel
18a12eeba3
Fix loop breaking instead of continuing 2024-09-11 18:51:05 +02:00
smallmodel
83d486ceeb
Add missing declarations 2024-09-11 18:48:47 +02:00
smallmodel
d898c0f995
Implement R_PrintInfoStaticModels 2024-09-11 18:45:17 +02:00
smallmodel
02faf6f8c1
Implement R_Sky_ChangeFrustum 2024-09-11 18:27:19 +02:00