Jump to content
  • Advertisement
DividedByZero

DX11 Texture repeat question

Recommended Posts

Hi Guys,

I have a simple quad that I am using as a basic ground plane. I am using a texture that is located at 0.75, 0.75 to 1.0, 1.0 on a texture map.

Just wondering, is it possible to repeat that portion of texture on the quad, say 10 times?

The methods I have tried expect that the texture is using the full texture map (i.e. I get unwanted sections of other textures), but I only want to repeat a section, as I have multiple textures on the texture map.

Or do I have to increase the number of quads in the ground plane in this type of scenario?

Any ideas would be awesome.

Thanks in advance :)

Share this post


Link to post
Share on other sites
Advertisement

Hi,

I think you'd have to find a way to modify your domain range specified by ADDRESS_MODE_WRAP which wraps at interger junctions which I bet is not doable AFAIK.

I think the best approach is to introdude 10 quads, each quad's vertex texture coords would have to address the same portion of the texture in UV coordinates. 🙂

Edited by John321

Share this post


Link to post
Share on other sites

Thanks John, I suspected this might be the case.

Thought I'd throw it out there though, just in case there was a simple way I wasn't aware of.

Writing a routine to up the quads isn't a big problem. 

Thanks again. 😊

Share this post


Link to post
Share on other sites

To get repeating texture specify > 1.0 for UV coords. You can put a 10x10 texture grid on a 1x1 plane by using 10.0 for both U and V.

Share this post


Link to post
Share on other sites
14 minutes ago, fleabay said:

To get repeating texture specify > 1.0 for UV coords. You can put a 10x10 texture grid on a 1x1 plane by using 10.0 for both U and V.

Doesn't work in this type of case as I am not using the entire texture map for the section of texture I wan't to repeat.

As I mentioned in the original post, the section of the map I wan't to repeat is at 0.75, 0.75 to 1.0, 1.0.

Using 10.0 for U & V will repeat the entire texture page.

Share this post


Link to post
Share on other sites
14 minutes ago, DividedByZero said:

Using 10.0 for U & V will repeat the entire texture page.

The UV's I'm referring to are the vertex attributes on the plane. Also I think using 10.0 on the texture would zoom 10x.

Share this post


Link to post
Share on other sites
8 minutes ago, fleabay said:

The UV's I'm referring to are the vertex attributes on the plane.

Now you have lost me.

 

8 minutes ago, fleabay said:

Also I think using 10.0 on the texture would zoom 10x.

I have found it normally repeats 10x.

Zooming in 10x doesn't make sense to me. If you zoom in, 10x then you'd only see a tenth of the texture. Same as if your UV's were 0 to 0.1.

 

 

Share this post


Link to post
Share on other sites
1 minute ago, fleabay said:

Your geometry contains UV coords, right?

 

Correct.

Don't want to come across as rude, but for the third time, the UV co-ords are mapped around 0.75, 0.75 to 1.0, 1.0.

Share this post


Link to post
Share on other sites
4 minutes ago, fleabay said:

Your geometry contains UV coords, right?

 

You definitely missed what author are trying to achieve. 

Edited by _Engine_

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!