mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-10-25 18:15:38 +00:00
TinyRenderer: support plane shape (creating similar textured plane to OpenGL renderer)
TinyRenderer: perform clipping in double precision to improve accuracy
This commit is contained in:
@@ -166,10 +166,10 @@ TGAColor Model::diffuse(Vec2f uvf)
|
||||
// bool repeat = true;
|
||||
// if (repeat)
|
||||
{
|
||||
uvf[0] = std::modf(uvf[0], &val);
|
||||
uvf[1] = std::modf(uvf[1], &val);
|
||||
}
|
||||
Vec2i uv(uvf[0] * diffusemap_.get_width(), uvf[1] * diffusemap_.get_height());
|
||||
uvf[0] = std::modf(uvf[0], &val);
|
||||
uvf[1] = std::modf(uvf[1], &val);
|
||||
}
|
||||
Vec2i uv(uvf[0] * diffusemap_.get_width(), uvf[1] * diffusemap_.get_height());
|
||||
return diffusemap_.get(uv[0], uv[1]);
|
||||
}
|
||||
return TGAColor(255, 255, 255, 255);
|
||||
|
||||
Reference in New Issue
Block a user