Zack Middleton
98b9008c0d
OpenGL2: Use CPU vertex animation if too few vertex attributes
...
OpenGL ES has a minimum of 8 vertex attributes while desktop OpenGL has
a minimum of 16. Vertex animation uses attributes 10 to 12.
2024-06-05 21:36:48 -05:00
Zack Middleton
3b984d2b51
OpenGL2: Add OpenGL ES 2.0+ support
...
This mainly targets OpenGL ES 2.0 but it also supports compiling GLSL as
ESSL 3.00. It's missing support for framebuffer objects which should be
possible on ES 2. (Though using renderbuffers instead of textures.)
opengl1 cvars that are not supported will display a message and disable
the cvar. This has not been reviewed for new opengl2 cvars. Enabling
cvars may cause rendering issues. Some of the broken cvars may be
possible to support using OpenGL ES 3 features.
The game displays okay with the default cvars.
2024-06-05 21:33:08 -05:00
Zack Middleton
93abc60a5b
OpenGL2: Fix applying tcMod turb
...
Shader stage tcMods for matrix and turb effects need to be applied in
order for turb to be correct and all tcMod turb need to be applied
instead of only the last one.
Quake 3's textures/liquids/slime1 had tcMod turb and then tcMod scale.
OpenGL2 applied the matrix first and then turb which had the wrong result.
2024-01-18 03:16:39 -05:00
James Canete
69ec389335
Add r_parallaxMapOffset.
2021-07-05 21:59:20 -07:00
James Canete
d068e1dce1
Add r_parallaxMapShadows.
2019-02-06 01:10:42 -08:00
James Canete
e5da13f146
OpenGL2: r_cubemapping 2 for box cubemap parallax.
2018-12-21 19:53:18 -08:00
Zack Middleton
11337c9fa2
OpenGL2: Add GPU vertex skinning for IQM models
...
Using GPU vertex skinning is significantly faster than CPU vertex
skinning. Especially since OpenGL2 has to run R_VaoPackNormal() and
R_VaoPackTangent() each vertex each frame which causes CPU vertex
skinning to be significantly slower than OpenGL1 renderer.
2018-07-27 17:40:25 -05:00
Zack Middleton
39e2113c73
OpenGL2: Misc fixes and cleanup
...
Fix two constants in GLSL shaders. Remove f suffix from float and fix
int to float assignment. They were causing shader compile errors in
OpenGL ES 2 context.
Remove disabling clip plane. Clip plane is unused and never enabled in
the opengl2 renderer. Remove disabling it to avoid causing a GL error
when using OpenGL 3.2 core profile or OpenGL ES.
Make VAO cache vertex stride be size of srfVert_t since that is what
is uploaded to the GPU. No behavior change. There is a disabled debug
id in srfVert_t though which if enabled changes srfVert_t size.
2018-07-20 23:40:35 -05:00
SmileTheory
c0c45d325d
OpenGL2: Readd r_deluxeSpecular.
...
https://github.com/ioquake/ioq3/issues/369
2018-05-14 18:30:59 -07:00
SmileTheory
a4c09236b1
OpenGL2: Remove GLSL_ValidateProgram().
...
https://stackoverflow.com/questions/39761456/why-does-glvalidateprogram-fail-when-no-vao-is-bound
2017-07-13 12:10:09 -07:00
SmileTheory
d549b642bc
OpenGL2: Use an OpenGL 3.2 core context if available.
2017-07-13 12:03:10 -07:00
SmileTheory
468da0fabc
OpenGL2: Generate less shaders when r_sunlightMode is disabled.
...
Original patch by https://github.com/inolen in https://github.com/ioquake/ioq3/pull/36
2017-01-26 19:58:28 -08:00
SmileTheory
aa79738c50
OpenGL2: Store vertex colors and hdr lightmaps/lightgrid as RGBA16.
2016-10-11 03:28:20 -07:00
SmileTheory
8749d62bbd
OpenGL2: Remove per fragment tangent space calculation code.
2016-09-14 03:57:51 -07:00
SmileTheory
5252e28163
OpenGL2: Fix shader error logs.
2016-08-04 20:16:22 -07:00
SmileTheory
29ac117154
OpenGL2: Let unlit materials use parallax maps.
2016-07-29 01:53:50 -07:00
SmileTheory
e022abeebb
OpenGL2: Fix GL_EXT_direct_state_access function names.
2016-07-28 20:04:25 -07:00
SmileTheory
251c983681
OpenGL2: Require OpenGL 2.0.
2016-07-24 21:29:13 -07:00
SmileTheory
a40588c8b9
OpenGL2: Set cubemap mip selection to match output from ggxcc.
2016-06-08 03:36:15 -07:00
SmileTheory
1f6703821f
OpenGL2: Some FBO cleanup, and add non-depth blur to blur shader.
2016-04-05 02:37:05 -07:00
SmileTheory
5738d09969
OpenGL2: Add r_glossType.
2016-03-07 03:30:16 -08:00
SmileTheory
ad952b9537
OpenGL2: Merge several cvars into r_pbr.
...
r_glossIsRoughness, r_specularIsMetallic, r_framebufferGamma, r_tonemapGamma, r_materialGamma, r_lightGamma
2016-02-01 21:37:23 -08:00
SmileTheory
f70e9dac01
OpenGL2: Direct state access, part 2: Uniforms.
2016-01-18 23:30:36 -08:00
SmileTheory
cbfc3471bc
OpenGL2: Switch to RGTC from LATC for normal maps.
...
Also added a RGTC compressor as a workaround on Intel graphics.
2015-12-15 03:23:55 -08:00
SmileTheory
b52ede0445
OpenGL2: Add r_glossIsRoughness.
2015-12-08 21:23:50 -08:00
SmileTheory
e5aabdaff6
OpenGL2: Remove some rendering options for simplicity.
2015-12-03 02:44:33 -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
3765652778
OpenGL2: Fix corrupt models.
2014-10-23 16:51:10 -07:00
SmileTheory
541d3a40c2
OpenGL2: Interleave vertex data for static MD3s.
2014-10-15 03:42:29 -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
Zack Middleton
4529f124d6
Merge pull request #29 from inolen/shader_tidying
...
misc shader fixes
2014-09-09 19:18:59 -05: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
4fe69cb418
OpenGL2: Remove sRGB support, replace with gamma cvars.
2014-04-16 05:26:03 -07:00
SmileTheory
375f6247d4
OpenGL2: Parallax corrected cubemap (cheaper trick)
2014-03-16 16:29:38 -07:00
SmileTheory
ee67d0a981
OpenGL2: Add normalScale and parallaxDepth stage keywords and helper cvars.
2014-03-03 21:02:39 -08:00
SmileTheory
5fabc28dff
OpenGL2: Fix rendering when r_hdr = 0 and r_floatLightmap = 1
2014-02-14 22:41:25 -08:00
Anthony Pesch
3603102088
don't call va each frame in GLSL_VertexAttribPointers
2014-01-14 13:19:15 -08:00
Anthony Pesch
25bde423b5
fixed formatting of a few GLSL float constants
...
remove unneeded version number from texturecolor shader
call GLSL_VertexAttribPointers after attribute arrays have been enabled
2014-01-11 17:43:19 -08:00
SmileTheory
f6f3a19f73
OpenGL2: Support GL_ARB_vertex_type_2_10_10_10_rev for normals/tangents/lightdirs
2013-12-09 17:33:54 -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
SmileTheory
6e5f8cc918
OpenGL2: Calculate bitangent in shader, and store normal/tangent as normalized byte arrays.
2013-11-12 19:21:51 -08:00
SmileTheory
3846c115e6
OpenGL2: Reduce glsl shader count by using a uniform to disable textures.
2013-11-03 19:34:22 -08: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
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