Commit Graph

14 Commits

Author SHA1 Message Date
Minty-Meeo bf079d6d3a [[unlikely]] ASSERT
and other ASSERT usage changes
2023-03-02 19:54:15 -06:00
Pokechu22 04fdadd9d5 VideoCommon: Rename norm0/norm1/norm2 to normal/tangent/binormal 2022-04-22 16:54:36 -07:00
Pierre Bourdon e149ad4f0a
treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
Pokechu22 aab81d5aa0 Convert XFMemory to BitField and enum class
Additionally a new ClipDisable union has been added (though it is not currently used by Dolphin).
2021-03-06 19:27:14 -08:00
Stenzek 51724c1ccd LightingShaderGen: Always calculate lighting for both color channels
Cel-damage depends on lighting being calculated for the first channel
even though there is no color in the vertex format (defaults to the
material color). If lighting for the channel is not enabled, the vertex
will use the default color as before.

The default value of the color is determined by the number of elements in
the vertex format. This fixes the grey cubes in Super Mario Sunshine.

If the color channel count is zero, we set the color to black before the
end of the vertex shader. It's possible that this would be undefined
behavior on hardware if a vertex color index that was greater than the
channel count was used within TEV.
2020-11-20 15:54:04 -08:00
Lioncash a5b28f1f07 ShaderGenCommon: Rename WriteFmt() to Write()
Now that we've converted all of the shader generators over to using fmt,
we can drop the old Write() member function and perform a rename
operation on the WriteFmt() to turn it into the new Write() function.

All changes within this are the removal of a <cstdarg> header, since the
previous printf-based Write() required it, and renaming. No functional
changes are made at all.
2020-11-09 02:31:49 -05:00
Lioncash 4b21bc7508 LightingShaderGen: Transition over to fmt 2020-07-24 13:50:09 -04:00
Lioncash 50a476c371 Assert: Uppercase assertion macros
Macros should be all upper-cased. This is also kind of a wart that's
been sticking out for quite a while now (we avoid prefixing
underscores).
2018-03-14 22:03:12 -04:00
Stenzek efb9759862 LightingShaderGen: Always calculate lighting for both color channels
Cel-damage uses the color from the lighting stage of the vertex pipeline
as texture coordinates, but sets numColorChans to zero.

We now calculate the colors in all cases, but override the color before
writing it from the vertex shader if numColorChans is set to a lower value.
2017-11-22 01:52:18 +10:00
Lioncash 468f623d27 ShaderGenCommon: Remove unnecessary includes 2017-02-01 12:19:55 -05:00
Lioncash 273ace7bb7 LightingShaderGen: Remove unnecessary includes 2017-02-01 01:06:00 -05:00
degasus 083be0832f LightingShader: Drop xfmem usage.
Our shaders must only depend on the UID, not on any global state.
2016-10-04 10:13:46 +02:00
Léo Lam d9fc1e01b4 LightingShaderGen: Fix formatting 2016-06-26 16:35:44 +02:00
Scott Mansell d958388617 VideoCommon: Fix some warnings. 2016-06-26 23:10:31 +12:00