unplugged-system/external/skia/tests/sksl/wgsl/MainDoesNotHaveFragCoordParameter.wgsl

16 lines
428 B
WebGPU Shading Language
Raw Normal View History

struct FSIn {
@builtin(front_facing) sk_Clockwise: bool,
@builtin(position) sk_FragCoord: vec4<f32>,
};
struct FSOut {
@location(0) sk_FragColor: vec4<f32>,
};
fn main(_stageIn: FSIn) -> vec4<f32> {
return vec4<f32>(f32(_stageIn.sk_FragCoord.x), 0.0, 0.0, 1.0);
}
@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut {
var _stageOut: FSOut;
_stageOut.sk_FragColor = main(_stageIn);
return _stageOut;
}