Remove unused textures

This commit is contained in:
Malin E
2023-03-02 15:31:10 +01:00
parent 896ca0f108
commit fedbf9a31e
3 changed files with 3 additions and 28 deletions

View File

@@ -79,9 +79,8 @@ namespace {
"specularIntensity", "performManualDepthTest", "gBufferDepthTexture"
};
constexpr std::array<const char*, 5> UniformOpacityNames = {
"opacity", "colorTexture", "depthTexture", "positionTexture",
"normalTexture"
constexpr std::array<const char*, 3> UniformOpacityNames = {
"opacity", "colorTexture", "depthTexture"
};
constexpr openspace::properties::Property::PropertyInfo EnableAnimationInfo = {
@@ -860,25 +859,6 @@ void RenderableModel::render(const RenderData& data, RendererTasks&) {
);
_quadProgram->setUniform(_uniformOpacityCache.colorTexture, colorTextureUnit);
ghoul::opengl::TextureUnit positionTextureUnit;
positionTextureUnit.activate();
glBindTexture(
GL_TEXTURE_2D,
global::renderEngine->renderer()->additionalColorTexture2()
);
_quadProgram->setUniform(
_uniformOpacityCache.positionTexture,
positionTextureUnit
);
ghoul::opengl::TextureUnit normalTextureUnit;
normalTextureUnit.activate();
glBindTexture(
GL_TEXTURE_2D,
global::renderEngine->renderer()->additionalColorTexture3()
);
_quadProgram->setUniform(_uniformOpacityCache.normalTexture, normalTextureUnit);
ghoul::opengl::TextureUnit depthTextureUnit;
depthTextureUnit.activate();
glBindTexture(

View File

@@ -122,8 +122,7 @@ private:
// Opacity program
ghoul::opengl::ProgramObject* _quadProgram = nullptr;
UniformCache(opacity, colorTexture, depthTexture, positionTexture,
normalTexture) _uniformOpacityCache;
UniformCache(opacity, colorTexture, depthTexture) _uniformOpacityCache;
// Store the original RenderBin
Renderable::RenderBin _originalRenderBin;

View File

@@ -31,8 +31,6 @@ uniform float opacity = 1.0;
uniform sampler2D colorTexture;
uniform sampler2D depthTexture;
uniform sampler2D positionTexture;
uniform sampler2D normalTexture;
Fragment getFragment() {
Fragment frag;
@@ -46,8 +44,6 @@ Fragment getFragment() {
frag.color.a = opacity * textureColor.a;
frag.depth = denormalizeFloat(texture(depthTexture, vs_st).x);
frag.gPosition = texture(positionTexture, vs_st);
frag.gNormal = vec4(texture(normalTexture, vs_st).rgb, 0.0);
frag.disableLDR2HDR = true;
return frag;