ztest option

This commit is contained in:
h4570
2022-08-02 18:36:08 +02:00
parent 5aae7cff7e
commit da958cb094
8 changed files with 83 additions and 8 deletions
@@ -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