Jump to content

Repeat subsection of texture


fenomas
 Share

Recommended Posts

Hi,

 

I've been playing with the equivalent of texture atlases, and one limitation seems to be that it's not possible to get the equivalent of WRAP_ADDRESSMODE when using them.

 

Am I right in thinking that doing this would require a custom shader? I imagine it would require something like "texture.uClamp / texture.vClamp", analogous to uOffset/vOffset except specifying upper limits rather than lower limits of the texture area used. 

 

Has something like this been worked on before?

Link to comment
Share on other sites

Hey,

 

Currently you're right, there is no native way of repeating only a texture's subset on a mesh, so a custom shader is required. This may be a neat addition to the StandardMaterial of BJS though!

 

Note that OpenGL has a feature called 2D Texture Array that does exactly this, although it is not yet supported in WebGL.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...