Commit Graph

197 Commits

Author SHA1 Message Date
Zack Middleton 6557800707 Merge branch 'master' into game/eliteforce 2014-12-02 17:40:09 -06:00
SmileTheory 8c7fedb1fe OpenGL2: Fix face culling. 2014-11-30 21:50:33 -08:00
SmileTheory fd23249357 OpenGL2: Ensure tess VAO is bound before using it. 2014-11-21 16:12:53 -08:00
Zack Middleton c787cf3aef Fix stencil shadows not drawing if has 500 or more vertexes
Stencil shadow is not drawn if a mesh, or multiple meshes with the same
entity and shader, have more than 500 vertexes. The issue is caused by storing
the projected positions in the tess vertex buffer. Use a new array instead.
2014-11-16 21:21:30 -06:00
Zack Middleton d06deb41c8 Don't set fog image border color
GL1's R_CreateImage sets GL texture to 0 before it ends, so border color is not
applied to the fog image. GL_CLAMP is not used for fog image (in either renderer),
so it would presumably not be used even if applied to the fog image.
2014-11-16 14:59:09 -06:00
Zack Middleton 60d28722ef Remove unfinished OpenGL display list code
It seems unlikely anyone is going to do anything with this aside from stub
it out in OpenGLES ports.
2014-11-16 14:57:13 -06:00
Zack Middleton 22bcda018b Correct a few OpenGL variable types
Affectly no change for desktop OpenGL.
Use correct types for OpenGLES support.
2014-11-16 14:56:43 -06:00
SmileTheory 89b719ec8d OpenGL2: Bit more parallax optimization. 2014-11-14 01:12:41 -08:00
SmileTheory d9e2184c1a OpenGL2: Add support for parallax occlusion mapping. 2014-11-10 22:11:36 -08:00
SmileTheory b1821e303d OpenGL2: remove lightmap support from generic glsl shader.
This path was barely used and doing this compiles fewer shaders.
2014-11-10 21:59:37 -08:00
SmileTheory 1ad2b413ef Remove accidentally added increment. 2014-11-03 22:18:17 -08:00
SmileTheory 943259f6b4 OpenGL2: Support half floats for texcoords and vertex colors. 2014-11-03 19:10:35 -08:00
Zack Middleton 475e145d05 Fix holodeck doors fade out
Using the GL1 statebits in GL2 causes the doors to not fade not. Period.
In GL1 the items 'pop' into view after doors fade out completely.
Fix them both to fade out and blend over items.
2014-10-29 11:34:49 -05:00
Zack Middleton b7cd6b6088 Elite Force white space clean up
Also fixed some code to match ioq3 (a few comments, a printf, ..).
2014-10-29 10:13:12 -05:00
Zack Middleton ccd93c127b Port Elite Force renderer changes to OpenGL2
Appling the diff to renderergl2 mostly worked.

Had to change GLimp_HaveExtension to use GL_EXTENTIONS
directly because Elite Forces GL2 requires an extension that didn't fit in (the smaller than Q3)
glConfig.extensions_string.

Had to set ambientLight for RF_FULLBRIGHT, GL2 doesn't use ambientLightInt.

Made the RF_FORCE_ENT_ALPHA code change pStage->stateBits because the stateBits
are read a lot, whereas in GL1 it's done as an expression and passed to GL_State.
Copied from Spearmint.

There are a few issues; holodeck doors are missing and parts of light grid are black (???).
2014-10-29 09:00:23 -05:00
Zack Middleton 1ba9e7a45e Always use GL_Cull to change cull state
Manually changing cull state can cause later GL_Cull calls to not change
the cull state.
2014-10-29 01:32:50 -05:00
SmileTheory e488663e31 OpenGL2: Change normal/tangent vertex encoding. 2014-10-28 18:15:13 -07:00
SmileTheory 7e808f92d6 OpenGL2: Speed up tonemap shader. 2014-10-27 06:37:57 -07:00
SmileTheory 3765652778 OpenGL2: Fix corrupt models. 2014-10-23 16:51:10 -07:00
SmileTheory 4f5ebf8349 OpenGL2: Bit of multidraw optimization. 2014-10-16 00:32:20 -07:00
SmileTheory 03ac9649ea Fix a bug in previous commit. 2014-10-15 20:28:26 -07:00
SmileTheory e34972b110 OpenGL2: Fix missing surfaces with r_mergeMultidraws 2. 2014-10-15 20:00:54 -07:00
SmileTheory 541d3a40c2 OpenGL2: Interleave vertex data for static MD3s. 2014-10-15 03:42:29 -07:00
SmileTheory 05e07311ba OpenGL2: Fix invalid texture parameter. 2014-10-15 03:40:16 -07:00
SmileTheory 0578b70f38 OpenGL2: Reduce redundant GL calls. 2014-10-14 06:15:06 -07:00
SmileTheory 84206c8598 OpenGL2: Vertex array object support. 2014-10-14 01:50:44 -07:00
SmileTheory 873a02bd3c OpenGL2: VBO cleanup. 2014-10-13 21:57:06 -07:00
SmileTheory a90c17ac1b OpenGL2: Better BSP surface merging. 2014-10-07 04:17:01 -07:00
Zack Middleton 918eed9295 OpenGL2: Don't segfault if r_ext_multitexture is disabled 2014-09-29 01:02:13 -05:00
Zack Middleton a955d975b7 Add function for clearing global shader instead of duplicating the code 2014-09-27 01:35:35 -05:00
Zack Middleton 4529f124d6 Merge pull request #29 from inolen/shader_tidying
misc shader fixes
2014-09-09 19:18:59 -05:00
Tim Angus 7277d8d6e7 Fix more warnings 2014-09-01 13:03:06 +01:00
Tim Angus 6665ea4a49 Fix renderergl2 warnings 2014-09-01 11:35:49 +01:00
Zack Middleton c621589157 Fix 6155: OpenGL2: some shader stages remains visible through fog volumes
Fix CalcFog in generic_vp.glsl to fog fogged surfaces.
Now it's the same as CalcFog in fogpass_vp.glsl.

Fixes shaders that use adjustColorsForFog. Impact wallmarks, blood sprites, flame textures and so on.
2014-08-29 02:50:02 -05:00
Zack Middleton e742952db8 Port COM_ParseExt fixes to CommaParse 2014-08-28 20:34:05 -05:00
Zack Middleton f17f58705c Remove a numIboIndexes=0 that is not read from GL2 tr_bsp.c
numIboIndexes is set to 0 inside the loop for each surface. Does not need to be set before loop.
2014-08-27 20:47:45 -05:00
Zack Middleton e5f54c584a Fix incorrect rgbGen const reading uninitialized memory
If ParseVector fails, color isn't fully set.
2014-08-27 20:35:16 -05:00
Tim Angus cf7004ffb2 Fix OSX build 2014-08-25 12:03:10 -04:00
Tim Angus 2a3368481d Merge branch 'master' into sdl2
Conflicts:
	Makefile
	code/renderergl2/tr_image.c
2014-08-25 15:00:48 +01:00
Tim Angus 7d026177ad Fix assorted warnings 2014-08-25 14:48:49 +01:00
SmileTheory ca9eebb125 OpenGL2: Fix a glsl compile error on old hardware with r_shadowFilter 0. 2014-08-02 00:02:46 -07:00
SmileTheory ff1f093a0b OpenGL2: Remove R_MipMap() and R_MipMap2(), and fix gamma conversion in R_MipMapsRGB() 2014-08-01 23:57:26 -07:00
SmileTheory 2b2d696f12 OpenGL2: Add fourth cascade for sun shadows, and adjust sun shadow cvar defaults. 2014-07-31 21:01:57 -07:00
Zack Middleton 75cce50a9c Don't load external GLSL files by default
External GLSL should probably only be used for development testing,
not released products. The GLSL files are tied to the code, and the
code changes some what often.

Fixes using OpenArena 0.8.8 which has incompatible GLSL files in a pk3.
2014-07-25 23:57:53 -05:00
SmileTheory 3d01543e2c OpenGL2: Replace R_MipMapsRGB() with faster version. 2014-07-22 11:43:19 -07:00
Zack Middleton 95b241b8ba OpenGL2 don't try to dlight surfaces that had all dlights culled
In the renderers, dlightbits are never cleared from world surfaces.
The dlight image does not repeat, so if it draws on extra surfaces it's
not visible.

However if using a repeating image (tr.defaultImage instead of tr.dlightImage);

  * In OpenGL1 image is only drawn on surfaces close to dlight origin.
  * In OpenGL2 image is draw on surfaces clearly outside the dlight radius, including past non-dlighted surfaces.

It seems there was a similar issue with pshadowBits. So update surface
dlightBits even if 0, like already done for pshadowBits. This causes
only surfaces close to origin to be affected. (Though it is a little
farther than in OpenGL1.)

I have no idea why this isn't a problem in OpenGL1.
2014-06-10 21:34:31 -05:00
Zack Middleton 107cae63d6 Merge branch 'master' into sdl2
Conflicts:
	.travis.yml
2014-06-03 00:52:49 -05:00
Zack Middleton b12a9acf4d Merge branch 'master' (early part 2) into sdl2 2014-06-03 00:50:50 -05:00
SmileTheory 9efaf819dc OpenGL2: Really obvious optimization to previous commit. 2014-05-27 20:52:36 -07:00
SmileTheory 318d45cff5 OpenGL2: Reimplement MD3 tangent space calculation. 2014-05-27 18:20:12 -07:00