Commit graph

14 commits

Author SHA1 Message Date
water111 0fcc7eb8e9
[merc2] Support emerc (#2147)
This adds environment mapping support to `Merc2`, and turns it on for
Jak 1 and Jak 2.

- The performance is much better
- Jak 1 can be toggled back to the old behavior with `(set! *emerc-hack*
#f)`. The new environment mapping is identical to the old one everywhere
I checked.
- Jak 1 still falls back to generic for ripple/texscroll/blerc/eyes -
there's still no dynamic texture or vertex updating support. The eye
detection stuff will sometimes flag stuff as eyes which is not eyes,
which is fine, but means that generic will be used in some places where
emerc could be used. For example, the shiny plates on jak's arm will be
drawn with generic because jak has eyes.
- Jak 2 hasn't been checked super carefully against PCSX2 yet.
- Jak 2 still isn't technically using emerc, but instead putting emerc
models in the merc bucket.
- The interface to merc is a lot different now and totally custom
OpenGOAL DMA code. The original merc drawing asm doesn't run anymore.
- The FR3 format changed
- Something funky going on with foreground lighting in escape, but
doesn't seem to be related to this change?

Performance comparison, jak 1, in likely the most generic-merc heavy
spot:

![image](https://user-images.githubusercontent.com/48171810/213882718-feb2ab59-95a9-44a2-b0e5-95fba860c7b0.png)

![image](https://user-images.githubusercontent.com/48171810/213882736-8dbbf4c9-6bbf-4d0b-96ce-78d63274660c.png)
2023-01-22 18:30:31 -05:00
Ethan Lafrenais bb323c2ebe
Depth Cue (#1676)
* Initial depth-cue implementation

* Oops

* Finish merge + fix issues with letterboxing

* Fix alpha blending

* Add some debug options + profiler stats

* More debug options + respect xyoffset GS register

* Clean up GOAL code

* Disable depth-cue by default

* typo

* very important typo

* depth-cue disable, but better
2022-07-19 18:34:30 -04:00
Ethan Lafrenais 8ba010ca97
Sprite Distort (#1626)
* [WIP] initial sprite distort implementation

* Clean up

* More clean up + document sprite distort VU program

* Format code

* Address CI issues

* Adjust hacks in distort fragment shader

* oops

* Optimize sprite distort rendering down to one draw call

~2x speed up

* Format file

* Clean up distort rendering and add separate profile scopes

* Fix glVertexAttribPointer

* Fix sprite distort getting messed up when the viewable area doesn't fit the window perfectly

* Add debug option to disable sprite distort

* One evil space to fail CI...

* oops

* Increase sprite-aux-list size when PC_BIG_MEMORY is true

* Address lints
2022-07-08 21:56:38 -04:00
water111 be976d2e69
[merc] Add merc extraction (#1356)
* docs for ee merc code

* wip

* more extraction stuff

* partial mat1 working

* mat1

* cleanup

* partial mat2 and mat3 support

* merc extraction seems to work
2022-05-11 22:53:53 -04:00
water111 a6fa04a83d
[graphics] port generic VU1 to OpenGL (#1221)
* temp

* name the obvious ones

* un-pipelined the fast case in generic vu1

* generic2 dma

* pass2

* first pass at opengl

* many fixes

* fix hud, strip

* windows fix

* final tweaks

* memcard folder

* add missing include
2022-03-06 19:56:43 -05:00
water111 68a1f2d012
[graphics] Add a specialized renderer for handling merc/generic output data (#1207)
* second try at writing the direct renderer

* finish direct2

* more optimization
2022-02-27 17:23:12 -05:00
water111 bbb7213281
various sprite fixes (#1185) 2022-02-19 20:43:03 -05:00
water111 c9fc4f0bf9
[graphics] eyes (#1169)
* first draft eye renderer

* working

* working
2022-02-15 19:37:51 -05:00
water111 78cde74d5a
update readme and fix always playing str (#1139)
* update readme deps

* replace assert

* bump timeout

* fix memory corruption in kernel

* use unknown if level name is invalid
2022-02-08 19:02:47 -05:00
water111 35bdc9b1d3
add an optional, less-accurate-but-faster sprite render and fix silly math bug (#1102)
* also add a new sprite renderer

* claaaang

* goal build fix

* fix tests, add stack singleton option

* make all event-message-blocks the same

* diskboot
2022-01-21 21:11:57 -05:00
ManDude 67bb1193a8
[runtime] GPU sprite renderer (#1075)
* sprite_3d first attempt

* fixs

* fix Q usage

* ??

* attempt 2

* Update sprite_3d.vert

* works-ish

* works properly!

* scissor fix

* simplify shader

* texture support except everything is broken for some reason

* stuff

* Update SpriteRenderer.cpp

* meltdown

* Revert "simplify shader"

This reverts commit 97bd9b77be.

* Revert "Revert "simplify shader""

This reverts commit 32fb46ce90.

* fix blend

* fix blend and prim

* fix depth write and texture rendering

* fix bugs

* remove noperspective

* fix and finalize sprite 3D vert shader

* optimize 3D program

* 2D sprites! almost first try

* fixes + merge shader code

* HUD sprite support and clean up code

* oopsie

* fix 3d sprites

* minor cleanup and increase sprite buffer to 8k sprites

* clang

* replace some uses of `glBufferSubData` with `glBufferData`
2022-01-15 12:31:38 -05:00
water111 a8342aef31
[graphics] TIE extractor (#1026)
* temp

* temp

* wip

* more progress on the instance asm

* first half of tie extraction, up to dma lists

* more tie extraction

* first part figured out maybe

* bp1 loop seems to work, bp2 loop does not

* bp1 and bp2 appear working. sadly ip is needed

* ip1 outline, not working ip2

* just kidding, ip2 seems to work

* extraction seems to work

* basic rendering working

* tie fixes

* performance optimization of tie renderer

* hook up tie to engine

* fix more bugs

* cleanup and perf improvements

* fix tests

* ref tests

* mm256i for gcc

* CLANG

* windows

* more compile fixes

* fix fast time of day

* small fixes

* fix after merge

* clang
2021-12-26 12:33:51 -05:00
water111 083202929c
[graphics] tfrag3 renderer (#978)
* begin work

* work

* working objs

* exporting

* it works

* before some time of day fixes

* add time of day interp and also fix zbuffer

* some small blending fixes

* improve randomess

* clean up extraction and missing blend mode

* culling, time of day, more level fixes

* more cleanup

* cleanup memory usage

* windows fix
2021-12-04 12:33:18 -05:00
water111 6a606d7222
Start a debug tool for looking through level data (#954)
* temp

* temp

* level inspection tool

* docs

* windows fix
2021-10-31 13:12:50 -04:00
Renamed from game/graphics/dma/gs.h (Browse further)