| 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) */ |
nothing calls this directly
no test coverage detected