diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-01-30 04:22:19 +0100 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-02-13 03:12:37 +0100 |
commit | 1683cb0ec908a214cd45a5c481d930f07c811ff2 (patch) | |
tree | 0038275296323687911168b27b13d1421f07d148 /src/video_core/swrasterizer/texturing.h | |
parent | SWRasterizer: Convert large no-capture lambdas to standalone functions (diff) | |
download | yuzu-1683cb0ec908a214cd45a5c481d930f07c811ff2.tar yuzu-1683cb0ec908a214cd45a5c481d930f07c811ff2.tar.gz yuzu-1683cb0ec908a214cd45a5c481d930f07c811ff2.tar.bz2 yuzu-1683cb0ec908a214cd45a5c481d930f07c811ff2.tar.lz yuzu-1683cb0ec908a214cd45a5c481d930f07c811ff2.tar.xz yuzu-1683cb0ec908a214cd45a5c481d930f07c811ff2.tar.zst yuzu-1683cb0ec908a214cd45a5c481d930f07c811ff2.zip |
Diffstat (limited to 'src/video_core/swrasterizer/texturing.h')
-rw-r--r-- | src/video_core/swrasterizer/texturing.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/video_core/swrasterizer/texturing.h b/src/video_core/swrasterizer/texturing.h new file mode 100644 index 000000000..24f74a5a3 --- /dev/null +++ b/src/video_core/swrasterizer/texturing.h @@ -0,0 +1,28 @@ +// Copyright 2017 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include "common/common_types.h" +#include "common/vector_math.h" +#include "video_core/regs_texturing.h" + +namespace Pica { +namespace Rasterizer { + +int GetWrappedTexCoord(TexturingRegs::TextureConfig::WrapMode mode, int val, unsigned size); + +Math::Vec3<u8> GetColorModifier(TexturingRegs::TevStageConfig::ColorModifier factor, + const Math::Vec4<u8>& values); + +u8 GetAlphaModifier(TexturingRegs::TevStageConfig::AlphaModifier factor, + const Math::Vec4<u8>& values); + +Math::Vec3<u8> ColorCombine(TexturingRegs::TevStageConfig::Operation op, + const Math::Vec3<u8> input[3]); + +u8 AlphaCombine(TexturingRegs::TevStageConfig::Operation op, const std::array<u8, 3>& input); + +} // namespace Rasterizer +} // namespace Pica |