First working example

This commit is contained in:
2023-05-29 19:50:04 -07:00
parent 96dd33c6b8
commit 8da23b123a
21 changed files with 263 additions and 161 deletions

View File

@ -3,7 +3,7 @@
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "display/shader/SimpleBillboardedShader.hpp"
#include "display/shader/shaders/SimpleBillboardedShader.hpp"
#include "SimpleBillboardedMaterial.hpp"
#include "game/DawnGame.hpp"

View File

@ -36,8 +36,12 @@ std::vector<struct ShaderPassItem> SimpleTexturedMaterial::getRenderPasses() {
onlyPass.shader = shader;
onlyPass.colorValues[shader->paramColor] = this->color;
onlyPass.matrixValues[shader->paramModel] = this->transform->getWorldTransform();
onlyPass.matrixValues[shader->paramView] = camera->transform->getWorldTransform();
onlyPass.matrixValues[shader->paramProjection] = camera->getProjection();
onlyPass.parameterBuffers[shader->bufferRenderPipeline] = &this->getGame()->renderManager.getRenderPipeline()->shaderBuffer;
// onlyPass.matrixValues[shader->paramView] = camera->transform->getWorldTransform();
// onlyPass.matrixValues[shader->paramProjection] = camera->getProjection();
onlyPass.renderFlags = (
RENDER_MANAGER_RENDER_FLAG_BLEND |
RENDER_MANAGER_RENDER_FLAG_DEPTH_TEST