History

Web Entities now render correctly as well

Anthony Thibault committed 10 years ago

Commit ea310bc1 parent be6e4015 files · +18 −18Browse files

Showing the changes to libraries/render-utils/src/GeometryCache.cpp (1 of 5 files). Show all

Unified · Split

libraries/render-utils/src/GeometryCache.cpp+9−9
@@ -35,7 +35,7 @@ · 34 unmodified lines
3535 #include "simple_vert.h"
3636 #include "simple_textured_frag.h"
3737 #include "simple_textured_unlit_frag.h"
38−#include "simple_srgb_textured_unlit_no_dst_alpha_frag.h"
38+#include "simple_srgb_textured_unlit_no_tex_alpha_frag.h"
3939 #include "glowLine_vert.h"
4040 #include "glowLine_geom.h"
4141 #include "glowLine_frag.h"
@@ -1749,25 +1749,25 @@ inline bool operator==(const SimpleProgramKey& a, const SimpleProgramKey& b) { · 1707 unmodified lines
17491749 return a.getRaw() == b.getRaw();
17501750 }
17511751
1752−void GeometryCache::bindSimpleSRGBTexturedUnlitNoDstAlphaProgram(gpu::Batch& batch) {
1753− batch.setPipeline(getSimpleSRGBTexturedUnlitNoDstAlphaPipeline());
1752+void GeometryCache::bindSimpleSRGBTexturedUnlitNoTexAlphaProgram(gpu::Batch& batch) {
1753+ batch.setPipeline(getSimpleSRGBTexturedUnlitNoTexAlphaPipeline());
17541754 // Set a default normal map
17551755 batch.setResourceTexture(render::ShapePipeline::Slot::MAP::NORMAL_FITTING,
17561756 DependencyManager::get<TextureCache>()->getNormalFittingTexture());
17571757 }
17581758
1759−gpu::PipelinePointer GeometryCache::getSimpleSRGBTexturedUnlitNoDstAlphaPipeline() {
1759+gpu::PipelinePointer GeometryCache::getSimpleSRGBTexturedUnlitNoTexAlphaPipeline() {
17601760 // Compile the shaders, once
17611761 static std::once_flag once;
17621762 std::call_once(once, [&]() {
17631763 auto VS = gpu::Shader::createVertex(std::string(simple_vert));
1764− auto PS = gpu::Shader::createPixel(std::string(simple_srgb_textured_unlit_no_dst_alpha_frag));
1764+ auto PS = gpu::Shader::createPixel(std::string(simple_srgb_textured_unlit_no_tex_alpha_frag));
17651765
1766− _simpleSRGBTexturedUnlitNoDstAlphaShader = gpu::Shader::createProgram(VS, PS);
1766+ _simpleSRGBTexturedUnlitNoTexAlphaShader = gpu::Shader::createProgram(VS, PS);
17671767
17681768 gpu::Shader::BindingSet slotBindings;
17691769 slotBindings.insert(gpu::Shader::Binding(std::string("normalFittingMap"), render::ShapePipeline::Slot::MAP::NORMAL_FITTING));
1770− gpu::Shader::makeProgram(*_simpleSRGBTexturedUnlitNoDstAlphaShader, slotBindings);
1770+ gpu::Shader::makeProgram(*_simpleSRGBTexturedUnlitNoTexAlphaShader, slotBindings);
17711771 auto state = std::make_shared<gpu::State>();
17721772 state->setCullMode(gpu::State::CULL_NONE);
17731773 state->setDepthTest(true, true, gpu::LESS_EQUAL);
@@ -1775,10 +1775,10 @@ gpu::PipelinePointer GeometryCache::getSimpleSRGBTexturedUnlitNoDstAlphaPipeline · 1 unmodified line
17751775 gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::INV_SRC_ALPHA,
17761776 gpu::State::FACTOR_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::ONE);
17771777
1778− _simpleSRGBTexturedUnlitNoDstAlphaPipeline = gpu::Pipeline::create(_simpleSRGBTexturedUnlitNoDstAlphaShader, state);
1778+ _simpleSRGBTexturedUnlitNoTexAlphaPipeline = gpu::Pipeline::create(_simpleSRGBTexturedUnlitNoTexAlphaShader, state);
17791779 });
17801780
1781− return _simpleSRGBTexturedUnlitNoDstAlphaPipeline;
1781+ return _simpleSRGBTexturedUnlitNoTexAlphaPipeline;
17821782 }
17831783
17841784 void GeometryCache::bindSimpleProgram(gpu::Batch& batch, bool textured, bool culled, bool unlit, bool depthBiased) {