| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 369 |
| ; Schema: 0 |
| OpCapability Shader |
| %131 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" %tUV_param_1 %tileID_1_param_1 %levelUnits_param_1 %stageUnits_1_param_1 %vPosition_param_1 %vUV_param_1 %glFragColor_1_1 |
| OpExecutionMode %main OriginUpperLeft |
| OpName %tUV_param_1 "tUV_param_1" |
| OpName %tileID_1_param_1 "tileID_1_param_1" |
| OpName %levelUnits_param_1 "levelUnits_param_1" |
| OpName %stageUnits_1_param_1 "stageUnits_1_param_1" |
| OpName %vPosition_param_1 "vPosition_param_1" |
| OpName %vUV_param_1 "vUV_param_1" |
| OpName %glFragColor_1_1 "glFragColor_1_1" |
| OpName %LeftOver "LeftOver" |
| OpMemberName %LeftOver 0 "time" |
| OpMemberName %LeftOver 1 "padding" |
| OpMemberName %LeftOver 2 "worldViewProjection" |
| OpMemberName %LeftOver 3 "outputSize" |
| OpMemberName %LeftOver 4 "stageSize" |
| OpMemberName %LeftOver 5 "spriteMapSize" |
| OpMemberName %LeftOver 6 "stageScale" |
| OpMemberName %LeftOver 7 "spriteCount" |
| OpMemberName %LeftOver 8 "colorMul" |
| OpName %x_20 "x_20" |
| OpName %frameMapTexture "frameMapTexture" |
| OpName %frameMapSampler "frameMapSampler" |
| OpName %tUV "tUV" |
| OpName %tileMapsTexture0 "tileMapsTexture0" |
| OpName %tileMapsSampler "tileMapsSampler" |
| OpName %tileMapsTexture1 "tileMapsTexture1" |
| OpName %animationMapTexture "animationMapTexture" |
| OpName %animationMapSampler "animationMapSampler" |
| OpName %mt "mt" |
| OpName %spriteSheetTexture "spriteSheetTexture" |
| OpName %spriteSheetSampler "spriteSheetSampler" |
| OpName %glFragColor "glFragColor" |
| OpName %tileID_1 "tileID_1" |
| OpName %levelUnits "levelUnits" |
| OpName %stageUnits_1 "stageUnits_1" |
| OpName %vPosition "vPosition" |
| OpName %vUV "vUV" |
| OpName %getFrameData_f1_ "getFrameData_f1_" |
| OpName %frameID "frameID" |
| OpName %fX "fX" |
| OpName %main_1 "main_1" |
| OpName %color "color" |
| OpName %tileUV "tileUV" |
| OpName %tileID "tileID" |
| OpName %sheetUnits "sheetUnits" |
| OpName %spriteUnits "spriteUnits" |
| OpName %stageUnits "stageUnits" |
| OpName %i "i" |
| OpName %frameID_1 "frameID_1" |
| OpName %animationData "animationData" |
| OpName %f "f" |
| OpName %frameData "frameData" |
| OpName %param "param" |
| OpName %frameSize "frameSize" |
| OpName %offset_1 "offset_1" |
| OpName %ratio "ratio" |
| OpName %nc "nc" |
| OpName %alpha "alpha" |
| OpName %mixed "mixed" |
| OpName %main_out "main_out" |
| OpMemberName %main_out 0 "glFragColor_1" |
| OpName %main_inner "main_inner" |
| OpName %tUV_param "tUV_param" |
| OpName %tileID_1_param "tileID_1_param" |
| OpName %levelUnits_param "levelUnits_param" |
| OpName %stageUnits_1_param "stageUnits_1_param" |
| OpName %vPosition_param "vPosition_param" |
| OpName %vUV_param "vUV_param" |
| OpName %main "main" |
| OpDecorate %tUV_param_1 Location 2 |
| OpDecorate %tileID_1_param_1 Location 5 |
| OpDecorate %levelUnits_param_1 Location 4 |
| OpDecorate %stageUnits_1_param_1 Location 3 |
| OpDecorate %vPosition_param_1 Location 0 |
| OpDecorate %vUV_param_1 Location 1 |
| OpDecorate %glFragColor_1_1 Location 0 |
| OpDecorate %LeftOver Block |
| OpMemberDecorate %LeftOver 0 Offset 0 |
| OpMemberDecorate %LeftOver 1 Offset 4 |
| OpMemberDecorate %LeftOver 2 Offset 16 |
| OpMemberDecorate %LeftOver 2 ColMajor |
| OpMemberDecorate %LeftOver 2 MatrixStride 16 |
| OpMemberDecorate %LeftOver 3 Offset 80 |
| OpMemberDecorate %LeftOver 4 Offset 88 |
| OpMemberDecorate %LeftOver 5 Offset 96 |
| OpMemberDecorate %LeftOver 6 Offset 104 |
| OpMemberDecorate %LeftOver 7 Offset 108 |
| OpMemberDecorate %LeftOver 8 Offset 112 |
| OpDecorate %x_20 NonWritable |
| OpDecorate %x_20 DescriptorSet 2 |
| OpDecorate %x_20 Binding 9 |
| OpDecorate %frameMapTexture DescriptorSet 2 |
| OpDecorate %frameMapTexture Binding 3 |
| OpDecorate %frameMapSampler DescriptorSet 2 |
| OpDecorate %frameMapSampler Binding 2 |
| OpDecorate %tileMapsTexture0 DescriptorSet 2 |
| OpDecorate %tileMapsTexture0 Binding 5 |
| OpDecorate %tileMapsSampler DescriptorSet 2 |
| OpDecorate %tileMapsSampler Binding 4 |
| OpDecorate %tileMapsTexture1 DescriptorSet 2 |
| OpDecorate %tileMapsTexture1 Binding 6 |
| OpDecorate %animationMapTexture DescriptorSet 2 |
| OpDecorate %animationMapTexture Binding 8 |
| OpDecorate %animationMapSampler DescriptorSet 2 |
| OpDecorate %animationMapSampler Binding 7 |
| OpDecorate %spriteSheetTexture DescriptorSet 2 |
| OpDecorate %spriteSheetTexture Binding 1 |
| OpDecorate %spriteSheetSampler DescriptorSet 2 |
| OpDecorate %spriteSheetSampler Binding 0 |
| OpMemberDecorate %main_out 0 Offset 0 |
| %float = OpTypeFloat 32 |
| %v2float = OpTypeVector %float 2 |
| %_ptr_Input_v2float = OpTypePointer Input %v2float |
| %tUV_param_1 = OpVariable %_ptr_Input_v2float Input |
| %tileID_1_param_1 = OpVariable %_ptr_Input_v2float Input |
| %levelUnits_param_1 = OpVariable %_ptr_Input_v2float Input |
| %stageUnits_1_param_1 = OpVariable %_ptr_Input_v2float Input |
| %v3float = OpTypeVector %float 3 |
| %_ptr_Input_v3float = OpTypePointer Input %v3float |
| %vPosition_param_1 = OpVariable %_ptr_Input_v3float Input |
| %vUV_param_1 = OpVariable %_ptr_Input_v2float Input |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Output_v4float = OpTypePointer Output %v4float |
| %15 = OpConstantNull %v4float |
| %glFragColor_1_1 = OpVariable %_ptr_Output_v4float Output %15 |
| %uint = OpTypeInt 32 0 |
| %mat4v4float = OpTypeMatrix %v4float 4 |
| %LeftOver = OpTypeStruct %float %uint %mat4v4float %v2float %v2float %v2float %float %float %v3float |
| %_ptr_Uniform_LeftOver = OpTypePointer Uniform %LeftOver |
| %x_20 = OpVariable %_ptr_Uniform_LeftOver Uniform |
| %23 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| %_ptr_UniformConstant_23 = OpTypePointer UniformConstant %23 |
| %frameMapTexture = OpVariable %_ptr_UniformConstant_23 UniformConstant |
| %26 = OpTypeSampler |
| %_ptr_UniformConstant_26 = OpTypePointer UniformConstant %26 |
| %frameMapSampler = OpVariable %_ptr_UniformConstant_26 UniformConstant |
| %_ptr_Private_v2float = OpTypePointer Private %v2float |
| %29 = OpConstantNull %v2float |
| %tUV = OpVariable %_ptr_Private_v2float Private %29 |
| %tileMapsTexture0 = OpVariable %_ptr_UniformConstant_23 UniformConstant |
| %tileMapsSampler = OpVariable %_ptr_UniformConstant_26 UniformConstant |
| %tileMapsTexture1 = OpVariable %_ptr_UniformConstant_23 UniformConstant |
| %animationMapTexture = OpVariable %_ptr_UniformConstant_23 UniformConstant |
| %animationMapSampler = OpVariable %_ptr_UniformConstant_26 UniformConstant |
| %_ptr_Private_float = OpTypePointer Private %float |
| %37 = OpConstantNull %float |
| %mt = OpVariable %_ptr_Private_float Private %37 |
| %spriteSheetTexture = OpVariable %_ptr_UniformConstant_23 UniformConstant |
| %spriteSheetSampler = OpVariable %_ptr_UniformConstant_26 UniformConstant |
| %_ptr_Private_v4float = OpTypePointer Private %v4float |
| %glFragColor = OpVariable %_ptr_Private_v4float Private %15 |
| %tileID_1 = OpVariable %_ptr_Private_v2float Private %29 |
| %levelUnits = OpVariable %_ptr_Private_v2float Private %29 |
| %stageUnits_1 = OpVariable %_ptr_Private_v2float Private %29 |
| %_ptr_Private_v3float = OpTypePointer Private %v3float |
| %47 = OpConstantNull %v3float |
| %vPosition = OpVariable %_ptr_Private_v3float Private %47 |
| %vUV = OpVariable %_ptr_Private_v2float Private %29 |
| %_ptr_Function_float = OpTypePointer Function %float |
| %49 = OpTypeFunction %mat4v4float %_ptr_Function_float |
| %uint_7 = OpConstant %uint 7 |
| %_ptr_Uniform_float = OpTypePointer Uniform %float |
| %66 = OpTypeSampledImage %23 |
| %float_0_25 = OpConstant %float 0.25 |
| %float_0_5 = OpConstant %float 0.5 |
| %void = OpTypeVoid |
| %99 = OpTypeFunction %void |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %_ptr_Function_v2float = OpTypePointer Function %v2float |
| %int = OpTypeInt 32 1 |
| %_ptr_Function_int = OpTypePointer Function %int |
| %114 = OpConstantNull %int |
| %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float |
| %120 = OpConstantNull %mat4v4float |
| %_ptr_Function_v3float = OpTypePointer Function %v3float |
| %uint_1 = OpConstant %uint 1 |
| %float_1 = OpConstant %float 1 |
| %uint_5 = OpConstant %uint 5 |
| %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float |
| %144 = OpConstantComposite %v2float %float_1 %float_1 |
| %uint_4 = OpConstant %uint 4 |
| %int_2 = OpConstant %int 2 |
| %bool = OpTypeBool |
| %176 = OpConstantComposite %v2float %float_0_5 %float_0_5 |
| %uint_0 = OpConstant %uint 0 |
| %uint_2 = OpConstant %uint 2 |
| %float_8 = OpConstant %float 8 |
| %uint_3 = OpConstant %uint 3 |
| %int_1 = OpConstant %int 1 |
| %uint_8 = OpConstant %uint 8 |
| %_ptr_Uniform_v3float = OpTypePointer Uniform %v3float |
| %main_out = OpTypeStruct %v4float |
| %346 = OpTypeFunction %main_out %v2float %v2float %v2float %v2float %v3float %v2float |
| %getFrameData_f1_ = OpFunction %mat4v4float None %49 |
| %frameID = OpFunctionParameter %_ptr_Function_float |
| %53 = OpLabel |
| %fX = OpVariable %_ptr_Function_float Function %37 |
| %56 = OpLoad %float %frameID |
| %59 = OpAccessChain %_ptr_Uniform_float %x_20 %uint_7 |
| %60 = OpLoad %float %59 |
| %61 = OpFDiv %float %56 %60 |
| OpStore %fX %61 |
| %62 = OpLoad %float %fX |
| %64 = OpLoad %26 %frameMapSampler |
| %65 = OpLoad %23 %frameMapTexture |
| %67 = OpSampledImage %66 %65 %64 |
| %68 = OpCompositeConstruct %v2float %62 %37 |
| %63 = OpImageSampleImplicitLod %v4float %67 %68 Bias %37 |
| %69 = OpLoad %float %fX |
| %71 = OpLoad %26 %frameMapSampler |
| %72 = OpLoad %23 %frameMapTexture |
| %73 = OpSampledImage %66 %72 %71 |
| %75 = OpCompositeConstruct %v2float %69 %float_0_25 |
| %70 = OpImageSampleImplicitLod %v4float %73 %75 Bias %37 |
| %76 = OpLoad %float %fX |
| %78 = OpLoad %26 %frameMapSampler |
| %79 = OpLoad %23 %frameMapTexture |
| %80 = OpSampledImage %66 %79 %78 |
| %82 = OpCompositeConstruct %v2float %76 %float_0_5 |
| %77 = OpImageSampleImplicitLod %v4float %80 %82 Bias %37 |
| %83 = OpCompositeExtract %float %63 0 |
| %84 = OpCompositeExtract %float %63 1 |
| %85 = OpCompositeExtract %float %63 2 |
| %86 = OpCompositeExtract %float %63 3 |
| %87 = OpCompositeConstruct %v4float %83 %84 %85 %86 |
| %88 = OpCompositeExtract %float %70 0 |
| %89 = OpCompositeExtract %float %70 1 |
| %90 = OpCompositeExtract %float %70 2 |
| %91 = OpCompositeExtract %float %70 3 |
| %92 = OpCompositeConstruct %v4float %88 %89 %90 %91 |
| %93 = OpCompositeExtract %float %77 0 |
| %94 = OpCompositeExtract %float %77 1 |
| %95 = OpCompositeExtract %float %77 2 |
| %96 = OpCompositeExtract %float %77 3 |
| %97 = OpCompositeConstruct %v4float %93 %94 %95 %96 |
| %98 = OpCompositeConstruct %mat4v4float %87 %92 %97 %15 |
| OpReturnValue %98 |
| OpFunctionEnd |
| %main_1 = OpFunction %void None %99 |
| %102 = OpLabel |
| %color = OpVariable %_ptr_Function_v4float Function %15 |
| %tileUV = OpVariable %_ptr_Function_v2float Function %29 |
| %tileID = OpVariable %_ptr_Function_v2float Function %29 |
| %sheetUnits = OpVariable %_ptr_Function_v2float Function %29 |
| %spriteUnits = OpVariable %_ptr_Function_float Function %37 |
| %stageUnits = OpVariable %_ptr_Function_v2float Function %29 |
| %i = OpVariable %_ptr_Function_int Function %114 |
| %frameID_1 = OpVariable %_ptr_Function_float Function %37 |
| %animationData = OpVariable %_ptr_Function_v4float Function %15 |
| %f = OpVariable %_ptr_Function_float Function %37 |
| %frameData = OpVariable %_ptr_Function_mat4v4float Function %120 |
| %param = OpVariable %_ptr_Function_float Function %37 |
| %frameSize = OpVariable %_ptr_Function_v2float Function %29 |
| %offset_1 = OpVariable %_ptr_Function_v2float Function %29 |
| %ratio = OpVariable %_ptr_Function_v2float Function %29 |
| %nc = OpVariable %_ptr_Function_v4float Function %15 |
| %alpha = OpVariable %_ptr_Function_float Function %37 |
| %mixed = OpVariable %_ptr_Function_v3float Function %47 |
| OpStore %color %15 |
| %129 = OpLoad %v2float %tUV |
| %130 = OpExtInst %v2float %131 Fract %129 |
| OpStore %tileUV %130 |
| %133 = OpAccessChain %_ptr_Function_float %tileUV %uint_1 |
| %134 = OpLoad %float %133 |
| %135 = OpAccessChain %_ptr_Function_float %tileUV %uint_1 |
| %137 = OpFSub %float %float_1 %134 |
| OpStore %135 %137 |
| %138 = OpLoad %v2float %tUV |
| %139 = OpExtInst %v2float %131 Floor %138 |
| OpStore %tileID %139 |
| %142 = OpAccessChain %_ptr_Uniform_v2float %x_20 %uint_5 |
| %143 = OpLoad %v2float %142 |
| %145 = OpFDiv %v2float %144 %143 |
| OpStore %sheetUnits %145 |
| %146 = OpAccessChain %_ptr_Uniform_float %x_20 %uint_7 |
| %147 = OpLoad %float %146 |
| %148 = OpFDiv %float %float_1 %147 |
| OpStore %spriteUnits %148 |
| %150 = OpAccessChain %_ptr_Uniform_v2float %x_20 %uint_4 |
| %151 = OpLoad %v2float %150 |
| %152 = OpFDiv %v2float %144 %151 |
| OpStore %stageUnits %152 |
| OpStore %i %114 |
| OpBranch %153 |
| %153 = OpLabel |
| OpLoopMerge %154 %155 None |
| OpBranch %156 |
| %156 = OpLabel |
| %157 = OpLoad %int %i |
| %159 = OpSLessThan %bool %157 %int_2 |
| OpSelectionMerge %161 None |
| OpBranchConditional %159 %162 %163 |
| %162 = OpLabel |
| OpBranch %161 |
| %163 = OpLabel |
| OpBranch %154 |
| %161 = OpLabel |
| %164 = OpLoad %int %i |
| OpSelectionMerge %165 None |
| OpSwitch %164 %166 1 %167 0 %168 |
| %167 = OpLabel |
| %169 = OpLoad %v2float %tileID |
| %170 = OpAccessChain %_ptr_Uniform_v2float %x_20 %uint_4 |
| %171 = OpLoad %v2float %170 |
| %173 = OpLoad %26 %tileMapsSampler |
| %174 = OpLoad %23 %tileMapsTexture1 |
| %175 = OpSampledImage %66 %174 %173 |
| %177 = OpFAdd %v2float %169 %176 |
| %178 = OpFDiv %v2float %177 %171 |
| %172 = OpImageSampleImplicitLod %v4float %175 %178 Bias %37 |
| %179 = OpCompositeExtract %float %172 0 |
| OpStore %frameID_1 %179 |
| OpBranch %165 |
| %168 = OpLabel |
| %180 = OpLoad %v2float %tileID |
| %181 = OpAccessChain %_ptr_Uniform_v2float %x_20 %uint_4 |
| %182 = OpLoad %v2float %181 |
| %184 = OpLoad %26 %tileMapsSampler |
| %185 = OpLoad %23 %tileMapsTexture0 |
| %186 = OpSampledImage %66 %185 %184 |
| %187 = OpFAdd %v2float %180 %176 |
| %188 = OpFDiv %v2float %187 %182 |
| %183 = OpImageSampleImplicitLod %v4float %186 %188 Bias %37 |
| %189 = OpCompositeExtract %float %183 0 |
| OpStore %frameID_1 %189 |
| OpBranch %165 |
| %166 = OpLabel |
| OpBranch %165 |
| %165 = OpLabel |
| %190 = OpLoad %float %frameID_1 |
| %191 = OpAccessChain %_ptr_Uniform_float %x_20 %uint_7 |
| %192 = OpLoad %float %191 |
| %194 = OpLoad %26 %animationMapSampler |
| %195 = OpLoad %23 %animationMapTexture |
| %196 = OpSampledImage %66 %195 %194 |
| %197 = OpFAdd %float %190 %float_0_5 |
| %198 = OpFDiv %float %197 %192 |
| %199 = OpCompositeConstruct %v2float %198 %37 |
| %193 = OpImageSampleImplicitLod %v4float %196 %199 Bias %37 |
| OpStore %animationData %193 |
| %200 = OpAccessChain %_ptr_Function_float %animationData %uint_1 |
| %201 = OpLoad %float %200 |
| %202 = OpFOrdGreaterThan %bool %201 %37 |
| OpSelectionMerge %203 None |
| OpBranchConditional %202 %204 %203 |
| %204 = OpLabel |
| %206 = OpAccessChain %_ptr_Uniform_float %x_20 %uint_0 |
| %207 = OpLoad %float %206 |
| %209 = OpAccessChain %_ptr_Function_float %animationData %uint_2 |
| %210 = OpLoad %float %209 |
| %211 = OpFMul %float %207 %210 |
| %212 = OpFRem %float %211 %float_1 |
| OpStore %mt %212 |
| OpStore %f %37 |
| OpBranch %213 |
| %213 = OpLabel |
| OpLoopMerge %214 %215 None |
| OpBranch %216 |
| %216 = OpLabel |
| %217 = OpLoad %float %f |
| %219 = OpFOrdLessThan %bool %217 %float_8 |
| OpSelectionMerge %220 None |
| OpBranchConditional %219 %221 %222 |
| %221 = OpLabel |
| OpBranch %220 |
| %222 = OpLabel |
| OpBranch %214 |
| %220 = OpLabel |
| %223 = OpAccessChain %_ptr_Function_float %animationData %uint_1 |
| %224 = OpLoad %float %223 |
| %225 = OpLoad %float %mt |
| %226 = OpFOrdGreaterThan %bool %224 %225 |
| OpSelectionMerge %227 None |
| OpBranchConditional %226 %228 %227 |
| %228 = OpLabel |
| %229 = OpAccessChain %_ptr_Function_float %animationData %uint_0 |
| %230 = OpLoad %float %229 |
| OpStore %frameID_1 %230 |
| OpBranch %214 |
| %227 = OpLabel |
| %231 = OpLoad %float %frameID_1 |
| %232 = OpAccessChain %_ptr_Uniform_float %x_20 %uint_7 |
| %233 = OpLoad %float %232 |
| %234 = OpLoad %float %f |
| OpStore %animationData %15 |
| OpBranch %215 |
| %215 = OpLabel |
| %235 = OpLoad %float %f |
| %236 = OpFAdd %float %235 %float_1 |
| OpStore %f %236 |
| OpBranch %213 |
| %214 = OpLabel |
| OpBranch %203 |
| %203 = OpLabel |
| %237 = OpLoad %float %frameID_1 |
| %238 = OpFAdd %float %237 %float_0_5 |
| OpStore %param %238 |
| %239 = OpFunctionCall %mat4v4float %getFrameData_f1_ %param |
| OpStore %frameData %239 |
| %241 = OpAccessChain %_ptr_Function_v4float %frameData %114 |
| %242 = OpLoad %v4float %241 |
| %243 = OpAccessChain %_ptr_Uniform_v2float %x_20 %uint_5 |
| %244 = OpLoad %v2float %243 |
| %245 = OpCompositeExtract %float %242 3 |
| %246 = OpCompositeExtract %float %242 2 |
| %247 = OpCompositeConstruct %v2float %245 %246 |
| %248 = OpFDiv %v2float %247 %244 |
| OpStore %frameSize %248 |
| %249 = OpAccessChain %_ptr_Function_v4float %frameData %114 |
| %250 = OpLoad %v4float %249 |
| %251 = OpLoad %v2float %sheetUnits |
| %252 = OpCompositeExtract %float %250 0 |
| %253 = OpCompositeExtract %float %250 1 |
| %254 = OpCompositeConstruct %v2float %252 %253 |
| %255 = OpFMul %v2float %254 %251 |
| OpStore %offset_1 %255 |
| %256 = OpAccessChain %_ptr_Function_v4float %frameData %int_2 |
| %257 = OpLoad %v4float %256 |
| %258 = OpAccessChain %_ptr_Function_v4float %frameData %114 |
| %259 = OpLoad %v4float %258 |
| %260 = OpCompositeExtract %float %257 0 |
| %261 = OpCompositeExtract %float %257 1 |
| %262 = OpCompositeConstruct %v2float %260 %261 |
| %263 = OpCompositeExtract %float %259 3 |
| %264 = OpCompositeExtract %float %259 2 |
| %265 = OpCompositeConstruct %v2float %263 %264 |
| %266 = OpFDiv %v2float %262 %265 |
| OpStore %ratio %266 |
| %267 = OpAccessChain %_ptr_Function_float %frameData %int_2 %uint_2 |
| %268 = OpLoad %float %267 |
| %269 = OpFOrdEqual %bool %268 %float_1 |
| OpSelectionMerge %270 None |
| OpBranchConditional %269 %271 %270 |
| %271 = OpLabel |
| %272 = OpLoad %v2float %tileUV |
| %273 = OpCompositeExtract %float %272 1 |
| %274 = OpCompositeExtract %float %272 0 |
| %275 = OpCompositeConstruct %v2float %273 %274 |
| OpStore %tileUV %275 |
| OpBranch %270 |
| %270 = OpLabel |
| %276 = OpLoad %int %i |
| %277 = OpIEqual %bool %276 %114 |
| OpSelectionMerge %278 None |
| OpBranchConditional %277 %279 %280 |
| %279 = OpLabel |
| %281 = OpLoad %v2float %tileUV |
| %282 = OpLoad %v2float %frameSize |
| %283 = OpLoad %v2float %offset_1 |
| %285 = OpLoad %26 %spriteSheetSampler |
| %286 = OpLoad %23 %spriteSheetTexture |
| %287 = OpSampledImage %66 %286 %285 |
| %288 = OpFMul %v2float %281 %282 |
| %289 = OpFAdd %v2float %288 %283 |
| %284 = OpImageSampleImplicitLod %v4float %287 %289 |
| OpStore %color %284 |
| OpBranch %278 |
| %280 = OpLabel |
| %290 = OpLoad %v2float %tileUV |
| %291 = OpLoad %v2float %frameSize |
| %292 = OpLoad %v2float %offset_1 |
| %294 = OpLoad %26 %spriteSheetSampler |
| %295 = OpLoad %23 %spriteSheetTexture |
| %296 = OpSampledImage %66 %295 %294 |
| %297 = OpFMul %v2float %290 %291 |
| %298 = OpFAdd %v2float %297 %292 |
| %293 = OpImageSampleImplicitLod %v4float %296 %298 |
| OpStore %nc %293 |
| %300 = OpAccessChain %_ptr_Function_float %color %uint_3 |
| %301 = OpLoad %float %300 |
| %302 = OpAccessChain %_ptr_Function_float %nc %uint_3 |
| %303 = OpLoad %float %302 |
| %305 = OpFAdd %float %301 %303 |
| %304 = OpExtInst %float %131 NMin %305 %float_1 |
| OpStore %alpha %304 |
| %306 = OpLoad %v4float %color |
| %307 = OpLoad %v4float %nc |
| %308 = OpAccessChain %_ptr_Function_float %nc %uint_3 |
| %309 = OpLoad %float %308 |
| %311 = OpCompositeExtract %float %306 0 |
| %312 = OpCompositeExtract %float %306 1 |
| %313 = OpCompositeExtract %float %306 2 |
| %314 = OpCompositeConstruct %v3float %311 %312 %313 |
| %315 = OpCompositeExtract %float %307 0 |
| %316 = OpCompositeExtract %float %307 1 |
| %317 = OpCompositeExtract %float %307 2 |
| %318 = OpCompositeConstruct %v3float %315 %316 %317 |
| %319 = OpCompositeConstruct %v3float %309 %309 %309 |
| %310 = OpExtInst %v3float %131 FMix %314 %318 %319 |
| OpStore %mixed %310 |
| %320 = OpLoad %v3float %mixed |
| %321 = OpLoad %float %alpha |
| %322 = OpCompositeExtract %float %320 0 |
| %323 = OpCompositeExtract %float %320 1 |
| %324 = OpCompositeExtract %float %320 2 |
| %325 = OpCompositeConstruct %v4float %322 %323 %324 %321 |
| OpStore %color %325 |
| OpBranch %278 |
| %278 = OpLabel |
| OpBranch %155 |
| %155 = OpLabel |
| %326 = OpLoad %int %i |
| %328 = OpIAdd %int %326 %int_1 |
| OpStore %i %328 |
| OpBranch %153 |
| %154 = OpLabel |
| %331 = OpAccessChain %_ptr_Uniform_v3float %x_20 %uint_8 |
| %332 = OpLoad %v3float %331 |
| %333 = OpLoad %v4float %color |
| %334 = OpCompositeExtract %float %333 0 |
| %335 = OpCompositeExtract %float %333 1 |
| %336 = OpCompositeExtract %float %333 2 |
| %337 = OpCompositeConstruct %v3float %334 %335 %336 |
| %338 = OpFMul %v3float %337 %332 |
| %339 = OpLoad %v4float %color |
| %340 = OpCompositeExtract %float %338 0 |
| %341 = OpCompositeExtract %float %338 1 |
| %342 = OpCompositeExtract %float %338 2 |
| %343 = OpCompositeExtract %float %339 3 |
| %344 = OpCompositeConstruct %v4float %340 %341 %342 %343 |
| OpStore %color %344 |
| %345 = OpLoad %v4float %color |
| OpStore %glFragColor %345 |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %main_out None %346 |
| %tUV_param = OpFunctionParameter %v2float |
| %tileID_1_param = OpFunctionParameter %v2float |
| %levelUnits_param = OpFunctionParameter %v2float |
| %stageUnits_1_param = OpFunctionParameter %v2float |
| %vPosition_param = OpFunctionParameter %v3float |
| %vUV_param = OpFunctionParameter %v2float |
| %355 = OpLabel |
| OpStore %tUV %tUV_param |
| OpStore %tileID_1 %tileID_1_param |
| OpStore %levelUnits %levelUnits_param |
| OpStore %stageUnits_1 %stageUnits_1_param |
| OpStore %vPosition %vPosition_param |
| OpStore %vUV %vUV_param |
| %356 = OpFunctionCall %void %main_1 |
| %357 = OpLoad %v4float %glFragColor |
| %358 = OpCompositeConstruct %main_out %357 |
| OpReturnValue %358 |
| OpFunctionEnd |
| %main = OpFunction %void None %99 |
| %360 = OpLabel |
| %362 = OpLoad %v2float %tUV_param_1 |
| %363 = OpLoad %v2float %tileID_1_param_1 |
| %364 = OpLoad %v2float %levelUnits_param_1 |
| %365 = OpLoad %v2float %stageUnits_1_param_1 |
| %366 = OpLoad %v3float %vPosition_param_1 |
| %367 = OpLoad %v2float %vUV_param_1 |
| %361 = OpFunctionCall %main_out %main_inner %362 %363 %364 %365 %366 %367 |
| %368 = OpCompositeExtract %v4float %361 0 |
| OpStore %glFragColor_1_1 %368 |
| OpReturn |
| OpFunctionEnd |