1struct FSIn { 2 @builtin(front_facing) sk_Clockwise: bool, 3}; 4struct FSOut { 5 @location(0) sk_FragColor: vec4<f32>, 6}; 7struct _GlobalUniforms { 8 colorGreen: vec4<f32>, 9 colorRed: vec4<f32>, 10}; 11@binding(0) @group(0) var<uniform> _globalUniforms: _GlobalUniforms; 12fn main(_stageOut: ptr<function, FSOut>) { 13 if (_globalUniforms.colorGreen.y == 1.0) { 14 (*_stageOut).sk_FragColor = _globalUniforms.colorGreen; 15 } 16 else if (_globalUniforms.colorRed.x == 1.0) { 17 if (_globalUniforms.colorRed.y == 0.0) { 18 (*_stageOut).sk_FragColor = _globalUniforms.colorGreen; 19 } 20 else { 21 (*_stageOut).sk_FragColor = _globalUniforms.colorRed; 22 } 23 } 24 else { 25 (*_stageOut).sk_FragColor = _globalUniforms.colorRed; 26 } 27} 28@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { 29 var _stageOut: FSOut; 30 main(&_stageOut); 31 return _stageOut; 32} 33