Fixed blending (for now)

This commit is contained in:
2023-06-26 18:36:58 -07:00
parent 2eb6c6a91f
commit ee7963fb1a
6 changed files with 17 additions and 83 deletions

View File

@ -36,9 +36,17 @@ std::vector<struct ShaderPassItem> SimpleTexturedMaterial::getRenderPasses(IRend
onlyPass.matrixValues[shader->paramModel] = this->transform->getWorldTransform();
onlyPass.parameterBuffers[shader->bufferRenderPipeline] = &context.renderPipeline->shaderBuffer;
onlyPass.renderFlags = (
RENDER_MANAGER_RENDER_FLAG_BLEND
);
if(this->opaque) {
onlyPass.renderFlags = (
RENDER_MANAGER_RENDER_FLAG_DEPTH_TEST
);
} else {
onlyPass.priority = 100;
onlyPass.renderFlags = (
RENDER_MANAGER_RENDER_FLAG_BLEND
);
}
if(this->texture != nullptr) {
onlyPass.boolValues[shader->paramHasTexture] = true;

View File

@ -17,6 +17,8 @@ namespace Dawn {
Texture *texture = nullptr;
// @optional
struct Color color = COLOR_WHITE;
// @optional
bool_t opaque = true;
/**
* SimpleTexturedShader scene item component interface.