MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / get_render_data

Method get_render_data

src/SB/Core/x/xDecal.cpp:302–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302void xDecalEmitter::get_render_data(const xDecalEmitter::unit_data& unit, F32 scale, iColor_tag& color, xMat4x3& mat, xVec2& uv0, xVec2& uv1)
303{
304 lerp(color, unit.frac, this->curve[unit.curve_index].color, this->curve[unit.curve_index + 1].color);
305
306 if (this->cfg.flags & 0x2)
307 {
308 mat = globals.camera.mat;
309
310 mat.right *= scale * unit.mat.right.x;
311 mat.up *= scale * unit.mat.right.y;
312 mat.at *= scale * unit.mat.right.z;
313 mat.pos = unit.mat.pos;
314 }
315 else
316 {
317 mat = unit.mat;
318
319 mat.right *= scale;
320 mat.up *= scale;
321 mat.at *= scale;
322 }
323
324 uv1.x = this->curve_index * this->texture.size.x + this->cfg.texture.uv[0].x;
325 uv1.y = this->curve_index * this->texture.size.y + this->cfg.texture.uv[0].y;
326 uv0.x = this->curve_index * this->texture.size.x + this->cfg.texture.uv[1].x;
327 uv0.y = this->curve_index * this->texture.size.y + this->cfg.texture.uv[1].y;
328}
329
330namespace
331{

Callers

nothing calls this directly

Calls 1

lerpFunction · 0.70

Tested by

no test coverage detected