Problem texture scaling

Posted By: Progger

Problem texture scaling - 09/06/11 18:00

Hi to make the fps better i want to scale a model but my problem is when i scale it with my.scale_x=2; my.scale_y=2; then the texture gets bigger but i dont want it i want it the normal size but tiled in 4 parts.How can i reach it do you know a shader for it?
WFG PRogger laugh
Posted By: HeelX

Re: Problem texture scaling - 09/06/11 18:26

Hi, when you scale an entity, the UV coordinates won't change. To achieve the effect, load the model in MED, scale it to the double size and and rescale the UV coordinates in the skin editor, until they are tiled (or do that in the editor in which you created the model, I dunno).

To dynamically change the tiling of a texture, you need a shader for that, yes.
Posted By: Progger

Re: Problem texture scaling - 09/06/11 18:55

@HeelX thanks for ur answer laugh
hm i think shader would be better do you know such a shader or is it complicated to create one?
WFG Progger
Posted By: HeelX

Re: Problem texture scaling - 09/06/11 18:57

If I am not mistaken you just have to write a vertex shader, which passes the texture coordinate, scaled by a constant factor (or a variable one via entity skills).
Posted By: Progger

Re: Problem texture scaling - 09/06/11 19:26

@HeelX ok thank you then i must learn shading laugh there is no day without learning something grin
© 2024 lite-C Forums