diff --git a/ROADMAP.txt b/ROADMAP.txt index 631fbf6..80e1492 100644 --- a/ROADMAP.txt +++ b/ROADMAP.txt @@ -1,18 +1,16 @@ ------------ Tyra's v2.0 roadmap to publish on GitHub ------------ --- H4570 -- [DynPip] TD VU1 program -- [DynPip] Info about: simple clip - [StaPip] Remove animation - [StaPip] Dbufferring during mesh unrolling - [StaPip] VU1 packets spamming - [McPip] VU1 packets spamming -- [StaPip] Info about: full plane clip +- [Loaders] MD2 loader - choose between static/dynamic mesh - [Renderer] Github: Allocate dynamic pipeline memory only in "onUse" (core,qbuffrenderer,pipeline..) -- [Game] Update intellisense from docker - [Renderer] Add possibility to on/off frustum check in all pipelines (renderOptions?) - [Loaders] Think about ".tyrobj" format - implement it (add multicolor support) - [Loaders] DFF loader as static Mesh loader +- [Game] Update intellisense from docker - [Texture] Test cache hits with large amount of textures (dolphin sample?) - [Demo] Create cool demo which will show all features of Tyra (I will take this one) diff --git a/engine/inc/renderer/3d/pipeline/dynamic/dynamic_pipeline.hpp b/engine/inc/renderer/3d/pipeline/dynamic/dynamic_pipeline.hpp index 8a53d21..bb755fa 100644 --- a/engine/inc/renderer/3d/pipeline/dynamic/dynamic_pipeline.hpp +++ b/engine/inc/renderer/3d/pipeline/dynamic/dynamic_pipeline.hpp @@ -19,6 +19,12 @@ namespace Tyra { +/** + * Pipeline for animated models (DynamicMesh). + * Supports: + * - Simple PS2 clipping (culling) + * - Modes: color, texture+color, dir lights, texture + dir lights + */ class DynamicPipeline : public Renderer3DPipeline { public: DynamicPipeline(); @@ -33,7 +39,7 @@ class DynamicPipeline : public Renderer3DPipeline { void onUse(); /** - * Render 3D via "meshes". + * Render dynamic model. * This render() method is a bridge to core.render() method. */ void render(DynamicMesh* mesh, const DynPipOptions* options = nullptr); diff --git a/engine/inc/renderer/3d/pipeline/minecraft/minecraft_pipeline.hpp b/engine/inc/renderer/3d/pipeline/minecraft/minecraft_pipeline.hpp index 7a270e8..ca762dd 100644 --- a/engine/inc/renderer/3d/pipeline/minecraft/minecraft_pipeline.hpp +++ b/engine/inc/renderer/3d/pipeline/minecraft/minecraft_pipeline.hpp @@ -18,6 +18,10 @@ namespace Tyra { +/** + * Pipeline specialized in fast rendering of voxels + * Supports full "against each plane" clipping + */ class MinecraftPipeline : public Renderer3DPipeline { public: MinecraftPipeline(); @@ -27,8 +31,18 @@ class MinecraftPipeline : public Renderer3DPipeline { void onUse(); + /** + * @brief Render voxels + * + * @param blocks blocks to render + * @param count number of blocks to render + * @param t_tex texture to use + * @param isMulti is this a 6 texture voxel? + * @param noFullClipChecks true = faster, simple PS2 clipping. False = slower + * "against each plane" clipping. + */ void render(McpipBlock* blocks, const u32& count, Texture* t_tex, - const bool& isMulti = false, const bool& noClipChecks = true); + const bool& isMulti = false, const bool& noFullClipChecks = true); inline const float& getTextureOffset() const { return manager.getTextureOffset(); diff --git a/engine/inc/renderer/3d/pipeline/static/static_pipeline.hpp b/engine/inc/renderer/3d/pipeline/static/static_pipeline.hpp index 8ec7172..3931bb1 100644 --- a/engine/inc/renderer/3d/pipeline/static/static_pipeline.hpp +++ b/engine/inc/renderer/3d/pipeline/static/static_pipeline.hpp @@ -20,6 +20,12 @@ namespace Tyra { +/** + * Pipeline for static models (StaticMesh). + * Supports: + * - Full "against each plane" clipping, + * - Modes: color(s), texture+color(s), dir lights, texture + dir lights + */ class StaticPipeline : public Renderer3DPipeline { public: StaticPipeline(); @@ -32,7 +38,7 @@ class StaticPipeline : public Renderer3DPipeline { void onUse(); /** - * Render 3D via "meshes". + * Render static model * This render() method is a bridge to core.render() method. */ void render(DynamicMesh* mesh, const StaPipOptions* options = nullptr); diff --git a/engine/src/renderer/3d/pipeline/minecraft/minecraft_pipeline.cpp b/engine/src/renderer/3d/pipeline/minecraft/minecraft_pipeline.cpp index 19c4487..3f27ddc 100644 --- a/engine/src/renderer/3d/pipeline/minecraft/minecraft_pipeline.cpp +++ b/engine/src/renderer/3d/pipeline/minecraft/minecraft_pipeline.cpp @@ -42,14 +42,14 @@ void MinecraftPipeline::initBBox() { void MinecraftPipeline::render(McpipBlock* blocks, const u32& count, Texture* t_tex, const bool& isMulti, - const bool& noClipChecks) { + const bool& noFullClipChecks) { auto texBuffers = rendererCore->texture.useTexture(t_tex); rendererCore->gs.prim.mapping = 1; manager.clearLastProgram(); std::vector cullIndexes; - if (noClipChecks) { + if (noFullClipChecks) { for (u32 i = 0; i < count; i++) cullIndexes.push_back(i); cull(blocks, cullIndexes, &texBuffers, isMulti); } else {