Files
wgpu/tests/out/standard.msl
T
2021-05-14 09:53:24 -04:00

18 lines
406 B
Plaintext

#include <metal_stdlib>
#include <simd/simd.h>
struct derivativesInput {
};
struct derivativesOutput {
metal::float4 member [[color(0)]];
};
fragment derivativesOutput derivatives(
metal::float4 foo [[position]]
) {
metal::float4 _e1 = metal::dfdx(foo);
metal::float4 _e2 = metal::dfdy(foo);
metal::float4 _e3 = metal::fwidth(foo);
return derivativesOutput { (_e1 + _e2) * _e3 };
}