Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Spiros Tsalikis
VTK
Commits
2c780961
Commit
2c780961
authored
1 year ago
by
Róbert Lexmann
Browse files
Options
Downloads
Patches
Plain Diff
RenderingOpenGL2: Fixed final blending of vtkOrderIndependentTranslucentPass.
parent
64e15b35
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Rendering/OpenGL2/glsl/vtkOrderIndependentTranslucentPassFinalFS.glsl
+1
-1
1 addition, 1 deletion
...enGL2/glsl/vtkOrderIndependentTranslucentPassFinalFS.glsl
Rendering/OpenGL2/vtkOrderIndependentTranslucentPass.cxx
+2
-5
2 additions, 5 deletions
Rendering/OpenGL2/vtkOrderIndependentTranslucentPass.cxx
with
3 additions
and
6 deletions
Rendering/OpenGL2/glsl/vtkOrderIndependentTranslucentPassFinalFS.glsl
+
1
−
1
View file @
2c780961
...
...
@@ -16,7 +16,7 @@ void main()
vec4
t1Color
=
texture
(
translucentRGBATexture
,
texCoord
);
float
t2Color
=
texture
(
translucentRTexture
,
texCoord
).
r
;
gl_FragData
[
0
]
=
vec4
(
t1Color
.
rgb
/
max
(
t2Color
,
0
.
01
),
t1Color
.
a
);
gl_FragData
[
0
]
=
vec4
(
t1Color
.
rgb
/
max
(
t2Color
,
0
.
01
),
1
.
0
-
t1Color
.
a
);
// gl_FragData[0] = vec4(t1Color.a, t1Color.a, t1Color.a, 0.0);
// gl_FragData[0] = vec4(t2Color, t2Color, t2Color, 0.0);
}
This diff is collapsed.
Click to expand it.
Rendering/OpenGL2/vtkOrderIndependentTranslucentPass.cxx
+
2
−
5
View file @
2c780961
...
...
@@ -325,8 +325,9 @@ void vtkOrderIndependentTranslucentPass::Render(const vtkRenderState* s)
// back to the original FO
this
->
State
->
PopFramebufferBindings
();
// Restore blending parameters:
this
->
State
->
vtkglBlendFuncSeparate
(
GL_ONE_MINUS_SRC_ALPHA
,
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
,
GL_SRC_ALPHA
);
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
,
GL_
ONE
,
GL_ONE_MINUS_
SRC_ALPHA
);
// Restore the original viewport and scissor test settings
this
->
State
->
vtkglViewport
(
...
...
@@ -359,10 +360,6 @@ void vtkOrderIndependentTranslucentPass::Render(const vtkRenderState* s)
}
#endif
// Restore blending parameters:
this
->
State
->
vtkglBlendFuncSeparate
(
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
,
GL_ONE
,
GL_ONE_MINUS_SRC_ALPHA
);
this
->
PostRender
(
s
);
this
->
NumberOfRenderedProps
=
this
->
TranslucentPass
->
GetNumberOfRenderedProps
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment