Commit Graph

256 Commits

Author SHA1 Message Date
Flyinghead 4bce2bbbbf OSX wants GLSL 1.4 or later 2018-10-30 11:48:44 +01:00
Flyinghead 6177a5b33a Clear texture cache on exit 2018-10-29 18:02:47 +01:00
Flyinghead ffb72cd0b6 Texture-based fog table 2018-10-29 00:31:24 +01:00
Flyinghead 96157de639 Enable log2 depth at runtime when supported (GL, GLES 3)
Fix issues with pixel scaling and scissoring.
Wacky Races should not be playable.
2018-10-28 22:09:36 +01:00
Marcel Szewczyk f309a59fac Render to texture single pass implemented 2018-10-28 20:16:45 +01:00
Flyinghead 77fae1ef09 Backport changes from libretro 2018-10-05 15:07:30 +02:00
Flyinghead 124f920170 Backport GL 2.0 support from libretro core 2018-10-04 22:37:35 +02:00
Flyinghead 7203681202 Less code dup 2018-10-04 14:49:20 +02:00
Flyinghead b8ae998252 If GL4 renderer is not supported, fall back to default. Fix SDL GL init. 2018-10-04 13:37:45 +02:00
Flyinghead 1dfc9902b7 Share scale_x and scale_y between GL and GL4 renderers. Don't use
ShaderUniforms in OSD.
2018-10-04 12:03:00 +02:00
Flyinghead 3f791d6f04 Merge OIT renderer into master 2018-10-04 10:29:23 +02:00
Flyinghead 0627530e33 GL: avoid white lines on the screen sides due to rounding 2018-10-02 12:28:42 -04:00
Flyinghead 5d8d1bd107 GL: Partial redraws. OSD fixes
EGL: Request the surface to be preserved between two rendering
Clear the sides of the screen when not rendering widescreen.
Do not re-create GL resources multiple times (android)
2018-09-30 12:39:47 +02:00
Flyinghead 9de8379434 GL: clear gl framebuffer before drawing a direct FB write 2018-09-29 18:10:43 +02:00
Flyinghead 407a579bfc GL: take pixel scaling into account for OSD buttons and text coords
Fixes OSD with Wacky Races and JoJo's Bizarre Adventure
2018-09-29 14:48:18 +02:00
Flyinghead c49e6c17d0 gl: isinf() issues with GLES3. Use it with GL only
Fixes black screen in PSO and Sonic Adventure 2 on Android
2018-09-27 21:45:03 +02:00
Flyinghead 7ce4fccb37 Merge remote-tracking branch 'origin/master' into fh/mymaster 2018-09-20 17:28:41 +02:00
Flyinghead 663b77cee6 Fix OpenGL compile error with VMWare WS14 driver 2018-09-17 13:02:07 +02:00
Flyinghead 2a8591798f Only clamp color if tsp.ColorClamp is set. Thanks p1pkin 2018-09-12 17:50:42 +02:00
Flyinghead f202b3b143 Add new ExtraDepthScale setting to scale huge Z values.
Use 1e26 for Samurai Shodown 6 (NAOMI)
2018-09-04 18:37:59 +02:00
Flyinghead 228b40136f Only do color clamp when fog is on 2018-09-02 22:57:59 +02:00
Flyinghead 96e9bce0e0 (Fog) Color clamping support 2018-09-01 12:56:37 +02:00
Flyinghead e59d7eaf3d Direct framebuffer writes support 2018-08-26 16:58:10 +02:00
Ender's Games 75215ec0d1 Core: Address some obvious lgtm issues 2018-08-21 02:52:03 -04:00
Abandoned Cart 62837f4db0
Merge pull request #1235 from reicast/fh/alpha-pt-rounding-fix
Float math in alpha calculation causes some punch-through textures to…
2018-08-21 00:09:06 -04:00
Ender's Games 8d9d40dffc Core: Changes provided by Android NDK compiler 2018-08-19 01:54:15 -04:00
Flyinghead ffb25a470d Fix Wacky Races missing half screen 2018-08-17 18:33:24 +02:00
Flyinghead f3bbb06d8c GL: Missing float precision qualifier in Bump Map calc 2018-08-13 18:21:52 +02:00
Flyinghead c0c06ed8ff Renderer: select shader at runtime based on the GL context version
The GL renderer now detects the version of the current GL context and
compiles the shaders accordingly. Supports GLES2, GLES3 and desktop GL.
Android: use 8,8,8 framebuffer instead of 5,6,5. Requests a 8-bit
stencil buffer (modifier volumes)
2018-08-07 09:44:52 +02:00
Flyinghead fddf56c5a2 Fix TA overrun detection. Bump up verts to 2 MB, idx to 120K and TR
polys to 8K
2018-08-03 09:55:53 +02:00
Flyinghead 3a7a08f3fb Do not clear the framebuffer before rendering. Fix scissoring coords.
The framebuffer is cleared by the background plane using global clipping
coordinates. This allows multiple rendering to different locations on
the framebuffer.
Fixes flashing menus in Vanishing Point, loading screens in Test Drive
Le Mans and Vigilante 8.
Better rear view mirror in Metropolis Street Racer.
2018-08-02 17:20:18 +02:00
Flyinghead 31d8c1f091 Backport texture upscaling with xBRZ 2018-08-01 19:43:01 +02:00
Flyinghead 63a70e0f62 isinf not available in GLES 2 2018-07-29 19:24:14 +02:00
Flyinghead b1686a8f6a Do not allow inf z value in the vertex shader. Clamp w to a very small value.
Fixes ground triangles clipping in Soulcalibur intro sequence.
2018-07-24 16:55:48 +02:00
Flyinghead 2e08d7a6c9 round() not available in GLES2. Using floor() instead 2018-07-23 20:55:53 +02:00
Flyinghead 86235bb4a3 Float math in alpha calculation causes some punch-through textures to have alpha noise. 2018-07-23 15:15:05 +02:00
Flyinghead 4b5e863aa7 Use log2 depth scaling in fragment shader when available.
Currently a compile time option (!GLES). Fixes many depth issues (Dynamite Cop, Cannon Spike, etc.)
2018-07-23 10:25:55 +02:00
Flyinghead dc835dd64d Dump shaders source if compile fails 2018-07-16 16:52:11 +02:00
Flyinghead 0284d635d2 Upscale rendered-to textures
Increase the size of RTT textures by a given integer factor. Defaults to
1.
This gives much better quality textures, particularly visible when used
fullscreen for transition or pause screens.
2018-07-16 16:28:48 +02:00
Flyinghead bb2d860902 Use red channel for fog table in GL but continue using alpha channel in
GLES. Alpha channel is supported only in GL compat mode, not core.
2018-07-14 10:48:16 +02:00
Flyinghead d5d711cf32 Clipping scissor fix: x offset must only be added once 2018-07-11 20:06:43 +02:00
Flyinghead 1be4203ffe Far plane is at depth 0 in classic renderer. 2018-07-09 23:25:18 +02:00
Flyinghead c035635341 Clipping scissor Y coordinates must be inverted when rendering to screen
Fixes top of screen missing in San Francisco Rush 2049
2018-07-09 23:22:13 +02:00
Flyinghead a1997637bb Trilinear filtering limited implementation.
Fixes lighter field areas in NFL 2K2
2018-07-03 20:36:13 +02:00
Flyinghead 69263eddc0 Bump mapping support 2018-07-02 15:23:47 +02:00
Flyinghead 295395c680 Flat shading support 2018-07-01 20:25:06 +02:00
Flyinghead 08b8d30589 Implement clipping. Enabled by default. 2018-06-09 18:11:47 +02:00
Flyinghead 2fdcf0d821 Use float constants in GLSL 2018-06-07 18:26:02 +02:00
Flyinghead b9fe9332cf GLES 2 fix for fog table: use float only for vars and consts 2018-06-05 13:36:49 +02:00
Flyinghead 828990b926 Texture based fog table 2018-06-05 12:18:09 +02:00
Flyinghead 4c7ffeb520 Per-pixel fog shading. Shaders cleanup. 2018-05-22 13:04:21 +02:00
Flyinghead 8d01bbe145 Increase Z scaling factor to 100k (fixes background menu in VR2). Set
depth mask before clearing buffers.
2018-05-21 16:44:18 +02:00
Flyinghead 2d904372a9 Multipass issues: depth mask must be enabled for autosorted tr poly.
Depth buffer must NOT be cleared b/w passes, same for stencil I guess.
2018-05-20 14:16:43 +02:00
Flyinghead c427997269 Enable modifier volumes. Fix for exclusion volumes. Prevent overflow of modifier triangles (JGR). 2018-05-19 10:13:00 +02:00
Flyinghead d596f988c8 Revert 99bc20220e 2018-05-17 11:17:51 +02:00
Flyinghead 99bc20220e Simplify clipping 2018-05-17 10:32:52 +02:00
Flyinghead 80c193b3de Cache texture parameters. Fixed exclusion volume modifiers. 2018-05-16 19:34:45 +02:00
Flyinghead e73d11d0ab glHint nicest->fastest, and just once 2018-05-15 22:37:40 +02:00
Flyinghead b469f05b9d Fix wrong fog calculation issue 2018-05-15 21:19:58 +02:00
Flyinghead d8165376be GL cache fix 2018-05-15 16:09:50 +02:00
Flyinghead de046c4620 Use OpenGL state cache. Allocate texture ids in bulk. Avoid modifier
volumes entirely when not needed.
2018-05-15 15:22:26 +02:00
Flyinghead 2d834c7396 Revert glChecks 2018-05-15 11:54:14 +02:00
Flyinghead 699c2986a5 WIP 2018-05-14 12:48:22 +02:00
Flyinghead 46f28cfb27 Fog fix 2018-05-13 23:07:35 +02:00
Flyinghead 95120690ef Use log2 depth scaling when opengl 3 is available 2018-05-13 20:19:36 +02:00
Flyinghead b68f0a16a8 Increase FPS font size 2018-05-13 16:45:20 +02:00
Flyinghead c30548eb6a Added on-screen FPS counter. Fix clear screen issue when widescreen
enabled but not currently on.
2018-05-13 16:01:08 +02:00
Flyinghead 50a2e7e842 Revert dd9f77b4ab0b4c66fe7a2a717ed4b8cc1835e343: no gl_FragDepth in GLES 2 :( 2018-05-12 14:39:06 +02:00
Flyinghead dd9f77b4ab Changed z normalization to log scale 2018-05-12 13:26:50 +02:00
Flyinghead 683cbbba3e Multipass rendering 2018-05-10 21:28:20 +02:00
Flyinghead b77843b927 Handle RTT texture stride (VT) 2018-05-09 15:08:13 +02:00
Flyinghead c13a42611b Implemented other RTT format conversions. 2018-05-09 13:04:48 +02:00
Flyinghead 2e4ec3a1ed Added RTT support 2018-05-08 18:47:00 +02:00
Flyinghead 9f13ded502 Enable Modifier Volumes. Fix modtrig buffer overflow and stencil reset. 2018-05-04 18:18:04 +02:00
Flyinghead cc88561d4a Implemented clipping (Daytona USA menus) 2018-05-02 15:41:42 +02:00
Flyinghead db0534d5dd Fix PunchThrough texturing on JGR with nvidia 2018-05-02 12:29:47 +02:00
Flyinghead 35d3bd98d4 Disable fog table logging. Small optimization 2018-04-27 10:58:10 +00:00
Nicolas HOUDELOT 5c343a219c fix typo 2018-03-05 01:57:00 +01:00
Jan Holthuis 098e208a57 SDL: Drop SDL1.2 support and use SDL2 for GLES, too 2015-10-11 18:41:23 +02:00
Jan Holthuis 4267d51f90 stdclass: Make path getter function names more verbose 2015-09-02 15:49:00 +02:00
Jan Holthuis b6d0cddcaa stdclass: Add support for separate config/data dirs and system wide dirs
This adds support for separate config and data dirs.

On Linux, these will be compliant XDG Basedir Specification, i.e.
XDG_CONFIG_HOME and XDG_CONFIG_DIRS (or XDG_DATA_HOME and XDG_DATA_DIRS
respectively). On all other platforms, there currently just set to the
homedir path (so no previous behaviour has been changed).

If reicast wants to read and write a data file, it just calls
get_data_path("/samplefile.txt"). If it does not need to write to
that file, it just uses get_data_path("/samplefile.txt", false). That
way, we can also use system-wide dirs (like /usr/share/reicast on
linux), that the user usually doesn't have write access to.

The same applies for config file, where you use get_config_path(args)
respectively.
2015-09-02 15:48:53 +02:00
Jan Holthuis fc2d1edea9 linux-dist/x11: Enable fullscreen toggling via F11 button 2015-08-19 18:47:42 +02:00
Stefanos Kornilios Mitsis Poiitidis 26cfcd79e9 OSX: Fiddling to get the rec-cpp/noexcept path running 2015-08-11 07:57:22 -04:00
Stefanos Kornilios Mitsis Poiitidis f2f9a041e1 Merge pull request #727 from reicast/wip/import-drkpvr-softrend
rend/soft: Import the experimental core from nulldc/drkpvr, modularize
2015-08-05 04:25:06 +02:00
Stefanos Kornilios Mitsis Poiitidis 8cce1a4976 rend/soft: Import the experimental core from nulldc/drkpvr, better renderer modularization
- Adapted for indexed, async rendering, shared ta decoder
- This blits via a quick-and-hacky GDI blitter for now
- SSE/MMX intrins based, so not very portable
- A rather not good "reference" implementation
- At least, it's not terribly slow though
- GetTexture moved to Renderer interface
2015-08-05 02:43:40 +02:00
Stefanos Kornilios Mitsis Poiitidis 373cb6e24e nacl: Working towards GLES2. Will init, shaders won't compile 2015-07-29 04:30:21 +02:00
Stefanos Kornilios Mitsis Poiitidis 00dbd6222f rec-cpp: Massage for gcc compatibility 2015-07-25 14:25:51 +02:00
TwistedUmbrella 115ee47efc Prevent log overlap when loading button.png 2015-07-08 10:21:26 +02:00
Stefanos Kornilios Mitsis Poiitidis 65ca1382d8 Merge remote-tracking branch 'remotes/origin/skmp/ios-wip' into feat/segfault-context-consolidation
Android/windows builds fine again. Android not tested yet, iOS/OSX not compiled yet
2015-05-16 07:12:19 +02:00
Stefanos Kornilios Mitsis Poiitidis d33ad6edfb Updating from linux/x64 2015-05-08 17:49:23 +02:00
~skmp 0783875b84 Linux GLX/3.1 support
My setup is only 2.1 right now, so this is totally untested
2014-12-30 13:21:05 +02:00
~skmp 83752b9761 Fix building for linux (-DGLES && eglCreateWindowSurface) 2014-12-30 10:00:20 +02:00
Stefanos Kornilios Mitsis Poiitidis 9d7cac160a PVR: Fix hscale, VO vs FB_W scissor
Fixes w320 games (bangai-o, kof99, etc), and Half-x clip (Ready2Rumble,
more)
2014-12-22 16:46:40 +01:00
Stefanos Kornilios Mitsis Poiitidis 56ebda10a9 ios interpreter works, bios runs w/ 3d visulals
THIS IS A MESS. Sorry @angelXwind :p. We'll have to clean up and merge for r8, but most of the nasty work is there.

What works:
- full init, memalloc, mprotects, etc
- boot
- gles2

What doesn't:
- Exceptions for page faults
  - Breaks texture cache
  - Breaks dynarec because of fastpath
  - segfaults don't work, needs special mach exc_server magic that still eludes me after 5 hours
- Dynarecs. RWX issues, and broken buffer mappings. Also some minnor linking stuff (most of it is taken care of)
- Audio. I just killed it off.
- All of the ui. Was getting in the way of me not knowing how to edit story boards...
- Input

Also, merged branch 'skmp/mac86-hackport' into skmp/ios-wip

Have fun~
2014-12-17 10:19:44 -08:00
Stefanos Kornilios Mitsis Poiitidis 86e2408ace wip to get ios compiling 2014-12-17 03:10:18 -08:00
Stefanos Kornilios Mitsis Poiitidis 29906d8416 Texkill, palette_update on correct place.
- Texkill needs to be done before texture allocation, which is now done during parsing (texture-sync update)
- palette_update needs to be called from the emu thread, before kicking off the render
2014-12-17 08:42:28 +01:00
Stefanos Kornilios Mitsis Poiitidis 531863bca4 Fix rendering: GL3+ needs VAO, initialize screen_width/screen_height
*yay* it works now *dances*
2014-06-27 00:51:57 +03:00
Stefanos Kornilios Mitsis Poiitidis 6d6cf7d055 Call correct Texture/texture2d 2014-06-25 22:47:40 +03:00
Stefanos Kornilios Mitsis Poiitidis a1dfeb19e1 Partial port to opengl.
I forgot how much opengl sucked, so I figured I might try a port.

Nvidia doesn't draw (must be some fragment binding issue?, randomlulz returns GL_INVALID on glAttribPtr as well)
Intel doesn't compile the shader (and the error message makes no real sense. wut?)
Amd driver simply crashes (wheehaa)

All and all, doesn't look like much has changed in opengl the past 10 years, apart from even uglier initialization and more fragmented specs ~
2014-06-25 22:47:39 +03:00
Stefanos Kornilios Mitsis Poiitidis d59197f843 gdtool: better command line, stdin lists, cleanup
Also, imgread const filenames and such
2014-06-13 18:41:48 +03:00
Stefanos Kornilios Mitsis Poiitidis f1ef4877b8 Cleanup textures after they are dead for a while 2014-05-08 04:29:14 +03:00
Stefanos Kornilios Mitsis Poiitidis 411aade5e2 Improve async/mt rendering & sync logic.
Should fix texture staging issues for now, without degrading performance
Fixes #49 (mvsc2, sf3, etc sprites)
2014-05-02 03:45:31 +03:00
ptitSeb 54e3a0e4e0 PANDORA: Options and GUI 2014-03-01 07:38:40 -05:00
Stefanos Kornilios Mitsis Poiitidis 0bbf33ce61 Updated buttons img, reset OSD scale 2014-01-21 17:39:05 +02:00
Stefanos Kornilios Mitsis Poiitidis f5d29677b3 Merge branch 'androidui'
Conflicts:
	core/hw/pvr/spg.cpp
	core/hw/sh4/interpr/sh4_interpreter.cpp
	reicast/android/src/com/reicast/emulator/MainActivity.java
2013-12-28 22:28:50 +01:00
Stefanos Kornilios Mitsis Poiitidis 7ef9de3cae Moving code around, cleanups 2013-12-28 22:20:08 +01:00