Debian Codegraph @

third_party/spirv-cross/reference/shaders-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag

raw
1 #version 450
2
3 struct VertexOutput
4 {
5 vec4 HPosition;
6 vec4 Uv_EdgeDistance1;
7 vec4 UvStuds_EdgeDistance2;
8 vec4 Color;
9 vec4 LightPosition_Fog;
10 vec4 View_Depth;
11 vec4 Normal_SpecPower;
12 vec3 Tangent;
13 vec4 PosLightSpace_Reflectance;
14 float studIndex;
15 };
16
17 struct Surface
18 {
19 vec3 albedo;
20 vec3 normal;
21 float specular;
22 float gloss;
23 float reflectance;
24 float opacity;
25 };
26
27 struct SurfaceInput
28 {
29 vec4 Color;
30 vec2 Uv;
31 vec2 UvStuds;
32 };
33
34 struct Globals
35 {
36 mat4 ViewProjection;
37 vec4 ViewRight;
38 vec4 ViewUp;
39 vec4 ViewDir;
40 vec3 CameraPosition;
41 vec3 AmbientColor;
42 vec3 Lamp0Color;
43 vec3 Lamp0Dir;
44 vec3 Lamp1Color;
45 vec4 FogParams;
46 vec3 FogColor;
47 vec4 LightBorder;
48 vec4 LightConfig0;
49 vec4 LightConfig1;
50 vec4 LightConfig2;
51 vec4 LightConfig3;
52 vec4 RefractionBias_FadeDistance_GlowFactor;
53 vec4 OutlineBrightness_ShadowInfo;
54 vec4 ShadowMatrix0;
55 vec4 ShadowMatrix1;
56 vec4 ShadowMatrix2;
57 };
58
59 struct Params
60 {
61 vec4 LqmatFarTilingFactor;
62 };
63
64 layout(binding = 0, std140) uniform CB0
65 {
66 Globals CB0;
67 } _19;
68
69 uniform sampler2D SPIRV_Cross_CombinedDiffuseMapTextureDiffuseMapSampler;
70 uniform sampler2D SPIRV_Cross_CombinedNormalMapTextureNormalMapSampler;
71 uniform sampler2D SPIRV_Cross_CombinedNormalDetailMapTextureNormalDetailMapSampler;
72 uniform sampler2D SPIRV_Cross_CombinedStudsMapTextureStudsMapSampler;
73 uniform sampler2D SPIRV_Cross_CombinedSpecularMapTextureSpecularMapSampler;
74 uniform sampler3D SPIRV_Cross_CombinedLightMapTextureLightMapSampler;
75 uniform sampler2D SPIRV_Cross_CombinedShadowMapTextureShadowMapSampler;
76 uniform samplerCube SPIRV_Cross_CombinedEnvironmentMapTextureEnvironmentMapSampler;
77
78 layout(location = 0) in vec4 IN_Uv_EdgeDistance1;
79 layout(location = 1) in vec4 IN_UvStuds_EdgeDistance2;
80 layout(location = 2) in vec4 IN_Color;
81 layout(location = 3) in vec4 IN_LightPosition_Fog;
82 layout(location = 4) in vec4 IN_View_Depth;
83 layout(location = 5) in vec4 IN_Normal_SpecPower;
84 layout(location = 6) in vec3 IN_Tangent;
85 layout(location = 7) in vec4 IN_PosLightSpace_Reflectance;
86 layout(location = 8) in float IN_studIndex;
87 layout(location = 0) out vec4 _entryPointOutput;
88
89 VertexOutput _121;
90 SurfaceInput _122;
91 vec2 _123;
92 vec4 _124;
93 Surface _125;
94 vec4 _192;
95 vec4 _219;
96 vec4 _297;
97
98 void main()
99 {
100 VertexOutput _128 = _121;
101 _128.HPosition = gl_FragCoord;
102 VertexOutput _130 = _128;
103 _130.Uv_EdgeDistance1 = IN_Uv_EdgeDistance1;
104 VertexOutput _132 = _130;
105 _132.UvStuds_EdgeDistance2 = IN_UvStuds_EdgeDistance2;
106 VertexOutput _134 = _132;
107 _134.Color = IN_Color;
108 VertexOutput _136 = _134;
109 _136.LightPosition_Fog = IN_LightPosition_Fog;
110 VertexOutput _138 = _136;
111 _138.View_Depth = IN_View_Depth;
112 VertexOutput _140 = _138;
113 _140.Normal_SpecPower = IN_Normal_SpecPower;
114 VertexOutput _142 = _140;
115 _142.Tangent = IN_Tangent;
116 VertexOutput _144 = _142;
117 _144.PosLightSpace_Reflectance = IN_PosLightSpace_Reflectance;
118 VertexOutput _146 = _144;
119 _146.studIndex = IN_studIndex;
120 SurfaceInput _147 = _122;
121 _147.Color = IN_Color;
122 SurfaceInput _149 = _147;
123 _149.Uv = IN_Uv_EdgeDistance1.xy;
124 SurfaceInput _151 = _149;
125 _151.UvStuds = IN_UvStuds_EdgeDistance2.xy;
126 SurfaceInput _156 = _151;
127 _156.UvStuds.y = (fract(_151.UvStuds.y) + IN_studIndex) * 0.25;
128 float _160 = clamp(1.0 - (_146.View_Depth.w * 0.00333332992158830165863037109375), 0.0, 1.0);
129 float _163 = _146.View_Depth.w * _19.CB0.RefractionBias_FadeDistance_GlowFactor.y;
130 float _165 = clamp(1.0 - _163, 0.0, 1.0);
131 vec2 _166 = IN_Uv_EdgeDistance1.xy * 1.0;
132 bool _173;
133 vec4 _193;
134 for (;;)
135 {
136 _173 = 0.0 == 0.0;
137 if (_173)
138 {
139 _193 = texture(SPIRV_Cross_CombinedDiffuseMapTextureDiffuseMapSampler, _166);
140 break;
141 }
142 else
143 {
144 float _180 = 1.0 / (1.0 - 0.0);
145 _193 = mix(texture(SPIRV_Cross_CombinedDiffuseMapTextureDiffuseMapSampler, _166 * 0.25), texture(SPIRV_Cross_CombinedDiffuseMapTextureDiffuseMapSampler, _166), vec4(clamp((_160 * _180) - (0.0 * _180), 0.0, 1.0)));
146 break;
147 }
148 _193 = _192;
149 break;
150 }
151 vec4 _220;
152 for (;;)
153 {
154 if (_173)
155 {
156 _220 = texture(SPIRV_Cross_CombinedNormalMapTextureNormalMapSampler, _166);
157 break;
158 }
159 else
160 {
161 float _207 = 1.0 / (1.0 - 0.0);
162 _220 = mix(texture(SPIRV_Cross_CombinedNormalMapTextureNormalMapSampler, _166 * 0.25), texture(SPIRV_Cross_CombinedNormalMapTextureNormalMapSampler, _166), vec4(clamp((_165 * _207) - (0.0 * _207), 0.0, 1.0)));
163 break;
164 }
165 _220 = _219;
166 break;
167 }
168 vec2 _223 = vec2(1.0);
169 vec2 _224 = (_220.wy * 2.0) - _223;
170 vec3 _232 = vec3(_224, sqrt(clamp(1.0 + dot(-_224, _224), 0.0, 1.0)));
171 vec4 _237 = texture(SPIRV_Cross_CombinedNormalDetailMapTextureNormalDetailMapSampler, _166 * 0.0);
172 vec2 _240 = (_237.wy * 2.0) - _223;
173 vec2 _252 = _232.xy + (vec3(_240, sqrt(clamp(1.0 + dot(-_240, _240), 0.0, 1.0))).xy * 0.0);
174 vec3 _253 = vec3(_252.x, _252.y, _232.z);
175 vec2 _255 = _253.xy * _165;
176 vec3 _256 = vec3(_255.x, _255.y, _253.z);
177 vec4 _268 = texture(SPIRV_Cross_CombinedStudsMapTextureStudsMapSampler, _156.UvStuds);
178 vec3 _271 = ((IN_Color.xyz * (_193 * 1.0).xyz) * (1.0 + (_256.x * 0.300000011920928955078125))) * (_268.x * 2.0);
179 vec4 _298;
180 for (;;)
181 {
182 if (0.75 == 0.0)
183 {
184 _298 = texture(SPIRV_Cross_CombinedSpecularMapTextureSpecularMapSampler, _166);
185 break;
186 }
187 else
188 {
189 float _285 = 1.0 / (1.0 - 0.75);
190 _298 = mix(texture(SPIRV_Cross_CombinedSpecularMapTextureSpecularMapSampler, _166 * 0.25), texture(SPIRV_Cross_CombinedSpecularMapTextureSpecularMapSampler, _166), vec4(clamp((_165 * _285) - (0.75 * _285), 0.0, 1.0)));
191 break;
192 }
193 _298 = _297;
194 break;
195 }
196 vec2 _303 = mix(vec2(0.800000011920928955078125, 120.0), (_298.xy * vec2(2.0, 256.0)) + vec2(0.0, 0.00999999977648258209228515625), vec2(_165));
197 Surface _304 = _125;
198 _304.albedo = _271;
199 Surface _305 = _304;
200 _305.normal = _256;
201 float _306 = _303.x;
202 Surface _307 = _305;
203 _307.specular = _306;
204 float _308 = _303.y;
205 Surface _309 = _307;
206 _309.gloss = _308;
207 float _312 = (_298.xy.y * _165) * 0.0;
208 Surface _313 = _309;
209 _313.reflectance = _312;
210 vec4 _318 = vec4(_271, _146.Color.w);
211 vec3 _329 = normalize(((IN_Tangent * _313.normal.x) + (cross(IN_Normal_SpecPower.xyz, IN_Tangent) * _313.normal.y)) + (IN_Normal_SpecPower.xyz * _313.normal.z));
212 vec3 _332 = -_19.CB0.Lamp0Dir;
213 float _333 = dot(_329, _332);
214 float _357 = clamp(dot(step(_19.CB0.LightConfig3.xyz, abs(IN_LightPosition_Fog.xyz - _19.CB0.LightConfig2.xyz)), vec3(1.0)), 0.0, 1.0);
215 vec4 _368 = mix(texture(SPIRV_Cross_CombinedLightMapTextureLightMapSampler, IN_LightPosition_Fog.xyz.yzx - (IN_LightPosition_Fog.xyz.yzx * _357)), _19.CB0.LightBorder, vec4(_357));
216 vec2 _376 = texture(SPIRV_Cross_CombinedShadowMapTextureShadowMapSampler, IN_PosLightSpace_Reflectance.xyz.xy).xy;
217 float _392 = (1.0 - (((step(_376.x, IN_PosLightSpace_Reflectance.xyz.z) * clamp(9.0 - (20.0 * abs(IN_PosLightSpace_Reflectance.xyz.z - 0.5)), 0.0, 1.0)) * _376.y) * _19.CB0.OutlineBrightness_ShadowInfo.w)) * _368.w;
218 vec3 _403 = mix(_318.xyz, texture(SPIRV_Cross_CombinedEnvironmentMapTextureEnvironmentMapSampler, reflect(-IN_View_Depth.xyz, _329)).xyz, vec3(_312));
219 vec4 _404 = vec4(_403.x, _403.y, _403.z, _318.w);
220 vec3 _422 = (((_19.CB0.AmbientColor + (((_19.CB0.Lamp0Color * clamp(_333, 0.0, 1.0)) + (_19.CB0.Lamp1Color * max(-_333, 0.0))) * _392)) + _368.xyz) * _404.xyz) + (_19.CB0.Lamp0Color * (((step(0.0, _333) * _306) * _392) * pow(clamp(dot(_329, normalize(_332 + normalize(IN_View_Depth.xyz))), 0.0, 1.0), _308)));
221 vec4 _425 = vec4(_422.x, _422.y, _422.z, _124.w);
222 _425.w = _404.w;
223 vec2 _435 = min(IN_Uv_EdgeDistance1.wz, IN_UvStuds_EdgeDistance2.wz);
224 float _439 = min(_435.x, _435.y) / _163;
225 vec3 _445 = _425.xyz * clamp((clamp((_163 * _19.CB0.OutlineBrightness_ShadowInfo.x) + _19.CB0.OutlineBrightness_ShadowInfo.y, 0.0, 1.0) * (1.5 - _439)) + _439, 0.0, 1.0);
226 vec4 _446 = vec4(_445.x, _445.y, _445.z, _425.w);
227 vec3 _453 = mix(_19.CB0.FogColor, _446.xyz, vec3(clamp(_146.LightPosition_Fog.w, 0.0, 1.0)));
228 _entryPointOutput = vec4(_453.x, _453.y, _453.z, _446.w);
229 }
230