Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

A problem with texture #303

Closed
arvifox opened this issue Sep 5, 2018 · 3 comments
Closed

A problem with texture #303

arvifox opened this issue Sep 5, 2018 · 3 comments

Comments

@arvifox
Copy link

arvifox commented Sep 5, 2018

Hi everyone.
I built sfb file from obj. You can see at the image below.
img-2018-09-05-10-37-26
If I change the texture I get a problem.
screenshot_20180905-034117
In the center of model texture is correct, and on the right and left side texture is stretched.
Where is the problem?

@arvifox
Copy link
Author

arvifox commented Sep 5, 2018

The code is here https://github.com/arvifox/sceneformsofatest
based on hellosceneform sample
my device is samsung sm-g935f, api 24

@dsternfeld7
Copy link

Are you changing the texture at runtime or in the sfb? If it is at runtime, you likely need to set the sampler for the texture so that the texture repeats.

    Texture.Sampler sampler = Texture.Sampler.builder().setWrapMode(WrapMode.REPEAT).build();
    Texture.builder().setSampler(sampler);

@arvifox
Copy link
Author

arvifox commented Sep 10, 2018

@dsternfeld7 thanks. it works.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants