I'm just messing around with the shader tutorials an I tried to wrap a texture around a model which works but uses the UV Set defined in the model. Is it possible to wrap it around the model regardless of the given UV Set of the model ? The Point is that I deform the models at runtime but the textures should keep their proportions no matter what size the model gets.
Re: Wrapping Texture around Object
[Re: AlexDeloy]
#248612 01/27/0923:0101/27/0923:01
differs on what you do. You can use a material matrix for fixed functions iirc or you can just read different coordinates from the texture in a shader like color = tex2D(texture0, texcoords.xy * 2); // with 2 being the scale factor
you should try triplanar projection. use world coordinates and blend the textured based on the angle to your x, y and z axis. it's not trivial but works very well.
Re: Wrapping Texture around Object
[Re: Joey]
#249036 01/31/0908:3501/31/0908:35