| 1 |
Texture2D<float4> uSampler : register(t0); |
| 2 |
SamplerState _uSampler_sampler : register(s0); |
| 3 |
|
| 4 |
static float4 FragColor; |
| 5 |
static float4 vInput; |
| 6 |
|
| 7 |
struct SPIRV_Cross_Input |
| 8 |
{ |
| 9 |
float4 vInput : TEXCOORD0; |
| 10 |
}; |
| 11 |
|
| 12 |
struct SPIRV_Cross_Output |
| 13 |
{ |
| 14 |
float4 FragColor : SV_Target0; |
| 15 |
}; |
| 16 |
|
| 17 |
void frag_main() |
| 18 |
{ |
| 19 |
FragColor = vInput; |
| 20 |
float4 t = uSampler.Sample(_uSampler_sampler, vInput.xy); |
| 21 |
float4 d0 = ddx(vInput); |
| 22 |
float4 d1 = ddy(vInput); |
| 23 |
float4 d2 = fwidth(vInput); |
| 24 |
float4 d3 = ddx_coarse(vInput); |
| 25 |
float4 d4 = ddy_coarse(vInput); |
| 26 |
float4 d5 = fwidth(vInput); |
| 27 |
float4 d6 = ddx_fine(vInput); |
| 28 |
float4 d7 = ddy_fine(vInput); |
| 29 |
float4 d8 = fwidth(vInput); |
| 30 |
float _56_tmp = uSampler.CalculateLevelOfDetail(_uSampler_sampler, vInput.zw); |
| 31 |
float2 _56 = _56_tmp.xx; |
| 32 |
float2 lod = _56; |
| 33 |
if (vInput.y > 10.0f) |
| 34 |
{ |
| 35 |
FragColor += t; |
| 36 |
FragColor += d0; |
| 37 |
FragColor += d1; |
| 38 |
FragColor += d2; |
| 39 |
FragColor += d3; |
| 40 |
FragColor += d4; |
| 41 |
FragColor += d5; |
| 42 |
FragColor += d6; |
| 43 |
FragColor += d7; |
| 44 |
FragColor += d8; |
| 45 |
FragColor += lod.xyxy; |
| 46 |
} |
| 47 |
} |
| 48 |
|
| 49 |
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) |
| 50 |
{ |
| 51 |
vInput = stage_input.vInput; |
| 52 |
frag_main(); |
| 53 |
SPIRV_Cross_Output stage_output; |
| 54 |
stage_output.FragColor = FragColor; |
| 55 |
return stage_output; |
| 56 |
} |