Skip to content

Commit 3d1ee44

Browse files
committed
Some work on Transparency.
1 parent 807b81a commit 3d1ee44

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

src/Interface/Modules/Render/ES/systems/RenderBasicSysTrans.cc

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -287,15 +287,6 @@ class RenderBasicSysTrans :
287287
GL(glBindBuffer(GL_ARRAY_BUFFER, vbo.front().glid));
288288
GL(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, iboID));
289289

290-
bool depthMask = glIsEnabled(GL_DEPTH_WRITEMASK);
291-
bool cullFace = glIsEnabled(GL_CULL_FACE);
292-
bool blend = glIsEnabled(GL_BLEND);
293-
294-
GL(glDepthMask(GL_FALSE));
295-
GL(glDisable(GL_CULL_FACE));
296-
GL(glEnable(GL_BLEND));
297-
GL(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));
298-
299290
// Bind any common uniforms.
300291
if (commonUniforms.size() > 0)
301292
{
@@ -314,10 +305,14 @@ class RenderBasicSysTrans :
314305

315306
// Disable zwrite if we are rendering a transparent object.
316307
//if (srstate.front().state.get(RenderState::USE_TRANSPARENCY))
317-
{
318-
GL(glDepthMask(GL_FALSE));
319-
GL(glDisable(GL_CULL_FACE));
320-
}
308+
bool depthMask = glIsEnabled(GL_DEPTH_WRITEMASK);
309+
bool cullFace = glIsEnabled(GL_CULL_FACE);
310+
bool blend = glIsEnabled(GL_BLEND);
311+
312+
GL(glDepthMask(GL_FALSE));
313+
GL(glDisable(GL_CULL_FACE));
314+
GL(glEnable(GL_BLEND));
315+
GL(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));
321316

322317
if (rlist.size() > 0)
323318
{

src/Modules/Visualization/ShowField.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ void ShowFieldModule::renderFacesLinear(
618618

619619
if (state.get(RenderState::USE_TRANSPARENCY))
620620
{
621-
uniforms.push_back(GeometryObject::SpireSubPass::Uniform("uTransparency", (float)(0.75f)));
621+
uniforms.push_back(GeometryObject::SpireSubPass::Uniform("uTransparency", (float)(0.4f)));
622622
}
623623
else
624624
{

0 commit comments

Comments
 (0)