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

BF: Out should be varying and alpha is not passed to shader #300

Merged
merged 1 commit into from Aug 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 2 additions & 7 deletions docs/tutorials/04_shaders/viz_shader.py
Expand Up @@ -51,15 +51,15 @@
fragment_shader_code_decl = \
"""
uniform float time;
out vec4 myVertexVC;
varying vec4 myVertexVC;
"""

fragment_shader_code_impl = \
"""
vec2 iResolution = vec2(1024,720);
vec2 uv = myVertexVC.xy/iResolution;
vec3 col = 0.5 + 0.5 * cos((time/30) + uv.xyx + vec3(0, 2, 4));
fragOutput0 = vec4(col, 1.0);
fragOutput0 = vec4(col, fragOutput0.a);
"""

shader_to_actor(utah, "vertex", impl_code=vertex_shader_code_impl,
Expand Down Expand Up @@ -108,11 +108,6 @@ def shader_callback(_caller, _event, calldata=None):
tb = ui.TextBlock2D()
tb.message = "Hello Shaders"

###############################################################################
# Change the property of the actor

utah.GetProperty().SetOpacity(0.5)

###############################################################################
# Show Manager
#
Expand Down