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

Feature proposal: Add a way to scale texture #431

Closed
nanto2016 opened this issue Apr 6, 2024 · 1 comment
Closed

Feature proposal: Add a way to scale texture #431

nanto2016 opened this issue Apr 6, 2024 · 1 comment

Comments

@nanto2016
Copy link

I currently have an HTerrain and the I have a grass texture on it. I find the texture too big and I would like each texture tile to be smaller.

If there was a simple "texture scale" property (just like Node3D.scale, except it would be Vector2) that would scale the texture before applying it to the HTerrain surface, this would fix my problem.

I thought of scaling down the entire HTerrain but to me, that seems like a really bad idea and that would not work well if you already built a good terrain. I searched for a feature like the one I am suggesting here but found nothing that could help. The best temporary solution would be to tile the texture in its file so that the texture is larger and is displayed smaller on the HTerrain but this is not very data efficient (takes extra disk space), and I think that a way to scale the texture would be very easy to implement.

What the problem looks like, the grass is too big:
image

Temporary solution, grass is smaller:
image

@nanto2016 nanto2016 changed the title Adding a way to scale texture Feature proposal: Add a way to scale texture Apr 6, 2024
@Zylann
Copy link
Owner

Zylann commented Apr 6, 2024

I think every shader already has an option to scale textures, with the u_ground_uv_scale property. Check the Shader Params category in the inspector.
The Classic4 shader even has u_ground_uv_scale_per_texture which allows to scale each texture individually.
If that's not enough for you, you can easily modify/fork the shader and add the scaling parameters you want.

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

No branches or pull requests

2 participants