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

Function lib_common_fwidth

src/CommonLibrary.cpp:1496–1508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1494 return bv_variable_create_float(0.0f); // floor() must have 1 argument!
1495 }
1496 bv_variable lib_common_fwidth(bv_program* prog, u8 count, bv_variable* args)
1497 {
1498 /* TODO: requires dFdx/y */
1499 /* fwidth(genType) */
1500 if (count == 1) {
1501 if (args[0].type == bv_type_object) { // fwidth(vec3), ...
1502 bv_object* vec = bv_variable_get_object(args[0]);
1503 return Common::create_vec(prog, bv_type_float, vec->type->props.name_count);
1504 }
1505 else {} // fwidth(scalar)
1506 }
1507 return bv_variable_create_float(0.0f);
1508 }
1509 bv_variable lib_common_inversesqrt(bv_program* prog, u8 count, bv_variable* args)
1510 {
1511 /* inversesqrt(genType), inversesqrt(genDType) */

Callers

nothing calls this directly

Calls 1

create_vecFunction · 0.85

Tested by

no test coverage detected