| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 144 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability ImageQuery |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %fragmentMain "fragmentMain" %texCoord_1 %value |
| OpExecutionMode %fragmentMain OriginUpperLeft |
| OpName %texCoord_1 "texCoord_1" |
| OpName %value "value" |
| OpName %bloomDir "bloomDir" |
| OpName %offsets "offsets" |
| OpName %weights "weights" |
| OpName %BloomUniforms "BloomUniforms" |
| OpMemberName %BloomUniforms 0 "radius" |
| OpMemberName %BloomUniforms 1 "dim" |
| OpName %bloom "bloom" |
| OpName %bloomTexture "bloomTexture" |
| OpName %bloomSampler "bloomSampler" |
| OpName %prevTexture "prevTexture" |
| OpName %getGaussianBlur "getGaussianBlur" |
| OpName %texCoord "texCoord" |
| OpName %sum "sum" |
| OpName %FragmentInput "FragmentInput" |
| OpMemberName %FragmentInput 0 "texCoord" |
| OpName %fragmentMain_inner "fragmentMain_inner" |
| OpName %input "input" |
| OpName %fragmentMain "fragmentMain" |
| OpDecorate %texCoord_1 Location 0 |
| OpDecorate %value Location 0 |
| OpDecorate %_arr_float_uint_3 ArrayStride 4 |
| OpDecorate %BloomUniforms Block |
| OpMemberDecorate %BloomUniforms 0 Offset 0 |
| OpMemberDecorate %BloomUniforms 1 Offset 4 |
| OpDecorate %bloom NonWritable |
| OpDecorate %bloom DescriptorSet 0 |
| OpDecorate %bloom Binding 0 |
| OpDecorate %bloomTexture DescriptorSet 0 |
| OpDecorate %bloomTexture Binding 1 |
| OpDecorate %bloomSampler DescriptorSet 0 |
| OpDecorate %bloomSampler Binding 2 |
| OpDecorate %prevTexture DescriptorSet 0 |
| OpDecorate %prevTexture Binding 3 |
| OpMemberDecorate %FragmentInput 0 Offset 0 |
| %float = OpTypeFloat 32 |
| %v2float = OpTypeVector %float 2 |
| %_ptr_Input_v2float = OpTypePointer Input %v2float |
| %texCoord_1 = OpVariable %_ptr_Input_v2float Input |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Output_v4float = OpTypePointer Output %v4float |
| %8 = OpConstantNull %v4float |
| %value = OpVariable %_ptr_Output_v4float Output %8 |
| %float_0 = OpConstant %float 0 |
| %float_1 = OpConstant %float 1 |
| %bloomDir = OpConstantComposite %v2float %float_0 %float_1 |
| %uint = OpTypeInt 32 0 |
| %uint_3 = OpConstant %uint 3 |
| %_arr_float_uint_3 = OpTypeArray %float %uint_3 |
| %float_1_38461542 = OpConstant %float 1.38461542 |
| %float_3_23076916 = OpConstant %float 3.23076916 |
| %17 = OpConstantComposite %_arr_float_uint_3 %float_0 %float_1_38461542 %float_3_23076916 |
| %_ptr_Private__arr_float_uint_3 = OpTypePointer Private %_arr_float_uint_3 |
| %offsets = OpVariable %_ptr_Private__arr_float_uint_3 Private %17 |
| %float_0_227027029 = OpConstant %float 0.227027029 |
| %float_0_31621623 = OpConstant %float 0.31621623 |
| %float_0_0702702701 = OpConstant %float 0.0702702701 |
| %23 = OpConstantComposite %_arr_float_uint_3 %float_0_227027029 %float_0_31621623 %float_0_0702702701 |
| %weights = OpVariable %_ptr_Private__arr_float_uint_3 Private %23 |
| %BloomUniforms = OpTypeStruct %float %float |
| %_ptr_Uniform_BloomUniforms = OpTypePointer Uniform %BloomUniforms |
| %bloom = OpVariable %_ptr_Uniform_BloomUniforms Uniform |
| %30 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| %_ptr_UniformConstant_30 = OpTypePointer UniformConstant %30 |
| %bloomTexture = OpVariable %_ptr_UniformConstant_30 UniformConstant |
| %33 = OpTypeSampler |
| %_ptr_UniformConstant_33 = OpTypePointer UniformConstant %33 |
| %bloomSampler = OpVariable %_ptr_UniformConstant_33 UniformConstant |
| %prevTexture = OpVariable %_ptr_UniformConstant_30 UniformConstant |
| %35 = OpTypeFunction %v4float %v2float |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform_float = OpTypePointer Uniform %float |
| %int = OpTypeInt 32 1 |
| %v2int = OpTypeVector %int 2 |
| %int_0 = OpConstant %int 0 |
| %52 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %59 = OpTypeSampledImage %30 |
| %_ptr_Private_float = OpTypePointer Private %float |
| %int_1 = OpConstant %int 1 |
| %float_2 = OpConstant %float 2 |
| %int_2 = OpConstant %int 2 |
| %v3float = OpTypeVector %float 3 |
| %FragmentInput = OpTypeStruct %v2float |
| %120 = OpTypeFunction %v4float %FragmentInput |
| %uint_1 = OpConstant %uint 1 |
| %void = OpTypeVoid |
| %137 = OpTypeFunction %void |
| %getGaussianBlur = OpFunction %v4float None %35 |
| %texCoord = OpFunctionParameter %v2float |
| %38 = OpLabel |
| %sum = OpVariable %_ptr_Function_v4float Function %8 |
| %41 = OpAccessChain %_ptr_Uniform_float %bloom %uint_0 |
| %42 = OpLoad %float %41 |
| %43 = OpCompositeConstruct %v2float %42 %42 |
| %48 = OpLoad %30 %bloomTexture |
| %45 = OpImageQuerySizeLod %v2int %48 %int_0 |
| %44 = OpConvertSToF %v2float %45 |
| %50 = OpFDiv %v2float %43 %44 |
| %51 = OpFMul %v2float %bloomDir %50 |
| OpStore %sum %52 |
| %55 = OpLoad %v4float %sum |
| %57 = OpLoad %33 %bloomSampler |
| %58 = OpLoad %30 %bloomTexture |
| %60 = OpSampledImage %59 %58 %57 |
| %56 = OpImageSampleImplicitLod %v4float %60 %texCoord |
| %62 = OpAccessChain %_ptr_Private_float %weights %int_0 |
| %63 = OpLoad %float %62 |
| %64 = OpVectorTimesScalar %v4float %56 %63 |
| %65 = OpFAdd %v4float %55 %64 |
| OpStore %sum %65 |
| %66 = OpLoad %v4float %sum |
| %68 = OpLoad %33 %bloomSampler |
| %69 = OpLoad %30 %bloomTexture |
| %70 = OpSampledImage %59 %69 %68 |
| %71 = OpVectorTimesScalar %v2float %51 %float_1 |
| %72 = OpFAdd %v2float %texCoord %71 |
| %67 = OpImageSampleImplicitLod %v4float %70 %72 |
| %74 = OpAccessChain %_ptr_Private_float %weights %int_1 |
| %75 = OpLoad %float %74 |
| %76 = OpVectorTimesScalar %v4float %67 %75 |
| %77 = OpFAdd %v4float %66 %76 |
| OpStore %sum %77 |
| %78 = OpLoad %v4float %sum |
| %80 = OpLoad %33 %bloomSampler |
| %81 = OpLoad %30 %bloomTexture |
| %82 = OpSampledImage %59 %81 %80 |
| %83 = OpVectorTimesScalar %v2float %51 %float_1 |
| %84 = OpFSub %v2float %texCoord %83 |
| %79 = OpImageSampleImplicitLod %v4float %82 %84 |
| %85 = OpAccessChain %_ptr_Private_float %weights %int_1 |
| %86 = OpLoad %float %85 |
| %87 = OpVectorTimesScalar %v4float %79 %86 |
| %88 = OpFAdd %v4float %78 %87 |
| OpStore %sum %88 |
| %89 = OpLoad %v4float %sum |
| %91 = OpLoad %33 %bloomSampler |
| %92 = OpLoad %30 %bloomTexture |
| %93 = OpSampledImage %59 %92 %91 |
| %95 = OpVectorTimesScalar %v2float %51 %float_2 |
| %96 = OpFAdd %v2float %texCoord %95 |
| %90 = OpImageSampleImplicitLod %v4float %93 %96 |
| %98 = OpAccessChain %_ptr_Private_float %weights %int_2 |
| %99 = OpLoad %float %98 |
| %100 = OpVectorTimesScalar %v4float %90 %99 |
| %101 = OpFAdd %v4float %89 %100 |
| OpStore %sum %101 |
| %102 = OpLoad %v4float %sum |
| %104 = OpLoad %33 %bloomSampler |
| %105 = OpLoad %30 %bloomTexture |
| %106 = OpSampledImage %59 %105 %104 |
| %107 = OpVectorTimesScalar %v2float %51 %float_2 |
| %108 = OpFSub %v2float %texCoord %107 |
| %103 = OpImageSampleImplicitLod %v4float %106 %108 |
| %109 = OpAccessChain %_ptr_Private_float %weights %int_2 |
| %110 = OpLoad %float %109 |
| %111 = OpVectorTimesScalar %v4float %103 %110 |
| %112 = OpFAdd %v4float %102 %111 |
| OpStore %sum %112 |
| %114 = OpLoad %v4float %sum |
| %115 = OpVectorShuffle %v3float %114 %114 0 1 2 |
| %116 = OpCompositeExtract %float %115 0 |
| %117 = OpCompositeExtract %float %115 1 |
| %118 = OpCompositeExtract %float %115 2 |
| %119 = OpCompositeConstruct %v4float %116 %117 %118 %float_1 |
| OpReturnValue %119 |
| OpFunctionEnd |
| %fragmentMain_inner = OpFunction %v4float None %120 |
| %input = OpFunctionParameter %FragmentInput |
| %124 = OpLabel |
| %126 = OpCompositeExtract %v2float %input 0 |
| %125 = OpFunctionCall %v4float %getGaussianBlur %126 |
| %128 = OpLoad %33 %bloomSampler |
| %129 = OpLoad %30 %prevTexture |
| %130 = OpSampledImage %59 %129 %128 |
| %131 = OpCompositeExtract %v2float %input 0 |
| %127 = OpImageSampleImplicitLod %v4float %130 %131 |
| %133 = OpAccessChain %_ptr_Uniform_float %bloom %uint_1 |
| %134 = OpLoad %float %133 |
| %135 = OpVectorTimesScalar %v4float %127 %134 |
| %136 = OpFAdd %v4float %125 %135 |
| OpReturnValue %136 |
| OpFunctionEnd |
| %fragmentMain = OpFunction %void None %137 |
| %140 = OpLabel |
| %142 = OpLoad %v2float %texCoord_1 |
| %143 = OpCompositeConstruct %FragmentInput %142 |
| %141 = OpFunctionCall %v4float %fragmentMain_inner %143 |
| OpStore %value %141 |
| OpReturn |
| OpFunctionEnd |