Skip to content

Commit 287cb8b

Browse files
authored
Merge pull request #485 from laurennlam/fix_opengl_image_mapper
fix(OpenGLImageMapper): shader modification to create a vec4
2 parents 487a350 + f22edef commit 287cb8b

File tree

1 file changed

+3
-3
lines changed
  • Sources/Rendering/OpenGL/ImageMapper

1 file changed

+3
-3
lines changed

Sources/Rendering/OpenGL/ImageMapper/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ function vtkOpenGLImageMapper(publicAPI, model) {
144144
'//VTK::TCoord::Impl',
145145
[
146146
'vec4 tcolor = scale*texture2D(texture1, tcoordVCVSOutput.st) + shift;',
147-
'gl_FragData[0] = vec4(texture2D(colorTexture1, vec2(tcolor.r,0.5)),',
148-
' texture2D(colorTexture1, vec2(tcolor.g,0.5)),',
149-
' texture2D(colorTexture1, vec2(tcolor.b,0.5)), tcolor.a);',
147+
'gl_FragData[0] = vec4(texture2D(colorTexture1, vec2(tcolor.r,0.5)).r,',
148+
' texture2D(colorTexture1, vec2(tcolor.g,0.5)).r,',
149+
' texture2D(colorTexture1, vec2(tcolor.b,0.5)).r, tcolor.a);',
150150
]
151151
).result;
152152
}

0 commit comments

Comments
 (0)