Commit Graph

1540 Commits

Author SHA1 Message Date
28128348f2 pica/shader/interpreter: implement SETEMIT and EMIT 2017-08-19 10:13:20 +03:00
46c6973d2b pica/shader: extend UnitState for GS
Among four shader units in pica, a special unit can be configured to run both VS and GS program. GSUnitState represents this unit, which extends UnitState (which represents the other three normal units) with extra state for primitive emitting. It uses lots of raw pointers to represent internal structure in order to keep it standard layout type for JIT to access.
This unit doesn't handle triangle winding (inverting) itself; instead, it calls a WindingSetter handler. This will be explained in the following commits
2017-08-19 10:13:20 +03:00
686fb3e78c gl_shader_gen: don't call SampleTexture when bump map is not used 2017-08-11 18:35:00 +03:00
945f9a1b04 SwRasterizer/Lighting: implement spot light 2017-08-11 01:19:10 +03:00
14ee32c46a SwRasterizer/Lighting: implement geometric factor 2017-08-11 01:18:43 +03:00
5d9d42f0d0 SwRasterizer/Lighting: use make_tuple instead of constructor
implicit tuple constructor is a c++17 thing, which is not supported by some not-so-old libraries. Play safe for now
2017-08-10 12:19:58 +03:00
db309b2423 pica/regs: layout geometry shader configuration regs
All the register meanings are derived from ctrulib (3dbrew is outdated for most of them)
2017-08-10 01:53:08 +03:00
792dee47a7 Merge pull request #2822 from wwylele/sw_lighting-2
Implement fragment lighting in the sw renderer (take 2)
2017-08-09 18:54:29 +03:00
baa24f4ea9 pica: upload shared shader code to both unit 2017-08-07 10:30:05 +03:00
2252a63f80 SwRasterizer/Lighting: shorten file name 2017-08-03 13:51:22 +03:00
eda28266fb SwRasterizer/Lighting: move to its own file 2017-08-02 22:20:40 +03:00
48b4105871 SwRasterizer/Lighting: reduce confusion 2017-08-02 22:07:15 +03:00
c59ed47608 SwRasterizer/Lighting: move quaternion normalization to the caller 2017-08-02 22:05:53 +03:00
c89f804a01 pica/shader_interpreter: fix off-by-one in LOOP 2017-07-27 13:48:27 +03:00
c6a2e519ef Merge pull request #2816 from wwylele/proctex-lutlutlut
gl_rasterizer: use texture buffer for proctex LUT
2017-07-22 23:03:48 -05:00
e646bd902d Merge pull request #2834 from wwylele/depth-enable-fix
gl_rasterizer_cache: fix using_depth_fb
2017-07-22 23:02:59 -05:00
df8b9863f9 telemetry: Log performance, configuration, and system data. 2017-07-17 21:32:28 -04:00
4feff63ffa SwRasterizer/Lighting: dist atten lut input need to be clamp 2017-07-11 22:19:00 +03:00
56e5425e59 SwRasterizer/Lighting: unify float suffix 2017-07-11 22:15:35 +03:00
e415558a4f SwRasterizer/Lighting: get rid of nested return 2017-07-11 22:15:35 +03:00
c6d1472513 SwRasterizer/Lighting: refactor GetLutValue into a function.
merging similar pattern. Also makes the code more similar to the gl one
2017-07-11 22:15:35 +03:00
f13cf506e0 SwRasterizer: only interpolate quat and view when lighting is enabled 2017-07-11 21:35:57 +03:00
efc655aec0 SwRasterizer/Lighting: pass lighting state as parameter 2017-07-11 20:06:26 +03:00
9906feefbd SwRasterizer/Lighting: Move the clamp highlight calculation to the end of the per-light loop body. 2017-07-11 19:39:15 +03:00
7526af5e52 SwRasterizer/Lighting: Move the lighting enable check outside the ComputeFragmentsColors function. 2017-07-11 19:39:15 +03:00
b8229a7684 SwRasterizer/Lighting: Do not use global registers state in ComputeFragmentsColors. 2017-07-11 19:39:15 +03:00
7bc467e872 SwRasterizer/Lighting: Do not use global state in LookupLightingLut. 2017-07-11 19:39:15 +03:00
37ac2b6657 SwRasterizer/Lighting: Fixed a bug where the distance attenuation bias was being set to the dist atten scale. 2017-07-11 19:39:15 +03:00
6250f52e93 SwRasterizer: Fixed a few conversion warnings and moved per-light values into the per-light loop. 2017-07-11 19:39:15 +03:00
2d69a9b8bf SwRasterizer: Run clang-format 2017-07-11 19:39:15 +03:00
73566ff7a9 SwRasterizer: Flip the vertex quaternions before clipping (if necessary). 2017-07-11 19:39:15 +03:00
2a75837bc3 SwRasterizer: Corrected the light LUT lookups. 2017-07-11 19:39:15 +03:00
f2d4d5c219 SwRasterizer: Corrected the light LUT lookups. 2017-07-11 19:39:15 +03:00
80b6fc592e SwRasterizer: Fixed the lighting lut lookup function. 2017-07-11 19:39:15 +03:00
10b0bea060 SwRasterizer: Calculate fresnel for fragment lighting. 2017-07-11 19:39:15 +03:00
46b8c8e1da SwRasterizer: Calculate specular_1 for fragment lighting. 2017-07-11 19:39:15 +03:00
be25e78b07 SwRasterizer: Calculate specular_0 for fragment lighting. 2017-07-11 19:39:15 +03:00
b2f472a2b1 SwRasterizer: Implement primary fragment color. 2017-07-11 19:39:15 +03:00
8482933db8 gl_rasterizer: use texture buffer for proctex LUT 2017-07-01 11:02:48 +03:00
8978ecb09c gl_rasterizer: use texture buffer for fog LUT 2017-06-22 20:41:00 +03:00
f1e377f57e gl_rasterizer: create the texture before applying the state
this is a rebasing error from #2792. It doesn't affect much though, because the later more Apply() call fixes/hides it
2017-06-22 17:47:46 +03:00
457659fe01 gl_state: reset 1d textures 2017-06-21 23:13:06 +03:00
42f7ca7412 gl_rasterizer: fix glGetUniformLocation type 2017-06-21 23:13:06 +03:00
be9e952bdc gl_rasterizer: manage texture ids in one place 2017-06-21 23:13:06 +03:00
ab60414122 gl_rasterizer/lighting: fix LUT interpolation 2017-06-21 23:13:06 +03:00
d0888f8548 Merge pull request #2776 from wwylele/geo-factor
Fragment lighting: implement geometric factor
2017-06-18 14:18:48 -07:00
5a454173a8 gl_rasterizer/lighting: use the formula from the paper for germetic factor 2017-06-18 10:29:02 +03:00
f6715f98f5 Stop using reserved operator names (and/or/xor) with Xbyak
Also has the Dynarmic upgrade with the same change
2017-06-17 12:20:22 -07:00
7052d43a67 gl_rasterizer/lighting: implement geometric factor 2017-06-15 14:59:01 +03:00
da1bec121a Merge pull request #2762 from wwylele/light-cp-tangent
Fragment lighting: implement lut input 5 (CP) and tangent mapping
2017-06-14 20:08:26 -07:00