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

Function lib_glsl_fwidthCoarse

src/GLSLLibrary.cpp:213–225  ·  view source on GitHub ↗

mathematics */

Source from the content-addressed store, hash-verified

211
212 /* mathematics */
213 bv_variable lib_glsl_fwidthCoarse(bv_program* prog, u8 count, bv_variable* args)
214 {
215 /* TODO: requires dFdx/yCoarse */
216 /* fwidthCoarse(genType) */
217 if (count == 1) {
218 if (args[0].type == bv_type_object) { // fwidthCoarse(vec3), ...
219 bv_object* vec = bv_variable_get_object(args[0]);
220 return Common::create_vec(prog, bv_type_float, vec->type->props.name_count);
221 }
222 else {} // fwidthCoarse(scalar)
223 }
224 return bv_variable_create_float(0.0f);
225 }
226 bv_variable lib_glsl_fwidthFine(bv_program* prog, u8 count, bv_variable* args)
227 {
228 /* TODO: requires dFdx/yFine */

Callers

nothing calls this directly

Calls 1

create_vecFunction · 0.85

Tested by

no test coverage detected