Commit Graph

95 Commits

Author SHA1 Message Date
Flyinghead 125c1ff37d gles: use int for palette_index uniform to avoid precision issues
Issue #104
2020-07-31 12:16:10 +02:00
Flyinghead 7449230af8 handle some palette textures on the GPU
get rid of PixerPacker templates
no need for GLSL precision qualifier in GL4
2020-07-08 18:17:15 +02:00
Flyinghead fec79624df gl/gl4: simplify clipping. share code with vulkan 2020-05-11 16:11:31 +02:00
scribam a155282fd0 Cleanup compiler warnings (mostly sign-compare) 2020-03-30 23:00:43 +02:00
scribam e99aac3575 Remove "using namespace std;" 2020-03-30 23:00:43 +02:00
scribam 4bf6802855 Cleanup include headers 2020-03-29 14:26:21 +02:00
Flyinghead 54261b69c9 renderer: handle mipmap D-adjust param (convert to lod bias) 2020-03-18 18:51:34 +01:00
Flyinghead a5171a1d09 gl,gl4: don't use GL_NEAREST_MIPMAP_LINEAR if tex isn't mipmapped
fixes black grass in Virtua Striker 2
2020-03-10 15:32:17 +01:00
Flyinghead 5b644cf1ca gl: switch to GL_NEAREST_MIPMAP_LINEAR for mipmapped textures 2020-03-09 23:29:02 +01:00
Flyinghead ff69efff48 ignore trilinear filtering if texture isn't mipmapped
fixes shenmue snowflakes color
2020-01-21 19:52:09 +01:00
Flyinghead f7655091b0 gl4: only use per-pixel sorting when needed
if not using autosort, there's no need to use per-pixel sorting
fixes issues with Psyvariar2 and HeadHunter
2020-01-05 20:44:39 +01:00
Flyinghead be50fca2d6 gl: (oit) Far plane is 0 in final depth test. minor gl cache reset fix
other misc changes
2019-12-25 13:05:42 +01:00
Flyinghead 5d6ac0acbb gl: const everything 2019-10-25 22:47:20 +02:00
Flyinghead 2f363a7355 Merge remote-tracking branch 'origin/fh/gl-scale-mat' into fh/vulkan
# Conflicts:
#	core/rend/TexCache.h
#	core/rend/gl4/gles.cpp
#	core/rend/gles/gles.cpp
#	core/rend/gles/gles.h
#	shell/apple/emulator-osx/reicast-osx.xcodeproj/project.pbxproj
2019-10-21 19:49:53 +02:00
Flyinghead 2a89874812 decouple imgui from gles renderer 2019-10-19 18:34:24 +02:00
Flyinghead 2bac2afe98 gles: fix depth issue when drawing quads on gles2
Fix Gunlord black screen on GLES 2
2019-10-12 13:48:41 +02:00
Flyinghead 8202ac420b pvr,rend: more refactoring out of gles. Change texture id to 64b 2019-10-04 13:33:08 +02:00
Flyinghead 24b973f763 rend: refactor texture cache and poly/triangle sorters out of gles 2019-10-04 12:22:18 +02:00
Flyinghead 219a001631 pvr: eliminate empty polygons and render passes
initialize sprite face base & offset colors to white
never join TR poly strips
re-enable depth after mod vols
2019-09-25 23:28:53 +02:00
Flyinghead 334211f3a0 gl: build fix 2019-09-25 15:44:21 +02:00
Flyinghead 3fd3e097ac gl: fix modvol issue introduced by 8792c06 2019-09-25 13:54:38 +02:00
Flyinghead 8792c06adc gl4: use same depth direction as gles. Round scale_y value. 2019-09-17 13:35:23 +02:00
Flyinghead 8b949e1dca Get rid of time_sync timer. Clean-up 2019-09-11 15:09:23 +02:00
scribam 49b7e0682b Cleanup 2019-09-07 20:36:13 +02:00
Flyinghead 93e009bf1a gl: use matrices for ndc and viewport calculations
Support VO_STARTX and VO_STARTY for shifting displayed frame
Add glm to deps
Calculate NDC, scissoring and viewport matrices once
Reduce code duplication
2019-08-12 19:56:44 +02:00
Flyinghead 1a019b79b0 GL: blending support for punch-through polys
Disable trilinear filtering for PTs
PT alpha test should be done after color+tex shading according to documentation
2019-08-09 12:05:56 +02:00
Flyinghead 632aa95c2d gl4: depth test issue in non-autosort mode
Depth testing is done in the fragment shader so it shouldn't be done
in the a-buffer shader for the first pixel, or until the depth is updated.
Fixes flashlight and lightstorm effects in Alone in the Dark
2019-07-09 15:25:15 +02:00
Flyinghead 9eef02a1e8 pvr: ignore Z Write Disable for punch-through polys?
tentative fix for Worms World Party
2019-07-07 22:13:43 +02:00
Flyinghead 2c8094f987 renderer,sdl: use new logging 2019-07-01 17:41:15 +02:00
Flyinghead d55d803c16 gles2 build fix 2019-05-21 19:11:47 +02:00
Flyinghead 433590b610 rend: Add per-strip TR sort option 2019-05-21 11:24:03 +02:00
Flyinghead d9f2f9ae1d rend: define GLES2 and GLES3
GLES2 will only use GL ES 2.0 API functions, compile-time linked
GLES3 loads functions dynamically and supports both GL ES 2.0 and 3.0
2019-05-15 12:54:03 +02:00
Flyinghead 0dd555c5c8 Merge branch 'master' into fh/gles-dynload 2019-05-15 11:49:57 +02:00
Flyinghead 0445542ec2 gl: 90deg screen rotation option. Fix scissor/clip wrt scale/stretch
90deg CC screen rotation option for some arcade games
Fix scissoring and clipping when screen scaling/stretching/rotating
Clear shader cache when screen rotation changes
Properly delete all gl programs and shaders when needed
2019-04-09 15:18:48 +02:00
Flyinghead 47bb509f02 Add horizontal screen stretching option
fix scissor test when scaling/stretching
fix infiniloop when starting a game fails
2019-04-08 00:21:06 +02:00
Flyinghead ec95c95b89 add option to disable fog effects 2019-04-04 19:26:15 +02:00
Flyinghead 994d52e012 gl: put shaders in a map and set uniforms once for all before each frame 2019-04-04 19:08:21 +02:00
Flyinghead 125cccaa5a gles: only use GLES3 functions on android 2019-04-04 08:10:32 +00:00
Flyinghead 54e9dc8338 Do not scale clipping values with rtt-upscale if rendering to vram
Enable RTT-to-vram for Flag to Flag (rear view mirrors)
2019-03-08 20:06:17 +01:00
Flyinghead 054b4662fd getting rid of `#ifdef GLES` to use the same code for all envs
Added latest GL 4.6 header files
2019-02-19 21:40:21 +01:00
Flyinghead 9526fada5e Added RenderLastFrame() to Renderer interface
implement screen scaling for per-pixel renderer
fix output FBO not being freed/recreated when GL context is reset
refactor DrawQuad on per-pixel renderer
2019-02-19 11:36:59 +01:00
Flyinghead 810182c4fe Scale down native resolution setting 2019-02-19 00:49:24 +01:00
Flyinghead e2c839dde3 GLES: detect gl extensions and use packed depth/stencil buffer for RTT 2019-02-18 17:42:07 +01:00
Flyinghead edba937b6f Save last rendered frame if gl driver doesn't preserve the swap buffers
Fixes flashing screen with nvidia shield when no frame is rendered
2019-02-14 12:40:17 +01:00
Flyinghead 655d36a719 Convert vertex indices to u16 wih GLES2
GLES2 doesn't support 32-bit indexes so convert them to u16 when needed
2018-12-13 22:26:25 +01:00
Flyinghead 5664bfb9b6 pvr: use u32 for vertex indices to avoid overflow
Fixes alpilot glitches
2018-12-13 10:57:51 +01:00
Flyinghead 2ef90152c9 GL: add #if in shader for trilinear filtering 2018-11-23 22:33:51 +01:00
Flyinghead 0260b00c00 Less code dup 2018-10-04 12:32:26 +02:00
flyinghead ef5e8593fa GL4: Initialize atomic buffer correctly. Limit size of pixel buffer.
SetupMainVBO should be static
2018-10-04 10:58:33 +02:00
Flyinghead 2a8591798f Only clamp color if tsp.ColorClamp is set. Thanks p1pkin 2018-09-12 17:50:42 +02:00