| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 370 |
| ; Schema: 0 |
| OpCapability Shader |
| %133 = 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 %x_20_block "x_20_block" |
| OpMemberName %x_20_block 0 "inner" |
| 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 %x_20_block Block |
| OpMemberDecorate %x_20_block 0 Offset 0 |
| 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 |
| %x_20_block = OpTypeStruct %LeftOver |
| %_ptr_Uniform_x_20_block = OpTypePointer Uniform %x_20_block |
| %x_20 = OpVariable %_ptr_Uniform_x_20_block Uniform |
| %24 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| %_ptr_UniformConstant_24 = OpTypePointer UniformConstant %24 |
| %frameMapTexture = OpVariable %_ptr_UniformConstant_24 UniformConstant |
| %27 = OpTypeSampler |
| %_ptr_UniformConstant_27 = OpTypePointer UniformConstant %27 |
| %frameMapSampler = OpVariable %_ptr_UniformConstant_27 UniformConstant |
| %_ptr_Private_v2float = OpTypePointer Private %v2float |
| %30 = OpConstantNull %v2float |
| %tUV = OpVariable %_ptr_Private_v2float Private %30 |
| %tileMapsTexture0 = OpVariable %_ptr_UniformConstant_24 UniformConstant |
| %tileMapsSampler = OpVariable %_ptr_UniformConstant_27 UniformConstant |
| %tileMapsTexture1 = OpVariable %_ptr_UniformConstant_24 UniformConstant |
| %animationMapTexture = OpVariable %_ptr_UniformConstant_24 UniformConstant |
| %animationMapSampler = OpVariable %_ptr_UniformConstant_27 UniformConstant |
| %_ptr_Private_float = OpTypePointer Private %float |
| %38 = OpConstantNull %float |
| %mt = OpVariable %_ptr_Private_float Private %38 |
| %spriteSheetTexture = OpVariable %_ptr_UniformConstant_24 UniformConstant |
| %spriteSheetSampler = OpVariable %_ptr_UniformConstant_27 UniformConstant |
| %_ptr_Private_v4float = OpTypePointer Private %v4float |
| %glFragColor = OpVariable %_ptr_Private_v4float Private %15 |
| %tileID_1 = OpVariable %_ptr_Private_v2float Private %30 |
| %levelUnits = OpVariable %_ptr_Private_v2float Private %30 |
| %stageUnits_1 = OpVariable %_ptr_Private_v2float Private %30 |
| %_ptr_Private_v3float = OpTypePointer Private %v3float |
| %48 = OpConstantNull %v3float |
| %vPosition = OpVariable %_ptr_Private_v3float Private %48 |
| %vUV = OpVariable %_ptr_Private_v2float Private %30 |
| %_ptr_Function_float = OpTypePointer Function %float |
| %50 = OpTypeFunction %mat4v4float %_ptr_Function_float |
| %uint_0 = OpConstant %uint 0 |
| %uint_7 = OpConstant %uint 7 |
| %_ptr_Uniform_float = OpTypePointer Uniform %float |
| %68 = OpTypeSampledImage %24 |
| %float_0_25 = OpConstant %float 0.25 |
| %float_0_5 = OpConstant %float 0.5 |
| %void = OpTypeVoid |
| %101 = OpTypeFunction %void |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %_ptr_Function_v2float = OpTypePointer Function %v2float |
| %int = OpTypeInt 32 1 |
| %_ptr_Function_int = OpTypePointer Function %int |
| %116 = OpConstantNull %int |
| %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float |
| %122 = 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 |
| %146 = OpConstantComposite %v2float %float_1 %float_1 |
| %uint_4 = OpConstant %uint 4 |
| %int_2 = OpConstant %int 2 |
| %bool = OpTypeBool |
| %178 = OpConstantComposite %v2float %float_0_5 %float_0_5 |
| %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 |
| %347 = OpTypeFunction %main_out %v2float %v2float %v2float %v2float %v3float %v2float |
| %getFrameData_f1_ = OpFunction %mat4v4float None %50 |
| %frameID = OpFunctionParameter %_ptr_Function_float |
| %54 = OpLabel |
| %fX = OpVariable %_ptr_Function_float Function %38 |
| %57 = OpLoad %float %frameID |
| %61 = OpAccessChain %_ptr_Uniform_float %x_20 %uint_0 %uint_7 |
| %62 = OpLoad %float %61 |
| %63 = OpFDiv %float %57 %62 |
| OpStore %fX %63 |
| %64 = OpLoad %float %fX |
| %66 = OpLoad %27 %frameMapSampler |
| %67 = OpLoad %24 %frameMapTexture |
| %69 = OpSampledImage %68 %67 %66 |
| %70 = OpCompositeConstruct %v2float %64 %38 |
| %65 = OpImageSampleImplicitLod %v4float %69 %70 Bias %38 |
| %71 = OpLoad %float %fX |
| %73 = OpLoad %27 %frameMapSampler |
| %74 = OpLoad %24 %frameMapTexture |
| %75 = OpSampledImage %68 %74 %73 |
| %77 = OpCompositeConstruct %v2float %71 %float_0_25 |
| %72 = OpImageSampleImplicitLod %v4float %75 %77 Bias %38 |
| %78 = OpLoad %float %fX |
| %80 = OpLoad %27 %frameMapSampler |
| %81 = OpLoad %24 %frameMapTexture |
| %82 = OpSampledImage %68 %81 %80 |
| %84 = OpCompositeConstruct %v2float %78 %float_0_5 |
| %79 = OpImageSampleImplicitLod %v4float %82 %84 Bias %38 |
| %85 = OpCompositeExtract %float %65 0 |
| %86 = OpCompositeExtract %float %65 1 |
| %87 = OpCompositeExtract %float %65 2 |
| %88 = OpCompositeExtract %float %65 3 |
| %89 = OpCompositeConstruct %v4float %85 %86 %87 %88 |
| %90 = OpCompositeExtract %float %72 0 |
| %91 = OpCompositeExtract %float %72 1 |
| %92 = OpCompositeExtract %float %72 2 |
| %93 = OpCompositeExtract %float %72 3 |
| %94 = OpCompositeConstruct %v4float %90 %91 %92 %93 |
| %95 = OpCompositeExtract %float %79 0 |
| %96 = OpCompositeExtract %float %79 1 |
| %97 = OpCompositeExtract %float %79 2 |
| %98 = OpCompositeExtract %float %79 3 |
| %99 = OpCompositeConstruct %v4float %95 %96 %97 %98 |
| %100 = OpCompositeConstruct %mat4v4float %89 %94 %99 %15 |
| OpReturnValue %100 |
| OpFunctionEnd |
| %main_1 = OpFunction %void None %101 |
| %104 = OpLabel |
| %color = OpVariable %_ptr_Function_v4float Function %15 |
| %tileUV = OpVariable %_ptr_Function_v2float Function %30 |
| %tileID = OpVariable %_ptr_Function_v2float Function %30 |
| %sheetUnits = OpVariable %_ptr_Function_v2float Function %30 |
| %spriteUnits = OpVariable %_ptr_Function_float Function %38 |
| %stageUnits = OpVariable %_ptr_Function_v2float Function %30 |
| %i = OpVariable %_ptr_Function_int Function %116 |
| %frameID_1 = OpVariable %_ptr_Function_float Function %38 |
| %animationData = OpVariable %_ptr_Function_v4float Function %15 |
| %f = OpVariable %_ptr_Function_float Function %38 |
| %frameData = OpVariable %_ptr_Function_mat4v4float Function %122 |
| %param = OpVariable %_ptr_Function_float Function %38 |
| %frameSize = OpVariable %_ptr_Function_v2float Function %30 |
| %offset_1 = OpVariable %_ptr_Function_v2float Function %30 |
| %ratio = OpVariable %_ptr_Function_v2float Function %30 |
| %nc = OpVariable %_ptr_Function_v4float Function %15 |
| %alpha = OpVariable %_ptr_Function_float Function %38 |
| %mixed = OpVariable %_ptr_Function_v3float Function %48 |
| OpStore %color %15 |
| %131 = OpLoad %v2float %tUV |
| %132 = OpExtInst %v2float %133 Fract %131 |
| OpStore %tileUV %132 |
| %135 = OpAccessChain %_ptr_Function_float %tileUV %uint_1 |
| %136 = OpLoad %float %135 |
| %137 = OpAccessChain %_ptr_Function_float %tileUV %uint_1 |
| %139 = OpFSub %float %float_1 %136 |
| OpStore %137 %139 |
| %140 = OpLoad %v2float %tUV |
| %141 = OpExtInst %v2float %133 Floor %140 |
| OpStore %tileID %141 |
| %144 = OpAccessChain %_ptr_Uniform_v2float %x_20 %uint_0 %uint_5 |
| %145 = OpLoad %v2float %144 |
| %147 = OpFDiv %v2float %146 %145 |
| OpStore %sheetUnits %147 |
| %148 = OpAccessChain %_ptr_Uniform_float %x_20 %uint_0 %uint_7 |
| %149 = OpLoad %float %148 |
| %150 = OpFDiv %float %float_1 %149 |
| OpStore %spriteUnits %150 |
| %152 = OpAccessChain %_ptr_Uniform_v2float %x_20 %uint_0 %uint_4 |
| %153 = OpLoad %v2float %152 |
| %154 = OpFDiv %v2float %146 %153 |
| OpStore %stageUnits %154 |
| OpStore %i %116 |
| OpBranch %155 |
| %155 = OpLabel |
| OpLoopMerge %156 %157 None |
| OpBranch %158 |
| %158 = OpLabel |
| %159 = OpLoad %int %i |
| %161 = OpSLessThan %bool %159 %int_2 |
| OpSelectionMerge %163 None |
| OpBranchConditional %161 %164 %165 |
| %164 = OpLabel |
| OpBranch %163 |
| %165 = OpLabel |
| OpBranch %156 |
| %163 = OpLabel |
| %166 = OpLoad %int %i |
| OpSelectionMerge %167 None |
| OpSwitch %166 %168 1 %169 0 %170 |
| %169 = OpLabel |
| %171 = OpLoad %v2float %tileID |
| %172 = OpAccessChain %_ptr_Uniform_v2float %x_20 %uint_0 %uint_4 |
| %173 = OpLoad %v2float %172 |
| %175 = OpLoad %27 %tileMapsSampler |
| %176 = OpLoad %24 %tileMapsTexture1 |
| %177 = OpSampledImage %68 %176 %175 |
| %179 = OpFAdd %v2float %171 %178 |
| %180 = OpFDiv %v2float %179 %173 |
| %174 = OpImageSampleImplicitLod %v4float %177 %180 Bias %38 |
| %181 = OpCompositeExtract %float %174 0 |
| OpStore %frameID_1 %181 |
| OpBranch %167 |
| %170 = OpLabel |
| %182 = OpLoad %v2float %tileID |
| %183 = OpAccessChain %_ptr_Uniform_v2float %x_20 %uint_0 %uint_4 |
| %184 = OpLoad %v2float %183 |
| %186 = OpLoad %27 %tileMapsSampler |
| %187 = OpLoad %24 %tileMapsTexture0 |
| %188 = OpSampledImage %68 %187 %186 |
| %189 = OpFAdd %v2float %182 %178 |
| %190 = OpFDiv %v2float %189 %184 |
| %185 = OpImageSampleImplicitLod %v4float %188 %190 Bias %38 |
| %191 = OpCompositeExtract %float %185 0 |
| OpStore %frameID_1 %191 |
| OpBranch %167 |
| %168 = OpLabel |
| OpBranch %167 |
| %167 = OpLabel |
| %192 = OpLoad %float %frameID_1 |
| %193 = OpAccessChain %_ptr_Uniform_float %x_20 %uint_0 %uint_7 |
| %194 = OpLoad %float %193 |
| %196 = OpLoad %27 %animationMapSampler |
| %197 = OpLoad %24 %animationMapTexture |
| %198 = OpSampledImage %68 %197 %196 |
| %199 = OpFAdd %float %192 %float_0_5 |
| %200 = OpFDiv %float %199 %194 |
| %201 = OpCompositeConstruct %v2float %200 %38 |
| %195 = OpImageSampleImplicitLod %v4float %198 %201 Bias %38 |
| OpStore %animationData %195 |
| %202 = OpAccessChain %_ptr_Function_float %animationData %uint_1 |
| %203 = OpLoad %float %202 |
| %204 = OpFOrdGreaterThan %bool %203 %38 |
| OpSelectionMerge %205 None |
| OpBranchConditional %204 %206 %205 |
| %206 = OpLabel |
| %207 = OpAccessChain %_ptr_Uniform_float %x_20 %uint_0 %uint_0 |
| %208 = OpLoad %float %207 |
| %210 = OpAccessChain %_ptr_Function_float %animationData %uint_2 |
| %211 = OpLoad %float %210 |
| %212 = OpFMul %float %208 %211 |
| %213 = OpFRem %float %212 %float_1 |
| OpStore %mt %213 |
| OpStore %f %38 |
| OpBranch %214 |
| %214 = OpLabel |
| OpLoopMerge %215 %216 None |
| OpBranch %217 |
| %217 = OpLabel |
| %218 = OpLoad %float %f |
| %220 = OpFOrdLessThan %bool %218 %float_8 |
| OpSelectionMerge %221 None |
| OpBranchConditional %220 %222 %223 |
| %222 = OpLabel |
| OpBranch %221 |
| %223 = OpLabel |
| OpBranch %215 |
| %221 = OpLabel |
| %224 = OpAccessChain %_ptr_Function_float %animationData %uint_1 |
| %225 = OpLoad %float %224 |
| %226 = OpLoad %float %mt |
| %227 = OpFOrdGreaterThan %bool %225 %226 |
| OpSelectionMerge %228 None |
| OpBranchConditional %227 %229 %228 |
| %229 = OpLabel |
| %230 = OpAccessChain %_ptr_Function_float %animationData %uint_0 |
| %231 = OpLoad %float %230 |
| OpStore %frameID_1 %231 |
| OpBranch %215 |
| %228 = OpLabel |
| %232 = OpLoad %float %frameID_1 |
| %233 = OpAccessChain %_ptr_Uniform_float %x_20 %uint_0 %uint_7 |
| %234 = OpLoad %float %233 |
| %235 = OpLoad %float %f |
| OpStore %animationData %15 |
| OpBranch %216 |
| %216 = OpLabel |
| %236 = OpLoad %float %f |
| %237 = OpFAdd %float %236 %float_1 |
| OpStore %f %237 |
| OpBranch %214 |
| %215 = OpLabel |
| OpBranch %205 |
| %205 = OpLabel |
| %238 = OpLoad %float %frameID_1 |
| %239 = OpFAdd %float %238 %float_0_5 |
| OpStore %param %239 |
| %240 = OpFunctionCall %mat4v4float %getFrameData_f1_ %param |
| OpStore %frameData %240 |
| %242 = OpAccessChain %_ptr_Function_v4float %frameData %116 |
| %243 = OpLoad %v4float %242 |
| %244 = OpAccessChain %_ptr_Uniform_v2float %x_20 %uint_0 %uint_5 |
| %245 = OpLoad %v2float %244 |
| %246 = OpCompositeExtract %float %243 3 |
| %247 = OpCompositeExtract %float %243 2 |
| %248 = OpCompositeConstruct %v2float %246 %247 |
| %249 = OpFDiv %v2float %248 %245 |
| OpStore %frameSize %249 |
| %250 = OpAccessChain %_ptr_Function_v4float %frameData %116 |
| %251 = OpLoad %v4float %250 |
| %252 = OpLoad %v2float %sheetUnits |
| %253 = OpCompositeExtract %float %251 0 |
| %254 = OpCompositeExtract %float %251 1 |
| %255 = OpCompositeConstruct %v2float %253 %254 |
| %256 = OpFMul %v2float %255 %252 |
| OpStore %offset_1 %256 |
| %257 = OpAccessChain %_ptr_Function_v4float %frameData %int_2 |
| %258 = OpLoad %v4float %257 |
| %259 = OpAccessChain %_ptr_Function_v4float %frameData %116 |
| %260 = OpLoad %v4float %259 |
| %261 = OpCompositeExtract %float %258 0 |
| %262 = OpCompositeExtract %float %258 1 |
| %263 = OpCompositeConstruct %v2float %261 %262 |
| %264 = OpCompositeExtract %float %260 3 |
| %265 = OpCompositeExtract %float %260 2 |
| %266 = OpCompositeConstruct %v2float %264 %265 |
| %267 = OpFDiv %v2float %263 %266 |
| OpStore %ratio %267 |
| %268 = OpAccessChain %_ptr_Function_float %frameData %int_2 %uint_2 |
| %269 = OpLoad %float %268 |
| %270 = OpFOrdEqual %bool %269 %float_1 |
| OpSelectionMerge %271 None |
| OpBranchConditional %270 %272 %271 |
| %272 = OpLabel |
| %273 = OpLoad %v2float %tileUV |
| %274 = OpCompositeExtract %float %273 1 |
| %275 = OpCompositeExtract %float %273 0 |
| %276 = OpCompositeConstruct %v2float %274 %275 |
| OpStore %tileUV %276 |
| OpBranch %271 |
| %271 = OpLabel |
| %277 = OpLoad %int %i |
| %278 = OpIEqual %bool %277 %116 |
| OpSelectionMerge %279 None |
| OpBranchConditional %278 %280 %281 |
| %280 = OpLabel |
| %282 = OpLoad %v2float %tileUV |
| %283 = OpLoad %v2float %frameSize |
| %284 = OpLoad %v2float %offset_1 |
| %286 = OpLoad %27 %spriteSheetSampler |
| %287 = OpLoad %24 %spriteSheetTexture |
| %288 = OpSampledImage %68 %287 %286 |
| %289 = OpFMul %v2float %282 %283 |
| %290 = OpFAdd %v2float %289 %284 |
| %285 = OpImageSampleImplicitLod %v4float %288 %290 |
| OpStore %color %285 |
| OpBranch %279 |
| %281 = OpLabel |
| %291 = OpLoad %v2float %tileUV |
| %292 = OpLoad %v2float %frameSize |
| %293 = OpLoad %v2float %offset_1 |
| %295 = OpLoad %27 %spriteSheetSampler |
| %296 = OpLoad %24 %spriteSheetTexture |
| %297 = OpSampledImage %68 %296 %295 |
| %298 = OpFMul %v2float %291 %292 |
| %299 = OpFAdd %v2float %298 %293 |
| %294 = OpImageSampleImplicitLod %v4float %297 %299 |
| OpStore %nc %294 |
| %301 = OpAccessChain %_ptr_Function_float %color %uint_3 |
| %302 = OpLoad %float %301 |
| %303 = OpAccessChain %_ptr_Function_float %nc %uint_3 |
| %304 = OpLoad %float %303 |
| %306 = OpFAdd %float %302 %304 |
| %305 = OpExtInst %float %133 NMin %306 %float_1 |
| OpStore %alpha %305 |
| %307 = OpLoad %v4float %color |
| %308 = OpLoad %v4float %nc |
| %309 = OpAccessChain %_ptr_Function_float %nc %uint_3 |
| %310 = OpLoad %float %309 |
| %312 = OpCompositeExtract %float %307 0 |
| %313 = OpCompositeExtract %float %307 1 |
| %314 = OpCompositeExtract %float %307 2 |
| %315 = OpCompositeConstruct %v3float %312 %313 %314 |
| %316 = OpCompositeExtract %float %308 0 |
| %317 = OpCompositeExtract %float %308 1 |
| %318 = OpCompositeExtract %float %308 2 |
| %319 = OpCompositeConstruct %v3float %316 %317 %318 |
| %320 = OpCompositeConstruct %v3float %310 %310 %310 |
| %311 = OpExtInst %v3float %133 FMix %315 %319 %320 |
| OpStore %mixed %311 |
| %321 = OpLoad %v3float %mixed |
| %322 = OpLoad %float %alpha |
| %323 = OpCompositeExtract %float %321 0 |
| %324 = OpCompositeExtract %float %321 1 |
| %325 = OpCompositeExtract %float %321 2 |
| %326 = OpCompositeConstruct %v4float %323 %324 %325 %322 |
| OpStore %color %326 |
| OpBranch %279 |
| %279 = OpLabel |
| OpBranch %157 |
| %157 = OpLabel |
| %327 = OpLoad %int %i |
| %329 = OpIAdd %int %327 %int_1 |
| OpStore %i %329 |
| OpBranch %155 |
| %156 = OpLabel |
| %332 = OpAccessChain %_ptr_Uniform_v3float %x_20 %uint_0 %uint_8 |
| %333 = OpLoad %v3float %332 |
| %334 = OpLoad %v4float %color |
| %335 = OpCompositeExtract %float %334 0 |
| %336 = OpCompositeExtract %float %334 1 |
| %337 = OpCompositeExtract %float %334 2 |
| %338 = OpCompositeConstruct %v3float %335 %336 %337 |
| %339 = OpFMul %v3float %338 %333 |
| %340 = OpLoad %v4float %color |
| %341 = OpCompositeExtract %float %339 0 |
| %342 = OpCompositeExtract %float %339 1 |
| %343 = OpCompositeExtract %float %339 2 |
| %344 = OpCompositeExtract %float %340 3 |
| %345 = OpCompositeConstruct %v4float %341 %342 %343 %344 |
| OpStore %color %345 |
| %346 = OpLoad %v4float %color |
| OpStore %glFragColor %346 |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %main_out None %347 |
| %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 |
| %356 = 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 |
| %357 = OpFunctionCall %void %main_1 |
| %358 = OpLoad %v4float %glFragColor |
| %359 = OpCompositeConstruct %main_out %358 |
| OpReturnValue %359 |
| OpFunctionEnd |
| %main = OpFunction %void None %101 |
| %361 = OpLabel |
| %363 = OpLoad %v2float %tUV_param_1 |
| %364 = OpLoad %v2float %tileID_1_param_1 |
| %365 = OpLoad %v2float %levelUnits_param_1 |
| %366 = OpLoad %v2float %stageUnits_1_param_1 |
| %367 = OpLoad %v3float %vPosition_param_1 |
| %368 = OpLoad %v2float %vUV_param_1 |
| %362 = OpFunctionCall %main_out %main_inner %363 %364 %365 %366 %367 %368 |
| %369 = OpCompositeExtract %v4float %362 0 |
| OpStore %glFragColor_1_1 %369 |
| OpReturn |
| OpFunctionEnd |