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

renamed LibNode to NodeLib #7830

Merged
merged 4 commits into from
Dec 21, 2015
Merged

renamed LibNode to NodeLib #7830

merged 4 commits into from
Dec 21, 2015

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Dec 21, 2015

Hi. I renamed LibNode to NodeLib
LibNode is not a Node is more like a ShaderLib.

@sunag
Copy link
Collaborator Author

sunag commented Dec 21, 2015

cache improvement prevents some bugs in StandardNodeMaterial and also support TextureNode in environment for something like Spherical Reflection with Roughness.

@@ -131,7 +131,7 @@ THREE.PhongNode.prototype.build = function( builder ) {
var normal = this.normal ? this.normal.buildCode( builder, 'v3' ) : undefined;
var normalScale = this.normalScale && this.normal ? this.normalScale.buildCode( builder, 'fv1' ) : undefined;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

normalScale should be a vec2, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sunag. Great work, BTW!

Sorry, I do not understand your reply... Maybe I am missing something, but what I was pointing out is bumpScale is univariate, but normalScale is bivariate.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I am missing something, but what I was pointing out is bumpScale is univariate, but normalScale is bivariate.

I had to run some tests. Really works but normalmap brings a scale value in .z which also affects the normal.

I did a vec2 refraction with manual scale here: sunag@157b93e

but looking better the textures I have to put a vec3 too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sunag. Great work, BTW!

Thanks, Great PBR Material too 👍 !

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sunag Sorry, I do not think I am making myself clear. In your code:

"vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 map, vec2 mUv, float scale ) {",

scale should be a vec2, and so should NormalMapNode.scale, because MeshPhongMaterial.normalScale is a Vector2().

In the examples, normalScale often must be Vector2( 1, - 1 ) -- depending on how the normal map is encoded.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, normalScale to vec2 looks nice, so soon send a update.

mrdoob added a commit that referenced this pull request Dec 21, 2015
renamed LibNode to NodeLib
@mrdoob mrdoob merged commit 9b7b3b9 into mrdoob:dev Dec 21, 2015
@sunag sunag mentioned this pull request Dec 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants