-
Notifications
You must be signed in to change notification settings - Fork 322
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
Disp color mix #2620
Disp color mix #2620
Conversation
blender/arm/material/make_tess.py
Outdated
@@ -24,6 +24,7 @@ def interpolate(tese, var, size, normalize=False, declare_out=False): | |||
|
|||
if normalize: | |||
s += '{0}{1} = normalize({1}_0 + {1}_1 + {1}_2);\n'.format(prep, var) | |||
s += 'vec3 n = normalize({0});\n'.format(var) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need normalize() here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well no, but in this case n is useless and should be replaced with wposition.
vec3 TextureCoordinate_Normal_res = n;
Problem is I don't see where this line comes from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value of TextureCoordinate_Normal_res
is probably generated in nodes_input.parse_texcoord()
(called from within cycles.parse_vector()
), and the name is generated here.
I wanted to avoid creating the variable n and instead pass wnormal to the input normal from parse_texcoord, but this requires checking if we are using tessellation, and also verifying that we only do so for the tessellation shaders. |
For #2618, without the changes for #2616.