medievil1
90bdeac904
fix up fog mode ( #2163 )
...
fix up fog mode
2021-06-07 10:59:26 +02:00
Anthony
726d6ff4f3
Improve scaling of depth buffer texture coordinates
...
- GetZScale accepts a PixelContainer rather than a surface
- Fix accidental call to CxbxGetPixelContainerDepth instead of GetZScale
- Assume we should scale the z component for all depth buffers, not just linear ones
2021-06-07 10:58:46 +02:00
Anthony
512502ce36
Fix Azurik render issue
...
Remove #ifndef blocks that were driven by the opposite define than they should have been
Also provide the opposite flag as a comment, next to where the 'driver' define
2021-06-07 10:58:45 +02:00
Anthony
ad1652f050
Fix array index out-of-range crash
...
Remove PS_REGISTER_ONE usage since its not a register, but a combination of PS_REGISTER_ZERO and an INPUT_MAPPING
2021-06-07 10:58:45 +02:00
Anthony
fe6de7c621
Fix fog when xfc is undefined
...
* flip fog factor lerp. fog factor 1 = no fog
* ensure RC is zero initialized
2021-06-07 10:58:44 +02:00
Anthony
6373ba58bb
fixup typo VXSH instead of PXSH
2021-06-07 10:58:44 +02:00
Anthony
3c96e3236b
use vs_3_0
2021-06-07 10:58:43 +02:00
Anthony
b565d39ffe
fix abs instead of clamp
2021-06-07 10:58:43 +02:00
Anthony
7745515588
Fix front/back colour usage
2021-06-07 10:58:43 +02:00
PatrickvL
55f3c60ef2
Include Pixel Shader HLSL in output artifacts (and fixed a few typos in FixedFunction HLSL)
2021-06-07 10:58:42 +02:00
PatrickvL
b5cc970d7e
Corrected fixed-function formula's in final combiner
2021-06-07 10:58:42 +02:00
Anthony
7f89e72b2b
fixup enable complement in final combiner
...
(cherry picked from commit 71df0a3a5af94f550c2ecc25a47f78e54e74ee4a)
2021-06-07 10:58:41 +02:00
Anthony
e3c0b7287c
fixup FC0 and FC1 constant mapping
...
(cherry picked from commit 45cd7f72f07a5528b83bdadb24b46a934a7bfc50)
2021-06-07 10:58:41 +02:00
Anthony
cb4bbc17ee
Calculate the fog factor in the vertex shader
...
(cherry picked from commit 3c3ede07da1f0829697cc1635058b5dc4ec610d2)
2021-06-07 10:58:41 +02:00
Anthony
3216931da6
fixup fog colour constant register
...
(cherry picked from commit b99e63d944d2ceb474761ae88c8c90246071f0bc)
2021-06-07 10:58:40 +02:00
Anthony
9480bea9c0
Use sampler state
...
(cherry picked from commit ab2064ef690179560761d29eed53fd5b756b5dc7)
2021-06-07 10:58:39 +02:00
Anthony
65734fac9d
Wrap PS_INPUTMAPPING ops in brackets for consistent order of operations
...
(cherry picked from commit 001dca83fea387debd7e85893eb8b8631ea264fd)
2021-06-07 10:58:39 +02:00
PatrickvL
845bc7ef06
Renames, indenting, comments
2021-06-07 10:58:38 +02:00
PatrickvL
af0058ad61
WIP pointsprite nuances
2021-06-07 10:58:37 +02:00
PatrickvL
c6fdfc7101
Code cleanup (comments and variable renames)
2021-06-07 10:58:37 +02:00
patrickvl
4af986f058
No time to test, but here's alphakill support in PS HLSL
2021-06-07 10:58:36 +02:00
PatrickvL
29017db910
In DxbxUpdateActivePixelShader, transfer values step by step, instead of using a switch/case loop.
...
Also, working towards removing host SetTextureStageState calls (doesn't work yet).
2021-06-07 10:58:36 +02:00
PatrickvL
2990552230
Fixes after rebase
2021-06-07 10:58:35 +02:00
PatrickvL
b72b52a4a2
RenderState mapping table review remarks (nothing functional)
2021-06-07 10:58:35 +02:00
PatrickvL
4517f36456
Unrelated to PS :
...
UpdateFixedFunctionVertexShaderState now derives TexCoordComponentCount from GetXboxVertexAttributeFormat, which makes it honor overrides.
This could fix corrupted textures when Fixed Function HLSL is used together with VertexStream override modes.
2021-06-07 10:58:34 +02:00
PatrickvL
609a4d3276
[WIP] Xbox register combiner to HLSL pixel shader
2021-06-07 10:58:33 +02:00
PatrickvL
1e6845c940
Generalized HLSL shader compilation
2021-06-07 10:58:32 +02:00
Luke Usher
f6e54acf17
Merge pull request #2231 from NZJenkins/sleeps
...
SleepPrecise for more accurate sleeps
2021-06-07 09:45:56 +01:00
Luke Usher
da7a917ec5
Merge pull request #2232 from NZJenkins/ff-state2
...
Avoid unnecessary shader constant updates
2021-06-07 08:46:57 +01:00
Anthony
7d672600bb
Update dirty shader constants only
...
And try to minimize D3D9 calls
Constants are synced every draw, but titles may only use a few constants
so we can potentially save a lot of work
Increases performance a little (at least on certain titles like Buffy)
2021-06-06 23:15:38 +12:00
Anthony
0cb849a3f8
Avoid setting vertex shader constants more than once per draw
2021-06-06 22:49:58 +12:00
Anthony
3b1daf52ab
Addd braces
2021-06-02 22:38:43 +12:00
Anthony
76eb475ed6
Move SleepPrecise to Timer
2021-06-02 22:36:40 +12:00
Anthony
b66f04d811
SleepPrecise for more accurate sleeps
...
We can use it to reduce the amount of spin waiting which burns CPU
Try to sleep as much as we can get away with without overshooting, and then spin wait
Use it for
- VBlank timing
- Frame limiter timing
2021-06-02 21:54:02 +12:00
PatrickvL
8087b157e5
Merge pull request #2222 from ergo720/rawinput
...
Add controller hotplug support
2021-05-28 16:54:30 +02:00
ergo720
917bf50482
Merge pull request #2224 from Margen67/sdl2
...
Use official SDL2 repository
2021-05-24 16:45:12 +02:00
ergo720
f3251128e8
Fixed an issue where xinput devices were bound to the wrong xbox port under some circumstances after hotplug removal events
2021-05-24 12:11:09 +02:00
ergo720
1ed640a0d7
Add controller hotplug support
2021-05-24 12:11:08 +02:00
Margen67
55ada8d50d
Use official SDL2 repository
2021-05-23 02:06:50 -10:00
ergo720
5d222c10a0
Merge pull request #2221 from jackchentwkh/ImageDescWithRebaseAddress
...
Keep ImageBuffer backup copy, handle ImageDesc with rebase address, Fix Otogi 1, Otogi 2, PGR2 booting.
2021-05-21 19:38:41 +02:00
ergo720
8cc4b10ce0
Added test case + fixed a macro redefinition warning
2021-05-21 19:25:22 +02:00
Luke Usher
df22c8baed
Merge pull request #2210 from RadWolfie/fix-chihiro-support
...
Few fixes toward title mount path and prepped for chihiro work
2021-05-21 17:56:57 +01:00
ergo720
2e1ed31aaa
Untabfied code and update code style
2021-05-21 13:08:57 +02:00
jackchentwkh
a665cf1f8e
Replace host CreateFile/GetFileSize/ReadFile/Close with xbox::NtCreateFile/NtQueryFile/NtReadFile/NtClose. Add necessary error check logic, Add logic for loading image file from xbe section in case we encounter such guest code, alghough highly unlikely. Basicaly reversed from PGR2's code.
2021-05-21 13:28:13 +08:00
jackchentwkh
d49762d27e
Rebase Code and State Segments in EffectMaps. fix PGR2
2021-05-19 19:20:39 +08:00
RadWolfie
8d725a689c
kernel: rename tmp_buffer to p_default_mount_path
2021-05-18 16:07:56 -05:00
RadWolfie
08dd615d37
review remarks
2021-05-18 16:05:13 -05:00
RadWolfie
cf3655bed1
fix g_hCurDir issue by auto-bind to D letter when symbolic link is called occur
2021-05-18 15:48:19 -05:00
RadWolfie
d8eb26fbda
kernel: fix chihiro support
2021-05-18 15:48:18 -05:00
RadWolfie
9eadb8d393
remove unused code
2021-05-18 15:48:18 -05:00