Fix textures over-tiling on meshes in Filament.

PiperOrigin-RevId: 965535047
Change-Id: I56177b7ac91591ba516bf96e317f57357539e776
This commit is contained in:
Yuval Tassa
2026-08-16 07:38:01 -07:00
committed by Copybara-Service
parent 3178db50b9
commit 68918d4f4d
2 changed files with 0 additions and 19 deletions
@@ -208,15 +208,6 @@ static void UpdateGeomMaterial(mjrfRenderable* renderable, const mjvGeom& geom,
material.uv_scale[0] = tex_repeat[0];
material.uv_scale[1] = tex_repeat[1];
if (geom.dataid >= 0 && geom.type != mjGEOM_PLANE) {
if (geom.size[0] > mjMINVAL) {
material.uv_scale[0] /= geom.size[0];
}
if (geom.size[1] > mjMINVAL) {
material.uv_scale[1] /= geom.size[1];
}
}
const bool is_infinite_plane =
geom.type == mjGEOM_PLANE && (geom.size[0] <= 0 || geom.size[1] <= 0);
if (is_infinite_plane) {
@@ -854,16 +854,6 @@ mjrfMaterial ModelRenderables::GetDefaultMaterial(mjtObj obj_type,
material.uv_scale[0] = tex_repeat[0];
material.uv_scale[1] = tex_repeat[1];
if (geom_type == mjGEOM_MESH || geom_type == mjGEOM_HFIELD ||
geom_type == mjGEOM_SDF) {
if (fsize[0] > mjMINVAL) {
material.uv_scale[0] /= fsize[0];
}
if (fsize[1] > mjMINVAL) {
material.uv_scale[1] /= fsize[1];
}
}
const bool is_infinite_plane =
geom_type == mjGEOM_PLANE && (fsize[0] <= 0 || fsize[1] <= 0);
if (is_infinite_plane) {