| 1280 | return bv_variable_create_float(0.0f); // floor() must have 1 argument! |
| 1281 | } |
| 1282 | bv_variable lib_common_dFdx(bv_program* prog, u8 count, bv_variable* args) |
| 1283 | { |
| 1284 | /* TODO */ |
| 1285 | |
| 1286 | // IMPLEMENTATION IDEA: prog->user_data is pointer to sd::ShaderDebugger, maybe call dbg->Execute() |
| 1287 | // 2x2 (the block of fragments) and just shift gl_FragCoord.xy since we know |
| 1288 | // that the user is running GLSL code. |
| 1289 | // --OR--: add a property to ShaderDebugger: glm::vec4 FragmentBlock[4] which then can be used here |
| 1290 | // and user can fill the data however he wants to |
| 1291 | |
| 1292 | /* dFdx(genType) */ |
| 1293 | if (count == 1) { |
| 1294 | if (args[0].type == bv_type_object) { // dFdx(vec3), ... |
| 1295 | bv_object* vec = bv_variable_get_object(args[0]); |
| 1296 | return Common::create_vec(prog, bv_type_float, vec->type->props.name_count); |
| 1297 | } |
| 1298 | else {} // dFdx(scalar) |
| 1299 | } |
| 1300 | return bv_variable_create_float(0.0f); |
| 1301 | } |
| 1302 | bv_variable lib_common_dFdy(bv_program* prog, u8 count, bv_variable* args) |
| 1303 | { |
| 1304 | /* TODO */ |
nothing calls this directly
no test coverage detected