when using this flag the global predefined vectors trace_uv1 and trace_uv2 would get set to the exact texture coordinates of the c_trace hit location.
trace_uv1 = coordinates in the first uv-set trace_uv2 = coordinates in the second uv-set
this would be helpful once entities can have light maps (thanks for adding ent_setmesh()!) since with entities tex_light probably won't work? with the GET_UVS flag we could read the light map brightness ourselves.
it also would be helpful for painting entities (blood splotches, graffitis,...).
c_trace uses a VERTEX struct. It does not fill in the second UV set, though, only the first. The second set has little importance as it's normally tiled and thus contains no usable information about the hit point on the texture.
However, of course we can also fill in the second set in a future version.
Re: c_trace -> GET_UVS flag
[Re: jcl]
#124465 11/27/0712:1311/27/0712:13
it has importance for users who use light mapping on models since with it the brightness of the light map could be accessed. it would be great if you could fill the second one too!
at the moment we have to use our own raycast function but this isn't a very elegant solution if it would only take a small c_trace() change anyway.
For light mapping on models you should definitely use the first UV set, not the second one. The A6 and A7 engines use the second UV set for tiled textures, detailmaps and so on.
The reason is that the first UV set must be nontiled and use unique texture coordinates. Otherwise many parts of the engine would not work properly, like the light mapping algorithms, trace, and the upcoming decal system. Also all the shaders we're developing for A7 expect the lightmap on the first UV set.
However you'll get the second and also the 3rd UV set of the VERTEX struct through c_trace in future engine versions. Maybe already in 7.07, but at least in 7.08.
Re: c_trace -> GET_UVS flag
[Re: jcl]
#124467 11/27/0712:5511/27/0712:55