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

NodeMaterial PMREM custom size #16878

Merged
merged 3 commits into from
Jun 23, 2019
Merged

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Jun 21, 2019

@sunag
Copy link
Collaborator Author

sunag commented Jun 21, 2019

With this approach is possible to create multiples PMREMs for the same material each with different sizes.

@sunag
Copy link
Collaborator Author

sunag commented Jun 21, 2019

Usage

nodeTexture = new THREE.TextureNode( pmremCubeUVPacker.CubeUVRenderTarget.texture );
nodeTextureSize = new THREE.FloatNode( 1024 );

nodeMaterial.environment = new THREE.TextureCubeNode( nodeTexture, nodeTextureSize );

@sunag sunag changed the title NodeMaterial PMREMCube custom size NodeMaterial PMREM custom size Jun 22, 2019
@mrdoob mrdoob added this to the r106 milestone Jun 23, 2019
@mrdoob mrdoob merged commit cbd2f62 into mrdoob:dev Jun 23, 2019
@mrdoob
Copy link
Owner

mrdoob commented Jun 23, 2019

Thanks!

@WestLangley
Copy link
Collaborator

@sunag Thanks for this. Please see webgl_materials_envmaps_hdr.html for how to modify this example to properly support modules.

@sunag
Copy link
Collaborator Author

sunag commented Jun 24, 2019

@WestLangley Apparently to this is possible is necessary makes this changes #16054

@WestLangley
Copy link
Collaborator

@sunag I do not think you should be referencing the THREE namespace in your example. import the classes you need.

@Mugen87 Correct?

@sunag
Copy link
Collaborator Author

sunag commented Jun 24, 2019

For this is necessary some changes in /nodes/ code, remove all THREE namespace dependencies that exists there.

@mrdoob
Copy link
Owner

mrdoob commented Jun 24, 2019

@WestLangley I'm actually changing that. Making the examples import the THREE namespace. Makes the development experience nicer (basically how it was before).

EDIT: I'm referring to the html files and not the files in /jsm.

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