| 2316 | return ret; |
| 2317 | } |
| 2318 | bv_variable lib_common_dot(bv_program* prog, u8 count, bv_variable* args) |
| 2319 | { |
| 2320 | /* float dot(genType) */ |
| 2321 | bv_variable ret = bv_variable_create_float(0.0f); |
| 2322 | if (args[0].type == bv_type_object) { |
| 2323 | glm::vec4 x = sd::AsVector<4, float>(args[0]); |
| 2324 | glm::vec4 y = sd::AsVector<4, float>(args[1]); |
| 2325 | bv_variable_set_float(&ret, glm::dot(x, y)); |
| 2326 | } |
| 2327 | else { |
| 2328 | float x = bv_variable_get_float(bv_variable_cast(bv_type_float, args[0])); |
| 2329 | float y = bv_variable_get_float(bv_variable_cast(bv_type_float, args[1])); |
| 2330 | bv_variable_set_float(&ret, glm::dot(x, y)); |
| 2331 | } |
| 2332 | |
| 2333 | return ret; |
| 2334 | } |
| 2335 | bv_variable lib_common_faceforward(bv_program* prog, u8 count, bv_variable* args) |
| 2336 | { |
| 2337 | /* genType faceforward(genType,genType,genType) */ |
nothing calls this directly
no outgoing calls
no test coverage detected