Scaling UV map in-game

Posted By: Dooley

Scaling UV map in-game - 03/29/15 04:30

I found this thread about rotating/panning the UV map.

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=173596&page=1

It also mentions that one might be able to change the scale as well. Is this possible? If so, would it change the UV scale for all entities using the same model, or could UVs be scaled independently of each other?

I'm not too experienced with materials and effects, but could anyone clarify where this code would be used?

Sorry for all the questions ... hoping someone has done this before!
Posted By: sivan

Re: Scaling UV map in-game - 03/29/15 12:11

you can change independetly for each entity if you use an entity skill, read by the shader that can be used by a lot of entities, to use it as scaling parameter.

e.g. in vertex shader:

Out.tex.x = entuscale * In.tex.x;
Out.tex.y = entvscale * In.tex.y;
Posted By: Dooley

Re: Scaling UV map in-game - 03/31/15 08:43

Thank you! I will try this out.
© 2024 lite-C Forums