mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 08:13:27 +00:00
92287c30b5
Make the HLSL backend more like other backends by using `back::Baked` to generate names for baked expression identifiers. This removes the final uses of `Handle::index` from the HLSL backend. This is separated out from the previous commit because it changes lots of snapshot tests, whereas the previous commit has no effect on Naga's output.
28 lines
696 B
HLSL
28 lines
696 B
HLSL
struct FragmentOutput {
|
|
float4 color : SV_Target0;
|
|
float4 mask : SV_Target1;
|
|
};
|
|
|
|
struct FragmentInput_main {
|
|
float4 position_1 : SV_Position;
|
|
};
|
|
|
|
FragmentOutput ConstructFragmentOutput(float4 arg0, float4 arg1) {
|
|
FragmentOutput ret = (FragmentOutput)0;
|
|
ret.color = arg0;
|
|
ret.mask = arg1;
|
|
return ret;
|
|
}
|
|
|
|
FragmentOutput main(FragmentInput_main fragmentinput_main)
|
|
{
|
|
float4 position = fragmentinput_main.position_1;
|
|
float4 color = float4(0.4, 0.3, 0.2, 0.1);
|
|
float4 mask = float4(0.9, 0.8, 0.7, 0.6);
|
|
|
|
float4 _e13 = color;
|
|
float4 _e14 = mask;
|
|
const FragmentOutput fragmentoutput = ConstructFragmentOutput(_e13, _e14);
|
|
return fragmentoutput;
|
|
}
|