Original Post
🔒 Locked
calculate texture coordinates
Advertisement
Hi,
You can use the position of the vertex multiplied by some factor to get a texture to repeat over the terrain.
If you are using shaders you may so something like this in the vertex shader:
out.texcoord.xy = world_space_position.xy * factor;
where factor tells how many times the texture is repeated per 1 unit. If your units are meters and the factor is 1 , then the texture is repeated once every meter.
Cheers!
You can use the position of the vertex multiplied by some factor to get a texture to repeat over the terrain.
If you are using shaders you may so something like this in the vertex shader:
out.texcoord.xy = world_space_position.xy * factor;
where factor tells how many times the texture is repeated per 1 unit. If your units are meters and the factor is 1 , then the texture is repeated once every meter.
Cheers!
Hi,
Can you be a bit more specific? Like are the colors totally different than you expect (for example some of the RGB channels are swapped) or the texture is too bright / too dark (for example issue with gamma correction).
A screen shot also could help out a lot. Like, what you have and what you are supposed to have.
Cheers!
Can you be a bit more specific? Like are the colors totally different than you expect (for example some of the RGB channels are swapped) or the texture is too bright / too dark (for example issue with gamma correction).
A screen shot also could help out a lot. Like, what you have and what you are supposed to have.
Cheers!
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement
