Sign in
cobalt
/
cobalt
/
08336faa599332e3e3bf29b7ad38ef023018b55e
/
.
/
third_party
/
skia_next
/
third_party
/
skia
/
resources
/
sksl
/
inliner
/
SwitchWithCastCanBeInlined.sksl
blob: 6658400379dbe765eb70ac47151fb2e7af9891c0 [
file
] [
log
] [
blame
]
uniform half4 color
;
inline
half4 switchy
(
half4 c
)
{
half4 result
;
switch
(
int
(
c
.
x
))
{
case
1
:
result
=
c
.
yyyy
;
break
;
default
:
result
=
c
.
zzzz
;
break
;
}
return
result
;
}
void
main
()
{
sk_FragColor
=
switchy
(
color
);
}