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
+2 -4
View File
@@ -20,14 +20,11 @@ namespace Demo {
Skybox::Skybox(TextureRepository* repo) {
TyrobjLoader loader;
auto* data = loader.load(FileUtils::fromCwd("game/models/skybox/skybox.obj"),
1, 400.0F, true);
1, 100.0F, true);
data->normalsEnabled = false;
mesh = new StaticMesh(*data);
delete data;
mesh->scale.scaleX(2.0F);
mesh->scale.scaleZ(2.0F);
for (u32 i = 0; i < mesh->getMaterialsCount(); i++) {
auto* material = mesh->getMaterial(i);
material->print();
@@ -58,6 +55,7 @@ void Skybox::allocateOptions() {
options = new StaPipOptions();
options->frustumCulling = Tyra::PipelineFrustumCulling_None;
options->shadingType = Tyra::TyraShadingGouraud;
options->zTestType = Tyra::StaPipZTest_AllPass;
options->textureMappingType = Tyra::TyraNearest;
options->blendingEnabled = true;
options->antiAliasingEnabled = false;