; SPIR-V ; Version: 1.2 ; Generator: rspirv ; Bound: 267 OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %87 "vs_main" %77 %80 %82 %84 %86 OpEntryPoint Fragment %147 "fs_main" %138 %141 %144 %146 OpEntryPoint Fragment %214 "fs_main_without_storage" %207 %209 %211 %213 OpExecutionMode %147 OriginUpperLeft OpExecutionMode %214 OriginUpperLeft OpMemberName %8 0 "view_proj" OpMemberName %8 1 "num_lights" OpName %8 "Globals" OpMemberName %9 0 "world" OpMemberName %9 1 "color" OpName %9 "Entity" OpMemberName %11 0 "proj_position" OpMemberName %11 1 "world_normal" OpMemberName %11 2 "world_position" OpName %11 "VertexOutput" OpMemberName %15 0 "proj" OpMemberName %15 1 "pos" OpMemberName %15 2 "color" OpName %15 "Light" OpName %23 "c_ambient" OpName %18 "c_max_lights" OpName %24 "u_globals" OpName %27 "u_entity" OpName %30 "s_lights" OpName %33 "u_lights" OpName %36 "t_shadow" OpName %38 "sampler_shadow" OpName %41 "light_id" OpName %42 "homogeneous_coords" OpName %43 "fetch_shadow" OpName %73 "out" OpName %77 "position" OpName %80 "normal" OpName %82 "proj_position" OpName %84 "world_normal" OpName %86 "world_position" OpName %87 "vs_main" OpName %131 "color" OpName %133 "i" OpName %138 "proj_position" OpName %141 "world_normal" OpName %144 "world_position" OpName %147 "fs_main" OpName %203 "color" OpName %204 "i" OpName %207 "proj_position" OpName %209 "world_normal" OpName %211 "world_position" OpName %214 "fs_main_without_storage" OpMemberDecorate %8 0 Offset 0 OpMemberDecorate %8 0 ColMajor OpMemberDecorate %8 0 MatrixStride 16 OpMemberDecorate %8 1 Offset 64 OpMemberDecorate %9 0 Offset 0 OpMemberDecorate %9 0 ColMajor OpMemberDecorate %9 0 MatrixStride 16 OpMemberDecorate %9 1 Offset 64 OpMemberDecorate %11 0 Offset 0 OpMemberDecorate %11 1 Offset 16 OpMemberDecorate %11 2 Offset 32 OpMemberDecorate %15 0 Offset 0 OpMemberDecorate %15 0 ColMajor OpMemberDecorate %15 0 MatrixStride 16 OpMemberDecorate %15 1 Offset 64 OpMemberDecorate %15 2 Offset 80 OpDecorate %16 ArrayStride 96 OpDecorate %17 ArrayStride 96 OpDecorate %24 DescriptorSet 0 OpDecorate %24 Binding 0 OpDecorate %25 Block OpMemberDecorate %25 0 Offset 0 OpDecorate %27 DescriptorSet 1 OpDecorate %27 Binding 0 OpDecorate %28 Block OpMemberDecorate %28 0 Offset 0 OpDecorate %30 NonWritable OpDecorate %30 DescriptorSet 0 OpDecorate %30 Binding 1 OpDecorate %31 Block OpMemberDecorate %31 0 Offset 0 OpDecorate %33 DescriptorSet 0 OpDecorate %33 Binding 1 OpDecorate %34 Block OpMemberDecorate %34 0 Offset 0 OpDecorate %36 DescriptorSet 0 OpDecorate %36 Binding 2 OpDecorate %38 DescriptorSet 0 OpDecorate %38 Binding 3 OpDecorate %77 Location 0 OpDecorate %80 Location 1 OpDecorate %82 BuiltIn Position OpDecorate %84 Location 0 OpDecorate %86 Location 1 OpDecorate %138 BuiltIn FragCoord OpDecorate %141 Location 0 OpDecorate %144 Location 1 OpDecorate %146 Location 0 OpDecorate %207 BuiltIn FragCoord OpDecorate %209 Location 0 OpDecorate %211 Location 1 OpDecorate %213 Location 0 %2 = OpTypeVoid %5 = OpTypeFloat 32 %4 = OpTypeVector %5 4 %3 = OpTypeMatrix %4 4 %7 = OpTypeInt 32 0 %6 = OpTypeVector %7 4 %8 = OpTypeStruct %3 %6 %9 = OpTypeStruct %3 %4 %10 = OpTypeVector %5 3 %11 = OpTypeStruct %4 %10 %4 %13 = OpTypeInt 32 1 %12 = OpTypeVector %13 4 %14 = OpTypeMatrix %10 3 %15 = OpTypeStruct %3 %4 %4 %16 = OpTypeRuntimeArray %15 %18 = OpConstant %7 10 %17 = OpTypeArray %15 %18 %19 = OpTypeImage %5 2D 1 1 0 1 Unknown %20 = OpTypeSampler %21 = OpTypeVector %5 2 %22 = OpConstant %5 0.05 %23 = OpConstantComposite %10 %22 %22 %22 %25 = OpTypeStruct %8 %26 = OpTypePointer Uniform %25 %24 = OpVariable %26 Uniform %28 = OpTypeStruct %9 %29 = OpTypePointer Uniform %28 %27 = OpVariable %29 Uniform %31 = OpTypeStruct %16 %32 = OpTypePointer StorageBuffer %31 %30 = OpVariable %32 StorageBuffer %34 = OpTypeStruct %17 %35 = OpTypePointer Uniform %34 %33 = OpVariable %35 Uniform %37 = OpTypePointer UniformConstant %19 %36 = OpVariable %37 UniformConstant %39 = OpTypePointer UniformConstant %20 %38 = OpVariable %39 UniformConstant %44 = OpTypeFunction %5 %7 %4 %47 = OpConstant %5 0.0 %48 = OpConstant %5 1.0 %49 = OpConstant %5 0.5 %50 = OpConstant %5 -0.5 %53 = OpTypeBool %68 = OpTypeSampledImage %19 %74 = OpTypePointer Function %11 %75 = OpConstantNull %11 %78 = OpTypePointer Input %12 %77 = OpVariable %78 Input %80 = OpVariable %78 Input %83 = OpTypePointer Output %4 %82 = OpVariable %83 Output %85 = OpTypePointer Output %10 %84 = OpVariable %85 Output %86 = OpVariable %83 Output %88 = OpTypeFunction %2 %89 = OpTypePointer Uniform %8 %90 = OpConstant %7 0 %92 = OpTypePointer Uniform %9 %95 = OpTypePointer Uniform %3 %102 = OpTypePointer Function %10 %110 = OpTypeVector %13 3 %114 = OpConstant %7 1 %116 = OpTypePointer Function %4 %117 = OpConstant %7 2 %125 = OpTypePointer Output %5 %132 = OpConstantNull %10 %134 = OpTypePointer Function %7 %135 = OpConstantNull %7 %139 = OpTypePointer Input %4 %138 = OpVariable %139 Input %142 = OpTypePointer Input %10 %141 = OpVariable %142 Input %144 = OpVariable %139 Input %146 = OpVariable %83 Output %150 = OpTypePointer StorageBuffer %16 %162 = OpTypePointer Uniform %6 %163 = OpTypePointer Uniform %7 %173 = OpTypePointer StorageBuffer %15 %199 = OpTypePointer Uniform %4 %207 = OpVariable %139 Input %209 = OpVariable %142 Input %211 = OpVariable %139 Input %213 = OpVariable %83 Output %217 = OpTypePointer Uniform %17 %238 = OpTypePointer Uniform %15 %43 = OpFunction %5 None %44 %41 = OpFunctionParameter %7 %42 = OpFunctionParameter %4 %40 = OpLabel %45 = OpLoad %19 %36 %46 = OpLoad %20 %38 OpBranch %51 %51 = OpLabel %52 = OpCompositeExtract %5 %42 3 %54 = OpFOrdLessThanEqual %53 %52 %47 OpSelectionMerge %55 None OpBranchConditional %54 %56 %55 %56 = OpLabel OpReturnValue %48 %55 = OpLabel %57 = OpCompositeConstruct %21 %49 %50 %58 = OpCompositeExtract %5 %42 3 %59 = OpFDiv %5 %48 %58 %60 = OpVectorShuffle %21 %42 %42 0 1 %61 = OpFMul %21 %60 %57 %62 = OpVectorTimesScalar %21 %61 %59 %63 = OpCompositeConstruct %21 %49 %49 %64 = OpFAdd %21 %62 %63 %65 = OpBitcast %13 %41 %66 = OpCompositeExtract %5 %42 2 %67 = OpFMul %5 %66 %59 %69 = OpConvertSToF %5 %65 %70 = OpCompositeConstruct %10 %64 %69 %71 = OpSampledImage %68 %45 %46 %72 = OpImageSampleDrefExplicitLod %5 %71 %70 %67 Lod %47 OpReturnValue %72 OpFunctionEnd %87 = OpFunction %2 None %88 %76 = OpLabel %73 = OpVariable %74 Function %75 %79 = OpLoad %12 %77 %81 = OpLoad %12 %80 %91 = OpAccessChain %89 %24 %90 %93 = OpAccessChain %92 %27 %90 OpBranch %94 %94 = OpLabel %96 = OpAccessChain %95 %93 %90 %97 = OpLoad %3 %96 %98 = OpAccessChain %95 %93 %90 %99 = OpLoad %3 %98 %100 = OpConvertSToF %4 %79 %101 = OpMatrixTimesVector %4 %99 %100 %103 = OpCompositeExtract %4 %97 0 %104 = OpVectorShuffle %10 %103 %103 0 1 2 %105 = OpCompositeExtract %4 %97 1 %106 = OpVectorShuffle %10 %105 %105 0 1 2 %107 = OpCompositeExtract %4 %97 2 %108 = OpVectorShuffle %10 %107 %107 0 1 2 %109 = OpCompositeConstruct %14 %104 %106 %108 %111 = OpVectorShuffle %110 %81 %81 0 1 2 %112 = OpConvertSToF %10 %111 %113 = OpMatrixTimesVector %10 %109 %112 %115 = OpAccessChain %102 %73 %114 OpStore %115 %113 %118 = OpAccessChain %116 %73 %117 OpStore %118 %101 %119 = OpAccessChain %95 %91 %90 %120 = OpLoad %3 %119 %121 = OpMatrixTimesVector %4 %120 %101 %122 = OpAccessChain %116 %73 %90 OpStore %122 %121 %123 = OpLoad %11 %73 %124 = OpCompositeExtract %4 %123 0 OpStore %82 %124 %126 = OpAccessChain %125 %82 %114 %127 = OpLoad %5 %126 %128 = OpFNegate %5 %127 OpStore %126 %128 %129 = OpCompositeExtract %10 %123 1 OpStore %84 %129 %130 = OpCompositeExtract %4 %123 2 OpStore %86 %130 OpReturn OpFunctionEnd %147 = OpFunction %2 None %88 %136 = OpLabel %131 = OpVariable %102 Function %132 %133 = OpVariable %134 Function %135 %140 = OpLoad %4 %138 %143 = OpLoad %10 %141 %145 = OpLoad %4 %144 %137 = OpCompositeConstruct %11 %140 %143 %145 %148 = OpAccessChain %89 %24 %90 %149 = OpAccessChain %92 %27 %90 %151 = OpAccessChain %150 %30 %90 %152 = OpLoad %19 %36 %153 = OpLoad %20 %38 OpBranch %154 %154 = OpLabel %155 = OpCompositeExtract %10 %137 1 %156 = OpExtInst %10 %1 Normalize %155 OpStore %131 %23 OpStore %133 %90 OpBranch %157 %157 = OpLabel OpLoopMerge %158 %160 None OpBranch %159 %159 = OpLabel %161 = OpLoad %7 %133 %164 = OpAccessChain %163 %148 %114 %90 %165 = OpLoad %7 %164 %166 = OpExtInst %7 %1 UMin %165 %18 %167 = OpULessThan %53 %161 %166 OpSelectionMerge %168 None OpBranchConditional %167 %168 %169 %169 = OpLabel OpBranch %158 %168 = OpLabel OpBranch %170 %170 = OpLabel %172 = OpLoad %7 %133 %174 = OpAccessChain %173 %151 %172 %175 = OpLoad %15 %174 %176 = OpLoad %7 %133 %177 = OpCompositeExtract %3 %175 0 %178 = OpCompositeExtract %4 %137 2 %179 = OpMatrixTimesVector %4 %177 %178 %180 = OpFunctionCall %5 %43 %176 %179 %181 = OpCompositeExtract %4 %175 1 %182 = OpVectorShuffle %10 %181 %181 0 1 2 %183 = OpCompositeExtract %4 %137 2 %184 = OpVectorShuffle %10 %183 %183 0 1 2 %185 = OpFSub %10 %182 %184 %186 = OpExtInst %10 %1 Normalize %185 %187 = OpDot %5 %156 %186 %188 = OpExtInst %5 %1 FMax %47 %187 %189 = OpFMul %5 %180 %188 %190 = OpCompositeExtract %4 %175 2 %191 = OpVectorShuffle %10 %190 %190 0 1 2 %192 = OpVectorTimesScalar %10 %191 %189 %193 = OpLoad %10 %131 %194 = OpFAdd %10 %193 %192 OpStore %131 %194 OpBranch %171 %171 = OpLabel OpBranch %160 %160 = OpLabel %195 = OpLoad %7 %133 %196 = OpIAdd %7 %195 %114 OpStore %133 %196 OpBranch %157 %158 = OpLabel %197 = OpLoad %10 %131 %198 = OpCompositeConstruct %4 %197 %48 %200 = OpAccessChain %199 %149 %114 %201 = OpLoad %4 %200 %202 = OpFMul %4 %198 %201 OpStore %146 %202 OpReturn OpFunctionEnd %214 = OpFunction %2 None %88 %205 = OpLabel %203 = OpVariable %102 Function %132 %204 = OpVariable %134 Function %135 %208 = OpLoad %4 %207 %210 = OpLoad %10 %209 %212 = OpLoad %4 %211 %206 = OpCompositeConstruct %11 %208 %210 %212 %215 = OpAccessChain %89 %24 %90 %216 = OpAccessChain %92 %27 %90 %218 = OpAccessChain %217 %33 %90 %219 = OpLoad %19 %36 %220 = OpLoad %20 %38 OpBranch %221 %221 = OpLabel %222 = OpCompositeExtract %10 %206 1 %223 = OpExtInst %10 %1 Normalize %222 OpStore %203 %23 OpStore %204 %90 OpBranch %224 %224 = OpLabel OpLoopMerge %225 %227 None OpBranch %226 %226 = OpLabel %228 = OpLoad %7 %204 %229 = OpAccessChain %163 %215 %114 %90 %230 = OpLoad %7 %229 %231 = OpExtInst %7 %1 UMin %230 %18 %232 = OpULessThan %53 %228 %231 OpSelectionMerge %233 None OpBranchConditional %232 %233 %234 %234 = OpLabel OpBranch %225 %233 = OpLabel OpBranch %235 %235 = OpLabel %237 = OpLoad %7 %204 %239 = OpAccessChain %238 %218 %237 %240 = OpLoad %15 %239 %241 = OpLoad %7 %204 %242 = OpCompositeExtract %3 %240 0 %243 = OpCompositeExtract %4 %206 2 %244 = OpMatrixTimesVector %4 %242 %243 %245 = OpFunctionCall %5 %43 %241 %244 %246 = OpCompositeExtract %4 %240 1 %247 = OpVectorShuffle %10 %246 %246 0 1 2 %248 = OpCompositeExtract %4 %206 2 %249 = OpVectorShuffle %10 %248 %248 0 1 2 %250 = OpFSub %10 %247 %249 %251 = OpExtInst %10 %1 Normalize %250 %252 = OpDot %5 %223 %251 %253 = OpExtInst %5 %1 FMax %47 %252 %254 = OpFMul %5 %245 %253 %255 = OpCompositeExtract %4 %240 2 %256 = OpVectorShuffle %10 %255 %255 0 1 2 %257 = OpVectorTimesScalar %10 %256 %254 %258 = OpLoad %10 %203 %259 = OpFAdd %10 %258 %257 OpStore %203 %259 OpBranch %236 %236 = OpLabel OpBranch %227 %227 = OpLabel %260 = OpLoad %7 %204 %261 = OpIAdd %7 %260 %114 OpStore %204 %261 OpBranch %224 %225 = OpLabel %262 = OpLoad %10 %203 %263 = OpCompositeConstruct %4 %262 %48 %264 = OpAccessChain %199 %216 %114 %265 = OpLoad %4 %264 %266 = OpFMul %4 %263 %265 OpStore %213 %266 OpReturn OpFunctionEnd