wwylele
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
9 years ago
wwylele
686fb3e78c
gl_shader_gen: don't call SampleTexture when bump map is not used
9 years ago
wwylele
945f9a1b04
SwRasterizer/Lighting: implement spot light
9 years ago
wwylele
14ee32c46a
SwRasterizer/Lighting: implement geometric factor
9 years ago
wwylele
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
9 years ago
wwylele
db309b2423
pica/regs: layout geometry shader configuration regs
All the register meanings are derived from ctrulib (3dbrew is outdated for most of them)
9 years ago
wwylele
baa24f4ea9
pica: upload shared shader code to both unit
9 years ago
wwylele
2252a63f80
SwRasterizer/Lighting: shorten file name
9 years ago
wwylele
eda28266fb
SwRasterizer/Lighting: move to its own file
9 years ago
wwylele
48b4105871
SwRasterizer/Lighting: reduce confusion
9 years ago
wwylele
c59ed47608
SwRasterizer/Lighting: move quaternion normalization to the caller
9 years ago
wwylele
c89f804a01
pica/shader_interpreter: fix off-by-one in LOOP
9 years ago
bunnei
df8b9863f9
telemetry: Log performance, configuration, and system data.
9 years ago
wwylele
4feff63ffa
SwRasterizer/Lighting: dist atten lut input need to be clamp
9 years ago
wwylele
56e5425e59
SwRasterizer/Lighting: unify float suffix
9 years ago
wwylele
e415558a4f
SwRasterizer/Lighting: get rid of nested return
9 years ago
wwylele
c6d1472513
SwRasterizer/Lighting: refactor GetLutValue into a function.
merging similar pattern. Also makes the code more similar to the gl one
9 years ago
wwylele
f13cf506e0
SwRasterizer: only interpolate quat and view when lighting is enabled
9 years ago
wwylele
efc655aec0
SwRasterizer/Lighting: pass lighting state as parameter
9 years ago
Subv
9906feefbd
SwRasterizer/Lighting: Move the clamp highlight calculation to the end of the per-light loop body.
9 years ago
Subv
7526af5e52
SwRasterizer/Lighting: Move the lighting enable check outside the ComputeFragmentsColors function.
9 years ago
Subv
b8229a7684
SwRasterizer/Lighting: Do not use global registers state in ComputeFragmentsColors.
9 years ago
Subv
7bc467e872
SwRasterizer/Lighting: Do not use global state in LookupLightingLut.
9 years ago
Subv
37ac2b6657
SwRasterizer/Lighting: Fixed a bug where the distance attenuation bias was being set to the dist atten scale.
9 years ago
Subv
6250f52e93
SwRasterizer: Fixed a few conversion warnings and moved per-light values into the per-light loop.
9 years ago
Subv
2d69a9b8bf
SwRasterizer: Run clang-format
9 years ago
Subv
73566ff7a9
SwRasterizer: Flip the vertex quaternions before clipping (if necessary).
9 years ago
Subv
2a75837bc3
SwRasterizer: Corrected the light LUT lookups.
9 years ago
Subv
f2d4d5c219
SwRasterizer: Corrected the light LUT lookups.
9 years ago
Subv
80b6fc592e
SwRasterizer: Fixed the lighting lut lookup function.
9 years ago
Subv
10b0bea060
SwRasterizer: Calculate fresnel for fragment lighting.
9 years ago
Subv
46b8c8e1da
SwRasterizer: Calculate specular_1 for fragment lighting.
9 years ago
Subv
be25e78b07
SwRasterizer: Calculate specular_0 for fragment lighting.
9 years ago
Subv
b2f472a2b1
SwRasterizer: Implement primary fragment color.
9 years ago
wwylele
8482933db8
gl_rasterizer: use texture buffer for proctex LUT
9 years ago
wwylele
8978ecb09c
gl_rasterizer: use texture buffer for fog LUT
9 years ago
wwylele
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
9 years ago
wwylele
457659fe01
gl_state: reset 1d textures
9 years ago
wwylele
42f7ca7412
gl_rasterizer: fix glGetUniformLocation type
9 years ago
wwylele
be9e952bdc
gl_rasterizer: manage texture ids in one place
9 years ago
wwylele
ab60414122
gl_rasterizer/lighting: fix LUT interpolation
9 years ago
wwylele
5a454173a8
gl_rasterizer/lighting: use the formula from the paper for germetic factor
9 years ago
Yuri Kunde Schlesner
f6715f98f5
Stop using reserved operator names (and/or/xor) with Xbyak
Also has the Dynarmic upgrade with the same change
9 years ago
wwylele
7052d43a67
gl_rasterizer/lighting: implement geometric factor
9 years ago
wwylele
972548e3ee
gl_rasterizer/lighting: Implement tangent mapping
9 years ago
wwylele
40b7d0bf3f
gl_rasterizer/lighting: implement lut input 5 (CP)
9 years ago
wwylele
b3b9468573
gl_rasterizer_cache: depth write is disabled if allow_depth_stencil_write is false
9 years ago
Yuri Kunde Schlesner
ba01a8302a
OpenGL: Update comment on AreQuaternionsOpposite with new information
While debugging the software renderer implementation, it was noticed
that this is actually exactly what the hardware does, upgrading the
status of this "hack" to being a proper implementation. And there was
much rejoicing.
9 years ago
wwylele
28d1e73d2f
pica/rasterizer: implement/stub texture wrap mode 4-7
9 years ago
wwylele
10906dceec
gl_rasterizer: implement spot light
9 years ago