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

Disp color mix #2620

Merged
merged 4 commits into from
Oct 6, 2022
Merged

Disp color mix #2620

merged 4 commits into from
Oct 6, 2022

Conversation

e2002e
Copy link
Contributor

@e2002e e2002e commented Oct 3, 2022

For #2618, without the changes for #2616.

@@ -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)
Copy link
Member

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?

Copy link
Contributor Author

@e2002e e2002e Oct 4, 2022

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.

Copy link
Collaborator

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.

@MoritzBrueckner MoritzBrueckner added the Release Notes: Fixes A pull request that fixes something. Used to generate release notes. label Oct 4, 2022
@e2002e
Copy link
Contributor Author

e2002e commented Oct 5, 2022

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.
So I think it's ok to just create the variable n and assign it wnormal in the tese shader.

@luboslenco luboslenco merged commit df2cdda into armory3d:main Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release Notes: Fixes A pull request that fixes something. Used to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants