Commit Graph

253 Commits

Author SHA1 Message Date
SmileTheory 6f3edb20b8 #6069: Remove md4 model support. 2013-11-29 16:13:47 -08:00
Zack Middleton ad514c9689 Merge branch 'master' into sdl2 2013-11-26 16:57:10 -06:00
Zack Middleton 2044bcb12d Silence warnings about unused static functions in opengl2 2013-11-25 15:27:09 -06:00
Zack Middleton 8af9516e88 End current draw surface before drawing cinematic
Fixes drawing StretchPic *before* CIN_DrawCinematic resulting
in cinematic being drawn before the StretchPic.
2013-11-20 21:37:17 -06:00
SmileTheory d63d7ba6bf OpenGL2: Use RGBA16F format for HDR.
RGB16F is not 4-byte aligned and not supported by certain hardware.
2013-11-20 00:48:18 -08:00
SmileTheory e686010d73 #6059: OpenGL2: Read depths from resolve fbo when msaa is on in RB_TestFlare(). 2013-11-20 00:45:08 -08:00
SmileTheory c350963bf2 OpenGL2: Match glsl data type names: matrix_t -> mat4_t, vec*i_t -> ivec*_t 2013-11-19 03:23:50 -08:00
Zack Middleton 3736968943 Merge branch 'master' into sdl2 2013-11-17 19:01:35 -06:00
SmileTheory 6e5f8cc918 OpenGL2: Calculate bitangent in shader, and store normal/tangent as normalized byte arrays. 2013-11-12 19:21:51 -08:00
Zack Middleton a53e7c3074 Fix comparing unsigned values to < 0 in gl2 2013-11-11 01:12:42 -06:00
Zack Middleton d526eacd10 Fix flares being invisible after vid_restart
flareCoeff was only set if r_flareCoeff cvar was set as modified.
Cvars are set as modified when created or changed.
2013-11-09 16:57:58 -06:00
SmileTheory ae57eebf52 Merge branch 'glindex_size_fixes' of https://github.com/inolen/ioq3 into inolen-glindex_size_fixes 2013-11-08 22:19:32 -08:00
SmileTheory ef9fe17dd5 OpenGL2: Remove srfTriangle_t, and use glIndex_t instead. 2013-11-08 01:46:17 -08:00
SmileTheory d295db747c OpenGL2: Small optimizations and comments in world VBO creation and surface merging. 2013-11-07 04:03:52 -08:00
SmileTheory 7672533e8f OpenGL2: Prefer VBO/IBO sizes of around 4MB. 2013-11-05 20:07:10 -08:00
SmileTheory 8c3ae8d7d2 OpenGL2: Reimplement soft overbright to avoid a framebuffer blit. 2013-11-05 00:08:59 -08:00
SmileTheory a7c5fc0ee7 OpenGL2: Some small shader optimizations. 2013-11-04 22:50:53 -08:00
SmileTheory 0e25d0357b OpenGL2: Revisit fragment tangent space calculation, and remove tangent space lighting. 2013-11-04 21:53:05 -08:00
SmileTheory 3846c115e6 OpenGL2: Reduce glsl shader count by using a uniform to disable textures. 2013-11-03 19:34:22 -08:00
Tim Angus 779ebfacfd Merge branch 'master' into sdl2 2013-11-02 19:12:52 +00:00
Zack Middleton ae0e09aba9 Remove vertexLightmap from textureBundle_t, it's never qtrue 2013-11-02 02:59:31 -05:00
Zack Middleton 6bd52de44e Remove unused shader state code from tr_local.h 2013-11-02 02:35:59 -05:00
Zack Middleton 0f30dad10a Merge last two commits into renderergl2 2013-10-29 23:22:02 -05:00
Zack Middleton c28fabf505 IQM int/float vertex arrays were already swapped 2013-10-29 23:07:15 -05:00
Zack Middleton 0bf1f3d0ba Add support for IQM int blend indices and float blend weights
Integer blend indices are converted to bytes at load, ioq3 doesn't allow more than 128 joints.

Heavily based on code by @zippers.
2013-10-29 22:09:06 -05:00
Zack Middleton 1515841b38 Support IQMs with joints and no poses 2013-10-29 20:47:33 -05:00
SmileTheory 535d0ea70e OpenGL2: Merge bsp surface structs into a single struct, and more cleanup. 2013-10-15 01:19:16 -07:00
SmileTheory 01efe4a538 OpenGL2: Use an idea from ETXreal and separate world VBO into separate VBOs by shader. 2013-10-14 03:58:13 -07:00
SmileTheory 08fcecc829 OpenGL2: Clean up texmod calculations, and improve vertex animation handling. 2013-10-14 01:55:54 -07:00
SmileTheory f8355ba2fb OpenGL2: Fix TCGEN_ENVIRONMENT stages not rendering correctly. 2013-10-10 03:41:31 -07:00
Zack Middleton e4227d1cd5 Revert "5097 - Menu corrupted on start (on IRIX)"
Calling glClear( any bits ) in GL_SetDefaultState makes connect screen black using the proprietary NVidia driver on Windows and GNU/Linux.

This reverts commit 92573270de.
2013-10-08 08:01:00 -05:00
SmileTheory c6774cf113 OpenGL2: default to RGBM lightmap, and add r_floatLightmap for old behaviour. 2013-10-07 01:46:50 -07:00
SmileTheory acbeca6042 OpenGL2: Remove AGEN_FRESNEL(superceded by cubemap patch), and some small fixes and optimizations. 2013-09-24 03:29:49 -07:00
SmileTheory 82be4e667f OpenGL2: Disable GL_ARB_seamless_cube_map by default, caused huge frame drops on some hardware 2013-09-20 17:20:36 -07:00
SmileTheory 3ab895d1cd OpenGL2: reduce varying usage in lightall shader. 2013-09-17 23:52:40 -07:00
SmileTheory cbd05da5d1 OpenGL2: Fix for "unsupported framebuffer format" bug 2013-09-17 15:33:46 -07:00
SmileTheory 42501db862 OpenGL2: Some shader cleanup 2013-09-16 23:41:04 -07:00
SmileTheory 5985cca2e6 OpenGL2: Speed up fog shader slightly. 2013-09-16 23:20:44 -07:00
Tim Angus 76e49b668e Merge branch 'master' into sdl2 2013-09-16 22:34:51 +01:00
SmileTheory a408a2bdae OpenGL2: Fix inaccurate RGBM calculation. 2013-09-16 14:26:42 -07:00
SmileTheory e80faf812e OpenGL2: Use RGBM instead of RGBE encoding for lightmaps. 2013-09-16 05:57:14 -07:00
SmileTheory 7e875c6941 #5979: Cubemap support for opengl2. 2013-09-16 00:54:26 -07:00
Zack Middleton 27ddba9c2e Fix crash caused by too many surfaces in skin 2013-09-04 20:36:45 -05:00
SmileTheory 311376af8a Fix upside-down SSAO. 2013-08-23 01:51:58 -07:00
SmileTheory d46916082d #5999: OpenGL2: Don't use lightall shader with deforms or adjustColorsForFog. 2013-08-23 01:35:17 -07:00
SmileTheory ebd164deaf #6004: OpenGL2: Make any CGEN_LIGHTING_DIFFUSE stages use lightall shader. 2013-08-23 00:55:28 -07:00
Tim Angus bde7665462 Merge branch 'master' into sdl2
Conflicts:
	code/sdl/sdl_input.c
2013-08-16 23:34:08 +01:00
Henry Stratmann III db85b61e94 Add assignment below declarations otherwise compiling fails with msvc
Signed-off-by: Zack Middleton <zturtleman@gmail.com>
2013-07-21 19:15:24 -05:00
Anthony Pesch b0f0376a4f Misc fixes to IBO code to correctly use sizeof(glIndex_t) 2013-07-19 14:16:49 -07:00
Zack Middleton d79fe65878 Fix r_mergeLightmaps 0 crashing OpenGL2 renderer
tr.fatLightmapStep was 0 and caused modulus division by 0.
2013-06-20 21:56:04 -05:00
Zack Middleton 872465500e Fix r_nocurves in OpenGL2 renderer
Check r_nocurves in surface cull.
While r_nocurves is enabled, don't use merged surfaces because merged curves would be renderer. (note: surface merging is enabled by r_mergeLeafSurfaces)
2013-06-20 16:27:00 -05:00
Zack Middleton 323e8b9921 Fix r_speeds 4 in OpenGL2 renderer 2013-06-20 16:21:26 -05:00
Zack Middleton aa2ea68741 Fix IQM tess buffer overflow
Set the variables that use tess.numVertexes after calling RB_CHECKOVERFLOW() as it may set tess.numVertexes to 0!

Could cause visual issues and error "RB_EndSurface() - SHADER_MAX_VERTEXES hit".
2013-06-18 18:00:45 -05:00
Zack Middleton cb2fa48d65 Only allow model meshes to have SHADER_MAX_VERTEXES - 1 vertexes
The last index is used to check for buffer overflows. See RB_CheckOverflow and RB_EndSurface.
2013-06-18 17:02:47 -05:00
Zack Middleton 00c1831edb Don't try to fog flares with fogNum 0
fogNum 0 means no fog. Shaders don't try to apply fog color if fogNum is 0.

This was done to make things more consistent and fix a crash in iortcw MP using a user made map on GNU/Linux x86_64.
2013-06-11 15:47:00 -05:00
Zack Middleton d4f785c465 Improve warning for shader missing opening brace 2013-06-02 21:59:01 -05:00
Zack Middleton 3ec2b02dce Check for shaders without closing brace
Shaders without closing brace can eat shaders in other files.
Pass depth to SkipBracedSection instead of reparsing text as it messed up parse line numbers.
2013-06-02 21:55:19 -05:00
Zack Middleton 6c4d010f29 Fix null model axis disappearing if sky is in view 2013-05-31 01:07:49 -05:00
Zack Middleton eb73dcb7f4 Catch more bad shader syntax cases
Use to only ignore file in cases where both { and \0 were missing after shader name. Now ignore file when either are missing, such as "}\0".
2013-05-30 22:58:58 -05:00
/dev/humancontroller 9d626b6a12 drop some useless return statements 2013-05-30 15:43:21 -05:00
/dev/humancontroller bbd17d75ce reduce the amount of compiler warnings for variable shadowing 2013-05-30 15:43:20 -05:00
/dev/humancontroller 2d54a12615 fix some "\n"-related stuff
add missing "\n"s to some Printf()-like calls (in Rend2)
drop erroneous "\n"s from some Error()-like calls (in Rend2)
drop erroneous "\n" from a Com_Error() call (in vm_sparc.c)
2013-05-30 15:32:44 -05:00
Tim Angus 242dcf9cf8 Suppress warning 2013-05-29 14:24:09 +01:00
Zack Middleton d5b046186a Clarify comment for OpenGL2's RDF_NOFOG 2013-05-24 13:16:56 -05:00
Zack Middleton 71b804a096 Remove RF_SUNFLARE from OpenGL2 renderer
RF_SUNFLARE didn't do anything after commit "Merge Reaction renderer features, remove "#ifdef REACTION"s".
2013-05-24 12:26:45 -05:00
Ensiform 53bbfc2cd6 Remove unused renderCommandList variable from renderers 2013-05-13 12:08:16 -05:00
Tim Angus d9d52f0306 Merge branch 'master' into sdl2
Conflicts:
	Makefile
	code/renderercommon/qgl.h
	code/renderergl1/tr_local.h
	code/sdl/sdl_glimp.c
2013-05-08 14:27:15 +01:00
Zack Middleton ee7bd0cae6 Show surface names in excessive vertexes and triangles warnings
Add newlines to renderergl2's R_LoadMD3 vertex and triangle warnings.
2013-05-03 14:28:18 -05:00
SmileTheory 3a47192ba8 Use specular texture RGB as specular reflectance, multiplied by per-material value. 2013-05-03 00:32:59 -07:00
SmileTheory aff3f18101 #5889: Do post-processing only on viewport portion of frame buffer. 2013-04-26 18:49:48 -07:00
SmileTheory 8270d54a25 Don't scale shadow multipliers by overbrightbits, and improve documentation. 2013-04-22 21:52:16 -07:00
Zack Middleton 319df2d4d7 Fix zone memory leak in OpenGL2 renderer
meminfo command showed the dynamic renderer zone amount going up by 1824 bytes each time I reloaded map using map command.
2013-04-10 23:21:40 -05:00
SmileTheory 6a763f0671 Merge branch 'HEAD' of https://github.com/ioquake/ioq3.git into suntest 2013-04-02 00:18:24 -07:00
SmileTheory 28e14c4546 Add sunlight/lightmap merging by multiply (r_sunlightMode 1)
Merge additive sunlight and map lighting into one GLSL shader (r_sunlightMode 2)
Change single lightmap blends to use lightall
2013-04-02 00:17:24 -07:00
Tim Angus 98360bcd57 Fix some of the things clang --analyze flagged 2013-03-26 16:50:03 +00:00
SmileTheory 66acde6d60 Merge branch 'HEAD' of https://github.com/ioquake/ioq3.git into suntest 2013-03-25 21:05:27 -07:00
Zachary Slater 01efc26654 s/enum/typedef enum/g on uniform_t for glorious fix of mac build. h/t MAN-AT-ARMS 2013-03-25 14:28:01 -07:00
SmileTheory 8b23985358 Make all GLSL shaders use the same set of uniforms. 2013-03-20 22:53:30 -07:00
Zack Middleton 98dda7758f Always initialize joint_names in R_LoadIQM
Reported by MAN-AT-ARMS
2013-03-18 15:55:25 -05:00
Zack Middleton bf962c516d Fix loading and rendering IQMs with no joints 2013-03-18 14:13:09 -05:00
Tim Angus ecd50f01c2 Remove RAVENMD4 #define 2013-03-18 19:05:51 +00:00
SmileTheory e14a814ba2 Support more tcgens in lightall shader. 2013-03-14 23:11:27 -07:00
SmileTheory 9eef320c91 Remove some more automatic sRGB image flags. 2013-03-12 22:00:51 -07:00
Tim Angus bf25c27105 Oops missed a bit 2013-03-12 21:20:33 +00:00
Tim Angus 3e92679100 Fix USE_FREETYPE breakage 2013-03-12 19:41:52 +00:00
Tim Angus 37c69a8009 Move renderers a bit closer together 2013-03-12 17:52:29 +00:00
SmileTheory 41985945f6 Always reset vertex attrib pointers with animated meshes. 2013-03-11 22:46:21 -07:00
Zack Middleton 89ee8b050f Fix size reserved for IQM jointMats (allocated more than used) 2013-03-08 15:28:27 -06:00
Zack Middleton 8aa6efe7b6 Fix origin returned by IQM's LerpTag
It use to return pose joint's offset from base at the lerped frame, now it returns the joint's origin at the lerped frame.

Patch by Axel Isouard and Zack Middleton.
2013-03-08 13:47:16 -06:00
SmileTheory e6e0d47099 Fix clampmapped images being always treated as sRGB. 2013-03-07 14:23:28 -08:00
SmileTheory fb6b08bdd6 Merge branch 'HEAD' of https://github.com/ioquake/ioq3.git 2013-03-06 21:00:21 -08:00
Zack Middleton a737d442a0 Fix RAVENMD4 warnings in OpenGL2 2013-03-06 17:52:06 -06:00
SmileTheory fbe56e4fa1 Some minor cleanup. 2013-03-06 02:02:01 -08:00
SmileTheory 027af8e6cc Simplify RE_StretchRaw() with RE_UploadCinematic() and RB_InstantQuad2(). 2013-03-06 00:54:56 -08:00
SmileTheory 11e83b2ee3 Oops, fix typo. 2013-03-05 20:21:03 -08:00
SmileTheory 7c04002b87 Simplify previous patch. 2013-03-05 19:52:11 -08:00
SmileTheory 2153fc4671 Calculate viewport and screen texture coordinates correctly for sun shadows. This fixes part of #5889. 2013-03-05 01:41:51 -08:00
Zack Middleton c7059fbf28 Move noise function declations to tr_common.h
tr_noise.c is in renderercommon directory, so declare them in header there too.
2013-02-27 15:35:02 -06:00
Tim Angus d201443350 Remove a few name tags 2013-02-16 21:03:56 +00:00
Tim Angus 2da0fd6de8 Add renderercommon/tr_common.h 2013-02-16 20:58:04 +00:00
Tim Angus 93e6183ce3 Move some things into renderercommon 2013-02-16 12:15:36 +00:00
Zack Middleton 92573270de 5097 - Menu corrupted on start (on IRIX) 2013-02-15 20:14:02 -06:00
Tim Angus f6fb9eb602 renderer -> renderergl1, rend2 -> renderergl2 2013-02-15 23:46:37 +00:00