Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volume visual has unset variable texture2D_LUT #1712

merged 1 commit into from Sep 26, 2019


Copy link

liuyenting commented Sep 26, 2019

When I try to use my own colormap using

n_colors = 256
t = np.linspace(0., 1., n_colors)
color = np.c_[t, t, t, t*0.05]
cmap = Colormap(color)

instead of the one from examples/basics/scene/

class TransGrays(BaseColormap):
    glsl_map = """
    vec4 translucent_grays(float t) {
        return vec4(t, t, t, t*0.05);

it keeps showing

Program has unset variables: {'texture2D_LUT'}

with a blank screen.

Not sure if this is the best way to do it, after comparing how cmap is configured in visuals.Image, visuals.Mesh, visuals.Colorbar and visuals.Line, I think texture2D_LUT is missing.

Copy link

djhoese left a comment

Nice catch! Thanks for fixing this. It must have slipped through the cracks when we updated the colormaps. I was curious how this ever worked, but looks like the texture_lut is only used on the Colormap class and BaseColormap classes like the one in don't need it.

Thanks again.

@djhoese djhoese merged commit 8b61cd4 into vispy:master Sep 26, 2019
6 checks passed
6 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
vispy.vispy Build #20190926.1 succeeded
vispy.vispy (linux) linux succeeded
vispy.vispy (macos) macos succeeded
vispy.vispy (windows) windows succeeded
@djhoese djhoese self-assigned this Oct 13, 2019
@djhoese djhoese added the type: fix label Oct 13, 2019
@djhoese djhoese added type: bug and removed type: fix labels Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.