ztest option
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "./bag/packaging/stapip_bag_package.hpp"
|
||||
#include "./bag/packaging/stapip_bag_packager.hpp"
|
||||
#include "./stapip_qbuffer_renderer.hpp"
|
||||
#include "../stapip_ztest.hpp"
|
||||
#include "renderer/3d/pipeline/shared/pipeline_frustum_culling.hpp"
|
||||
|
||||
namespace Tyra {
|
||||
@@ -28,7 +29,7 @@ class StaPipCore {
|
||||
void init(RendererCore* t_core);
|
||||
|
||||
/** Render 3D via "bags" */
|
||||
void render(StaPipBag* bag, const bool& frustumCull,
|
||||
void render(StaPipBag* bag, const bool& frustumCull, const StaPipZTest& zTest,
|
||||
StaPipBagPackagesBBox* bbox = nullptr);
|
||||
|
||||
/** Get max vert count of VU1 qbuffer (for optimizations) */
|
||||
|
||||
@@ -11,14 +11,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "renderer/3d/pipeline/shared/pipeline_options.hpp"
|
||||
#include "./stapip_ztest.hpp"
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
class StaPipOptions : public PipelineOptions {
|
||||
public:
|
||||
StaPipOptions() { fullClipChecks = false; }
|
||||
StaPipOptions() {
|
||||
fullClipChecks = false;
|
||||
zTestType = StaPipZTest_Standard;
|
||||
}
|
||||
~StaPipOptions() {}
|
||||
|
||||
/** @brief Type of z buffer testing. */
|
||||
StaPipZTest zTestType;
|
||||
|
||||
/**
|
||||
* @brief Experimental! True -> enables "clip against each plane" algorithm.
|
||||
* Mandatory, default: False.
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
# ______ ____ ___
|
||||
# | \/ ____| |___|
|
||||
# | | | \ | |
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||
# Licenced under Apache License 2.0
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
enum StaPipZTest {
|
||||
StaPipZTest_Standard = 0,
|
||||
StaPipZTest_AllPass = 1,
|
||||
};
|
||||
|
||||
} // namespace Tyra
|
||||
@@ -27,6 +27,10 @@ class RendererCoreGS {
|
||||
|
||||
void flipBuffers();
|
||||
|
||||
void setStandardZTest();
|
||||
|
||||
void setAllPassZTest();
|
||||
|
||||
private:
|
||||
constexpr static float gsCenter = 4096.0F;
|
||||
constexpr static float screenCenter = gsCenter / 2.0F;
|
||||
@@ -34,6 +38,7 @@ class RendererCoreGS {
|
||||
RendererSettings* settings;
|
||||
framebuffer_t frameBuffers[2];
|
||||
packet2_t* flipPacket;
|
||||
packet2_t* zTestPacket;
|
||||
u8 context;
|
||||
u8 currentField;
|
||||
|
||||
@@ -43,6 +48,7 @@ class RendererCoreGS {
|
||||
void updateCurrentField();
|
||||
qword_t* setXYOffset(qword_t* q, const int& drawContext, const float& x,
|
||||
const float& y);
|
||||
qword_t* addAllPassZTest(qword_t* q, int context, zbuffer_t* z);
|
||||
};
|
||||
|
||||
} // namespace Tyra
|
||||
|
||||
Reference in New Issue
Block a user