MCPcopy Create free account
hub / github.com/dfranx/ShaderDebugger / lib_glsl_matrixCompMult

Function lib_glsl_matrixCompMult

src/GLSLLibrary.cpp:1327–1350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1325 return ret;
1326 }
1327 bv_variable lib_glsl_matrixCompMult(bv_program* prog, u8 count, bv_variable* args)
1328 {
1329 bv_variable ret = bv_variable_create_void();
1330
1331 if (count >= 2) {
1332 if (args[0].type == bv_type_object) { // floor(vec3), ...
1333 bv_object* x = bv_variable_get_object(args[0]);
1334 sd::Matrix* xData = (sd::Matrix*)x->user_data;
1335
1336 bv_object* y = bv_variable_get_object(args[1]);
1337 sd::Matrix* yData = (sd::Matrix*)y->user_data;
1338
1339 sd::Matrix* copyData = CopyMatrixData(xData);
1340
1341 for (int x = 0; x < xData->Columns; x++)
1342 for (int y = 0; y < xData->Rows; y++)
1343 copyData->Data[x][y] = yData->Data[x][y] * xData->Data[x][y];
1344
1345 return Common::create_mat(prog, x->type->name, copyData);
1346 }
1347 }
1348
1349 return ret;
1350 }
1351 bv_variable lib_glsl_outerProduct(bv_program* prog, u8 count, bv_variable* args)
1352 {
1353 bv_variable ret = bv_variable_create_void();

Callers

nothing calls this directly

Calls 2

CopyMatrixDataFunction · 0.85
create_matFunction · 0.85

Tested by

no test coverage detected