Showing the changes to libraries/render-utils/src/GeometryCache.cpp (1 of 6 files). Show all
Unified · Split
| @@ -29,6 +29,8 @@ · 28 unmodified lines | ||
| 29 | 29 | #include "standardTransformPNTC_vert.h" |
| 30 | 30 | #include "standardDrawTexture_frag.h" |
| 31 | 31 | |
| 32 | +#include "gpu/StandardShaderLib.h" | |
| 33 | + | |
| 32 | 34 | //#define WANT_DEBUG |
| 33 | 35 | |
| 34 | 36 | const int GeometryCache::UNKNOWN_ID = -1; |
| @@ -1660,16 +1662,20 @@ void GeometryCache::useSimpleDrawPipeline(gpu::Batch& batch, bool noBlend) { · 1625 unmodified lines | ||
| 1660 | 1662 | |
| 1661 | 1663 | auto state = std::make_shared<gpu::State>(); |
| 1662 | 1664 | |
| 1665 | + | |
| 1663 | 1666 | // enable decal blend |
| 1664 | 1667 | state->setBlendFunction(true, gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::INV_SRC_ALPHA); |
| 1665 | 1668 | |
| 1666 | 1669 | _standardDrawPipeline.reset(gpu::Pipeline::create(program, state)); |
| 1667 | 1670 | |
| 1671 | + | |
| 1668 | 1672 | auto stateNoBlend = std::make_shared<gpu::State>(); |
| 1669 | − stateNoBlend->setColorWriteMask(true, true, true, false); | |
| 1670 | − stateNoBlend->setBlendFunction(true, gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::INV_SRC_ALPHA); | |
| 1673 | + // stateNoBlend->setColorWriteMask(true, true, true, false); | |
| 1674 | + // stateNoBlend->setBlendFunction(true, gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::INV_SRC_ALPHA); | |
| 1671 | 1675 | |
| 1672 | − _standardDrawPipelineNoBlend.reset(gpu::Pipeline::create(program, stateNoBlend)); | |
| 1676 | + auto programNoBlend = gpu::ShaderPointer(gpu::Shader::createProgram(vs, gpu::StandardShaderLib::getDrawTextureOpaquePS())); | |
| 1677 | + gpu::Shader::makeProgram((*programNoBlend)); | |
| 1678 | + _standardDrawPipelineNoBlend.reset(gpu::Pipeline::create(programNoBlend, stateNoBlend)); | |
| 1673 | 1679 | } |
| 1674 | 1680 | if (noBlend) { |
| 1675 | 1681 | batch.setPipeline(_standardDrawPipelineNoBlend); |