add assemble script
This commit is contained in:
Executable
+7
@@ -0,0 +1,7 @@
|
||||
glslangValidator -g0 -S frag --target-env vulkan1.4 src/trace.frag.glsl
|
||||
spirv-dis --no-color frag.spv > src/trace.spv-dis
|
||||
sed -i '/%18 =/,/OpFunctionEnd/d' src/trace.spv-dis
|
||||
sed -i 's/%18\b/%1000/g' src/trace.spv-dis
|
||||
spirv-as --preserve-numeric-ids --target-env vulkan1.4 -o src/recompiled.spv src/trace.spv-dis
|
||||
rm frag.spv
|
||||
# rm src/trace.spv-dis
|
||||
Binary file not shown.
+3
-3
@@ -32,7 +32,7 @@ float scene(vec3 p) {
|
||||
const float EPSILON = .0001;
|
||||
const uint MAX_STEPS = 50;
|
||||
#define NEARPLANE 0.
|
||||
float FARPLANE = 10;
|
||||
float FARPLANE = length(pc.dimensions / 8.);
|
||||
#define gl_GlobalInvocationID uvec3(1)
|
||||
|
||||
vec3 getNormal(vec3 p, float dens) {
|
||||
@@ -76,8 +76,8 @@ void main() {
|
||||
}
|
||||
else
|
||||
{
|
||||
f_color = vec4(raydir, 1.0);
|
||||
// discard;
|
||||
//f_color = vec4(raydir, 1.0);
|
||||
discard;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
+344
-347
@@ -1,38 +1,42 @@
|
||||
; SPIR-V
|
||||
; Version: 1.6
|
||||
; Generator: Khronos Glslang Reference Front End; 11
|
||||
; Bound: 337
|
||||
; Bound: 341
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %4 "main" %34 %45 %89 %249 %260 %294 %gl_FragDepth
|
||||
OpEntryPoint Fragment %4 "main" %34 %41 %97 %257 %268 %302 %gl_FragDepth
|
||||
OpExecutionMode %4 OriginUpperLeft
|
||||
OpExecutionMode %4 DepthGreater
|
||||
OpDecorate %_struct_43 Block
|
||||
OpMemberDecorate %_struct_43 0 ColMajor
|
||||
OpMemberDecorate %_struct_43 0 MatrixStride 16
|
||||
OpMemberDecorate %_struct_43 0 Offset 0
|
||||
OpDecorate %_arr_uint_uint_16 ArrayStride 4
|
||||
OpDecorate %_struct_39 Block
|
||||
OpMemberDecorate %_struct_39 0 ColMajor
|
||||
OpMemberDecorate %_struct_39 0 MatrixStride 16
|
||||
OpMemberDecorate %_struct_39 0 Offset 0
|
||||
OpMemberDecorate %_struct_39 1 Offset 64
|
||||
OpMemberDecorate %_struct_39 2 Offset 80
|
||||
OpMemberDecorate %_struct_39 3 Offset 92
|
||||
OpDecorate %_arr_v4float_uint_32 ArrayStride 16
|
||||
OpDecorate %_arr_v4float_uint_32_0 ArrayStride 16
|
||||
OpDecorate %_struct_87 Block
|
||||
OpMemberDecorate %_struct_87 0 Offset 0
|
||||
OpMemberDecorate %_struct_87 1 Offset 512
|
||||
OpMemberDecorate %_struct_87 2 Offset 1024
|
||||
OpDecorate %89 Binding 0
|
||||
OpDecorate %89 DescriptorSet 0
|
||||
OpDecorate %249 Location 0
|
||||
OpDecorate %_struct_258 Block
|
||||
OpMemberDecorate %_struct_258 0 ColMajor
|
||||
OpMemberDecorate %_struct_258 0 MatrixStride 16
|
||||
OpMemberDecorate %_struct_258 0 Offset 0
|
||||
OpMemberDecorate %_struct_258 1 ColMajor
|
||||
OpMemberDecorate %_struct_258 1 MatrixStride 16
|
||||
OpMemberDecorate %_struct_258 1 Offset 64
|
||||
OpMemberDecorate %_struct_258 2 Offset 128
|
||||
OpDecorate %260 Binding 1
|
||||
OpDecorate %260 DescriptorSet 0
|
||||
OpDecorate %294 Location 0
|
||||
OpDecorate %_struct_95 Block
|
||||
OpMemberDecorate %_struct_95 0 Offset 0
|
||||
OpMemberDecorate %_struct_95 1 Offset 512
|
||||
OpMemberDecorate %_struct_95 2 Offset 1024
|
||||
OpDecorate %97 Binding 0
|
||||
OpDecorate %97 DescriptorSet 0
|
||||
OpDecorate %257 Location 0
|
||||
OpDecorate %_struct_266 Block
|
||||
OpMemberDecorate %_struct_266 0 ColMajor
|
||||
OpMemberDecorate %_struct_266 0 MatrixStride 16
|
||||
OpMemberDecorate %_struct_266 0 Offset 0
|
||||
OpMemberDecorate %_struct_266 1 ColMajor
|
||||
OpMemberDecorate %_struct_266 1 MatrixStride 16
|
||||
OpMemberDecorate %_struct_266 1 Offset 64
|
||||
OpMemberDecorate %_struct_266 2 Offset 128
|
||||
OpDecorate %268 Binding 1
|
||||
OpDecorate %268 DescriptorSet 0
|
||||
OpDecorate %302 Location 0
|
||||
OpDecorate %gl_FragDepth BuiltIn FragDepth
|
||||
%void = OpTypeVoid
|
||||
%3 = OpTypeFunction %void
|
||||
@@ -49,29 +53,32 @@
|
||||
%27 = OpTypeFunction %v2float %_ptr_Function_v3float %_ptr_Function_v3float %_ptr_Function_v3float
|
||||
%_ptr_Private_float = OpTypePointer Private %float
|
||||
%34 = OpVariable %_ptr_Private_float Private
|
||||
%float_10 = OpConstant %float 10
|
||||
%mat4v4float = OpTypeMatrix %v4float 4
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_16 = OpConstant %uint 16
|
||||
%_arr_uint_uint_16 = OpTypeArray %uint %uint_16
|
||||
%_struct_39 = OpTypeStruct %mat4v4float %v3float %v3float %_arr_uint_uint_16
|
||||
%_ptr_PushConstant__struct_39 = OpTypePointer PushConstant %_struct_39
|
||||
%41 = OpVariable %_ptr_PushConstant__struct_39 PushConstant
|
||||
%int = OpTypeInt 32 1
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_PushConstant_v3float = OpTypePointer PushConstant %v3float
|
||||
%float_8 = OpConstant %float 8
|
||||
%float_0 = OpConstant %float 0
|
||||
%38 = OpConstantComposite %v3float %float_0 %float_0 %float_0
|
||||
%53 = OpConstantComposite %v3float %float_0 %float_0 %float_0
|
||||
%mat3v3float = OpTypeMatrix %v3float 3
|
||||
%_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float
|
||||
%mat4v4float = OpTypeMatrix %v4float 4
|
||||
%_struct_43 = OpTypeStruct %mat4v4float
|
||||
%_ptr_PushConstant__struct_43 = OpTypePointer PushConstant %_struct_43
|
||||
%45 = OpVariable %_ptr_PushConstant__struct_43 PushConstant
|
||||
%int = OpTypeInt 32 1
|
||||
%int_0 = OpConstant %int 0
|
||||
%_ptr_PushConstant_v4float = OpTypePointer PushConstant %v4float
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_32 = OpConstant %uint 32
|
||||
%_arr_v4float_uint_32 = OpTypeArray %v4float %uint_32
|
||||
%_arr_v4float_uint_32_0 = OpTypeArray %v4float %uint_32
|
||||
%_struct_87 = OpTypeStruct %_arr_v4float_uint_32 %_arr_v4float_uint_32_0 %uint
|
||||
%_ptr_Uniform__struct_87 = OpTypePointer Uniform %_struct_87
|
||||
%89 = OpVariable %_ptr_Uniform__struct_87 Uniform
|
||||
%_struct_95 = OpTypeStruct %_arr_v4float_uint_32 %_arr_v4float_uint_32_0 %uint
|
||||
%_ptr_Uniform__struct_95 = OpTypePointer Uniform %_struct_95
|
||||
%97 = OpVariable %_ptr_Uniform__struct_95 Uniform
|
||||
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
|
||||
%bool = OpTypeBool
|
||||
%int_32 = OpConstant %int 32
|
||||
@@ -82,353 +89,343 @@
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
||||
%182 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%190 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%float_0_899999976 = OpConstant %float 0.899999976
|
||||
%uint_50 = OpConstant %uint 50
|
||||
%_ptr_Input_v4float = OpTypePointer Input %v4float
|
||||
%249 = OpVariable %_ptr_Input_v4float Input
|
||||
%257 = OpVariable %_ptr_Input_v4float Input
|
||||
%_ptr_PushConstant_mat4v4float = OpTypePointer PushConstant %mat4v4float
|
||||
%_struct_258 = OpTypeStruct %mat4v4float %mat4v4float %v3float
|
||||
%_ptr_Uniform__struct_258 = OpTypePointer Uniform %_struct_258
|
||||
%260 = OpVariable %_ptr_Uniform__struct_258 Uniform
|
||||
%_struct_266 = OpTypeStruct %mat4v4float %mat4v4float %v3float
|
||||
%_ptr_Uniform__struct_266 = OpTypePointer Uniform %_struct_266
|
||||
%268 = OpVariable %_ptr_Uniform__struct_266 Uniform
|
||||
%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%294 = OpVariable %_ptr_Output_v4float Output
|
||||
%302 = OpVariable %_ptr_Output_v4float Output
|
||||
%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%gl_FragDepth = OpVariable %_ptr_Output_float Output
|
||||
%4 = OpFunction %void None %3
|
||||
%5 = OpLabel
|
||||
%247 = OpVariable %_ptr_Function_v3float Function
|
||||
%252 = OpVariable %_ptr_Function_v3float Function
|
||||
%272 = OpVariable %_ptr_Function_v2float Function
|
||||
%273 = OpVariable %_ptr_Function_v3float Function
|
||||
%274 = OpVariable %_ptr_Function_v3float Function
|
||||
%276 = OpVariable %_ptr_Function_v3float Function
|
||||
%278 = OpVariable %_ptr_Function_v3float Function
|
||||
%255 = OpVariable %_ptr_Function_v3float Function
|
||||
%260 = OpVariable %_ptr_Function_v3float Function
|
||||
%280 = OpVariable %_ptr_Function_v2float Function
|
||||
%281 = OpVariable %_ptr_Function_v3float Function
|
||||
%282 = OpVariable %_ptr_Function_v3float Function
|
||||
%284 = OpVariable %_ptr_Function_v3float Function
|
||||
%286 = OpVariable %_ptr_Function_v3float Function
|
||||
%287 = OpVariable %_ptr_Function_v3float Function
|
||||
%289 = OpVariable %_ptr_Function_float Function
|
||||
%304 = OpVariable %_ptr_Function_v3float Function
|
||||
%306 = OpVariable %_ptr_Function_v4float Function
|
||||
%312 = OpVariable %_ptr_Function_v4float Function
|
||||
OpStore %34 %float_10
|
||||
%250 = OpLoad %v4float %249
|
||||
%251 = OpVectorShuffle %v3float %250 %250 0 1 2
|
||||
OpStore %247 %251
|
||||
%253 = OpLoad %v3float %247
|
||||
%255 = OpAccessChain %_ptr_PushConstant_mat4v4float %45 %int_0
|
||||
%256 = OpLoad %mat4v4float %255
|
||||
%257 = OpExtInst %mat4v4float %1 MatrixInverse %256
|
||||
%262 = OpAccessChain %_ptr_Uniform_v3float %260 %int_2
|
||||
%263 = OpLoad %v3float %262
|
||||
%264 = OpCompositeExtract %float %263 0
|
||||
%265 = OpCompositeExtract %float %263 1
|
||||
%266 = OpCompositeExtract %float %263 2
|
||||
%267 = OpCompositeConstruct %v4float %264 %265 %266 %float_1
|
||||
%268 = OpMatrixTimesVector %v4float %257 %267
|
||||
%269 = OpVectorShuffle %v3float %268 %268 0 1 2
|
||||
%270 = OpFSub %v3float %253 %269
|
||||
%271 = OpExtInst %v3float %1 Normalize %270
|
||||
OpStore %252 %271
|
||||
%275 = OpLoad %v3float %247
|
||||
OpStore %274 %275
|
||||
%277 = OpLoad %v3float %252
|
||||
OpStore %276 %277
|
||||
%279 = OpFunctionCall %v2float %31 %274 %276 %278
|
||||
%280 = OpLoad %v3float %278
|
||||
OpStore %273 %280
|
||||
OpStore %272 %279
|
||||
%281 = OpAccessChain %_ptr_Function_float %272 %uint_1
|
||||
%282 = OpLoad %float %281
|
||||
%283 = OpFOrdLessThan %bool %282 %float_9_99999975en05
|
||||
OpSelectionMerge %285 None
|
||||
OpBranchConditional %283 %284 %328
|
||||
%284 = OpLabel
|
||||
%288 = OpLoad %v3float %273
|
||||
OpStore %287 %288
|
||||
%290 = OpAccessChain %_ptr_Function_float %272 %uint_1
|
||||
%291 = OpLoad %float %290
|
||||
OpStore %289 %291
|
||||
%292 = OpFunctionCall %v3float %24 %287 %289
|
||||
OpStore %286 %292
|
||||
%295 = OpAccessChain %_ptr_PushConstant_mat4v4float %45 %int_0
|
||||
%296 = OpLoad %mat4v4float %295
|
||||
%297 = OpExtInst %mat4v4float %1 MatrixInverse %296
|
||||
%298 = OpLoad %v3float %273
|
||||
%299 = OpCompositeExtract %float %298 0
|
||||
%300 = OpCompositeExtract %float %298 1
|
||||
%301 = OpCompositeExtract %float %298 2
|
||||
%302 = OpCompositeConstruct %v4float %299 %300 %301 %float_1
|
||||
%303 = OpMatrixTimesVector %v4float %297 %302
|
||||
%305 = OpLoad %v3float %286
|
||||
OpStore %304 %305
|
||||
OpStore %306 %303
|
||||
%307 = OpFunctionCall %v3float %14 %304 %306
|
||||
%308 = OpCompositeExtract %float %307 0
|
||||
%309 = OpCompositeExtract %float %307 1
|
||||
%310 = OpCompositeExtract %float %307 2
|
||||
%311 = OpCompositeConstruct %v4float %308 %309 %310 %float_1
|
||||
OpStore %294 %311
|
||||
%314 = OpAccessChain %_ptr_Uniform_mat4v4float %260 %int_1
|
||||
%315 = OpLoad %mat4v4float %314
|
||||
%316 = OpAccessChain %_ptr_Uniform_mat4v4float %260 %int_0
|
||||
%317 = OpLoad %mat4v4float %316
|
||||
%318 = OpMatrixTimesMatrix %mat4v4float %315 %317
|
||||
%319 = OpAccessChain %_ptr_PushConstant_mat4v4float %45 %int_0
|
||||
%320 = OpLoad %mat4v4float %319
|
||||
%321 = OpMatrixTimesMatrix %mat4v4float %318 %320
|
||||
%322 = OpLoad %v3float %273
|
||||
%323 = OpCompositeExtract %float %322 0
|
||||
%324 = OpCompositeExtract %float %322 1
|
||||
%325 = OpCompositeExtract %float %322 2
|
||||
%326 = OpCompositeConstruct %v4float %323 %324 %325 %float_1
|
||||
%327 = OpMatrixTimesVector %v4float %321 %326
|
||||
OpStore %312 %327
|
||||
OpBranch %285
|
||||
%328 = OpLabel
|
||||
%329 = OpLoad %v3float %252
|
||||
%330 = OpCompositeExtract %float %329 0
|
||||
%331 = OpCompositeExtract %float %329 1
|
||||
%332 = OpCompositeExtract %float %329 2
|
||||
%333 = OpCompositeConstruct %v4float %330 %331 %332 %float_1
|
||||
OpStore %294 %333
|
||||
OpBranch %285
|
||||
%285 = OpLabel
|
||||
%294 = OpVariable %_ptr_Function_v3float Function
|
||||
%295 = OpVariable %_ptr_Function_v3float Function
|
||||
%297 = OpVariable %_ptr_Function_float Function
|
||||
%312 = OpVariable %_ptr_Function_v3float Function
|
||||
%314 = OpVariable %_ptr_Function_v4float Function
|
||||
%320 = OpVariable %_ptr_Function_v4float Function
|
||||
%45 = OpAccessChain %_ptr_PushConstant_v3float %41 %int_1
|
||||
%46 = OpLoad %v3float %45
|
||||
%48 = OpCompositeConstruct %v3float %float_8 %float_8 %float_8
|
||||
%49 = OpFDiv %v3float %46 %48
|
||||
%50 = OpExtInst %float %1 Length %49
|
||||
OpStore %34 %50
|
||||
%258 = OpLoad %v4float %257
|
||||
%259 = OpVectorShuffle %v3float %258 %258 0 1 2
|
||||
OpStore %255 %259
|
||||
%261 = OpLoad %v3float %255
|
||||
%263 = OpAccessChain %_ptr_PushConstant_mat4v4float %41 %int_0
|
||||
%264 = OpLoad %mat4v4float %263
|
||||
%265 = OpExtInst %mat4v4float %1 MatrixInverse %264
|
||||
%270 = OpAccessChain %_ptr_Uniform_v3float %268 %int_2
|
||||
%271 = OpLoad %v3float %270
|
||||
%272 = OpCompositeExtract %float %271 0
|
||||
%273 = OpCompositeExtract %float %271 1
|
||||
%274 = OpCompositeExtract %float %271 2
|
||||
%275 = OpCompositeConstruct %v4float %272 %273 %274 %float_1
|
||||
%276 = OpMatrixTimesVector %v4float %265 %275
|
||||
%277 = OpVectorShuffle %v3float %276 %276 0 1 2
|
||||
%278 = OpFSub %v3float %261 %277
|
||||
%279 = OpExtInst %v3float %1 Normalize %278
|
||||
OpStore %260 %279
|
||||
%283 = OpLoad %v3float %255
|
||||
OpStore %282 %283
|
||||
%285 = OpLoad %v3float %260
|
||||
OpStore %284 %285
|
||||
%287 = OpFunctionCall %v2float %31 %282 %284 %286
|
||||
%288 = OpLoad %v3float %286
|
||||
OpStore %281 %288
|
||||
OpStore %280 %287
|
||||
%289 = OpAccessChain %_ptr_Function_float %280 %uint_1
|
||||
%290 = OpLoad %float %289
|
||||
%291 = OpFOrdLessThan %bool %290 %float_9_99999975en05
|
||||
OpSelectionMerge %293 None
|
||||
OpBranchConditional %291 %292 %336
|
||||
%292 = OpLabel
|
||||
%296 = OpLoad %v3float %281
|
||||
OpStore %295 %296
|
||||
%298 = OpAccessChain %_ptr_Function_float %280 %uint_1
|
||||
%299 = OpLoad %float %298
|
||||
OpStore %297 %299
|
||||
%300 = OpFunctionCall %v3float %24 %295 %297
|
||||
OpStore %294 %300
|
||||
%303 = OpAccessChain %_ptr_PushConstant_mat4v4float %41 %int_0
|
||||
%304 = OpLoad %mat4v4float %303
|
||||
%305 = OpExtInst %mat4v4float %1 MatrixInverse %304
|
||||
%306 = OpLoad %v3float %281
|
||||
%307 = OpCompositeExtract %float %306 0
|
||||
%308 = OpCompositeExtract %float %306 1
|
||||
%309 = OpCompositeExtract %float %306 2
|
||||
%310 = OpCompositeConstruct %v4float %307 %308 %309 %float_1
|
||||
%311 = OpMatrixTimesVector %v4float %305 %310
|
||||
%313 = OpLoad %v3float %294
|
||||
OpStore %312 %313
|
||||
OpStore %314 %311
|
||||
%315 = OpFunctionCall %v3float %14 %312 %314
|
||||
%316 = OpCompositeExtract %float %315 0
|
||||
%317 = OpCompositeExtract %float %315 1
|
||||
%318 = OpCompositeExtract %float %315 2
|
||||
%319 = OpCompositeConstruct %v4float %316 %317 %318 %float_1
|
||||
OpStore %302 %319
|
||||
%322 = OpAccessChain %_ptr_Uniform_mat4v4float %268 %int_1
|
||||
%323 = OpLoad %mat4v4float %322
|
||||
%324 = OpAccessChain %_ptr_Uniform_mat4v4float %268 %int_0
|
||||
%325 = OpLoad %mat4v4float %324
|
||||
%326 = OpMatrixTimesMatrix %mat4v4float %323 %325
|
||||
%327 = OpAccessChain %_ptr_PushConstant_mat4v4float %41 %int_0
|
||||
%328 = OpLoad %mat4v4float %327
|
||||
%329 = OpMatrixTimesMatrix %mat4v4float %326 %328
|
||||
%330 = OpLoad %v3float %281
|
||||
%331 = OpCompositeExtract %float %330 0
|
||||
%332 = OpCompositeExtract %float %330 1
|
||||
%333 = OpCompositeExtract %float %330 2
|
||||
%334 = OpCompositeConstruct %v4float %331 %332 %333 %float_1
|
||||
%335 = OpMatrixTimesVector %v4float %329 %334
|
||||
OpStore %320 %335
|
||||
OpBranch %293
|
||||
%336 = OpLabel
|
||||
OpTerminateInvocation
|
||||
%293 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%14 = OpFunction %v3float None %11
|
||||
%12 = OpFunctionParameter %_ptr_Function_v3float
|
||||
%13 = OpFunctionParameter %_ptr_Function_v4float
|
||||
%15 = OpLabel
|
||||
%36 = OpVariable %_ptr_Function_v3float Function
|
||||
%41 = OpVariable %_ptr_Function_mat3v3float Function
|
||||
%75 = OpVariable %_ptr_Function_int Function
|
||||
OpStore %36 %38
|
||||
%49 = OpAccessChain %_ptr_PushConstant_v4float %45 %int_0 %int_0
|
||||
%50 = OpLoad %v4float %49
|
||||
%51 = OpVectorShuffle %v3float %50 %50 0 1 2
|
||||
%53 = OpAccessChain %_ptr_PushConstant_v4float %45 %int_0 %int_1
|
||||
%54 = OpLoad %v4float %53
|
||||
%55 = OpVectorShuffle %v3float %54 %54 0 1 2
|
||||
%57 = OpAccessChain %_ptr_PushConstant_v4float %45 %int_0 %int_2
|
||||
%58 = OpLoad %v4float %57
|
||||
%59 = OpVectorShuffle %v3float %58 %58 0 1 2
|
||||
%61 = OpCompositeExtract %float %51 0
|
||||
%62 = OpCompositeExtract %float %51 1
|
||||
%63 = OpCompositeExtract %float %51 2
|
||||
%64 = OpCompositeExtract %float %55 0
|
||||
%65 = OpCompositeExtract %float %55 1
|
||||
%66 = OpCompositeExtract %float %55 2
|
||||
%67 = OpCompositeExtract %float %59 0
|
||||
%68 = OpCompositeExtract %float %59 1
|
||||
%69 = OpCompositeExtract %float %59 2
|
||||
%70 = OpCompositeConstruct %v3float %61 %62 %63
|
||||
%71 = OpCompositeConstruct %v3float %64 %65 %66
|
||||
%72 = OpCompositeConstruct %v3float %67 %68 %69
|
||||
%73 = OpCompositeConstruct %mat3v3float %70 %71 %72
|
||||
OpStore %41 %73
|
||||
OpStore %75 %int_0
|
||||
OpBranch %76
|
||||
%76 = OpLabel
|
||||
OpLoopMerge %78 %79 None
|
||||
OpBranch %80
|
||||
%80 = OpLabel
|
||||
%81 = OpLoad %int %75
|
||||
%83 = OpBitcast %uint %81
|
||||
%91 = OpAccessChain %_ptr_Uniform_uint %89 %int_2
|
||||
%92 = OpLoad %uint %91
|
||||
%94 = OpULessThan %bool %83 %92
|
||||
%95 = OpLoad %int %75
|
||||
%97 = OpSLessThan %bool %95 %int_32
|
||||
%98 = OpLogicalAnd %bool %94 %97
|
||||
OpBranchConditional %98 %77 %78
|
||||
%77 = OpLabel
|
||||
%99 = OpLoad %int %75
|
||||
%101 = OpAccessChain %_ptr_Uniform_v4float %89 %int_1 %99
|
||||
%102 = OpLoad %v4float %101
|
||||
%103 = OpVectorShuffle %v3float %102 %102 0 1 2
|
||||
%104 = OpLoad %mat3v3float %41
|
||||
%105 = OpLoad %v3float %12
|
||||
%106 = OpMatrixTimesVector %v3float %104 %105
|
||||
%107 = OpExtInst %v3float %1 Normalize %106
|
||||
%108 = OpLoad %int %75
|
||||
%109 = OpAccessChain %_ptr_Uniform_v4float %89 %int_0 %108
|
||||
%51 = OpVariable %_ptr_Function_v3float Function
|
||||
%56 = OpVariable %_ptr_Function_mat3v3float Function
|
||||
%84 = OpVariable %_ptr_Function_int Function
|
||||
OpStore %51 %53
|
||||
%59 = OpAccessChain %_ptr_PushConstant_v4float %41 %int_0 %int_0
|
||||
%60 = OpLoad %v4float %59
|
||||
%61 = OpVectorShuffle %v3float %60 %60 0 1 2
|
||||
%62 = OpAccessChain %_ptr_PushConstant_v4float %41 %int_0 %int_1
|
||||
%63 = OpLoad %v4float %62
|
||||
%64 = OpVectorShuffle %v3float %63 %63 0 1 2
|
||||
%66 = OpAccessChain %_ptr_PushConstant_v4float %41 %int_0 %int_2
|
||||
%67 = OpLoad %v4float %66
|
||||
%68 = OpVectorShuffle %v3float %67 %67 0 1 2
|
||||
%70 = OpCompositeExtract %float %61 0
|
||||
%71 = OpCompositeExtract %float %61 1
|
||||
%72 = OpCompositeExtract %float %61 2
|
||||
%73 = OpCompositeExtract %float %64 0
|
||||
%74 = OpCompositeExtract %float %64 1
|
||||
%75 = OpCompositeExtract %float %64 2
|
||||
%76 = OpCompositeExtract %float %68 0
|
||||
%77 = OpCompositeExtract %float %68 1
|
||||
%78 = OpCompositeExtract %float %68 2
|
||||
%79 = OpCompositeConstruct %v3float %70 %71 %72
|
||||
%80 = OpCompositeConstruct %v3float %73 %74 %75
|
||||
%81 = OpCompositeConstruct %v3float %76 %77 %78
|
||||
%82 = OpCompositeConstruct %mat3v3float %79 %80 %81
|
||||
OpStore %56 %82
|
||||
OpStore %84 %int_0
|
||||
OpBranch %85
|
||||
%85 = OpLabel
|
||||
OpLoopMerge %87 %88 None
|
||||
OpBranch %89
|
||||
%89 = OpLabel
|
||||
%90 = OpLoad %int %84
|
||||
%91 = OpBitcast %uint %90
|
||||
%99 = OpAccessChain %_ptr_Uniform_uint %97 %int_2
|
||||
%100 = OpLoad %uint %99
|
||||
%102 = OpULessThan %bool %91 %100
|
||||
%103 = OpLoad %int %84
|
||||
%105 = OpSLessThan %bool %103 %int_32
|
||||
%106 = OpLogicalAnd %bool %102 %105
|
||||
OpBranchConditional %106 %86 %87
|
||||
%86 = OpLabel
|
||||
%107 = OpLoad %int %84
|
||||
%109 = OpAccessChain %_ptr_Uniform_v4float %97 %int_1 %107
|
||||
%110 = OpLoad %v4float %109
|
||||
%111 = OpVectorShuffle %v3float %110 %110 0 1 2
|
||||
%112 = OpLoad %v4float %13
|
||||
%113 = OpVectorShuffle %v3float %112 %112 0 1 2
|
||||
%114 = OpFSub %v3float %111 %113
|
||||
%112 = OpLoad %mat3v3float %56
|
||||
%113 = OpLoad %v3float %12
|
||||
%114 = OpMatrixTimesVector %v3float %112 %113
|
||||
%115 = OpExtInst %v3float %1 Normalize %114
|
||||
%116 = OpDot %float %107 %115
|
||||
%118 = OpFMul %float %116 %float_0_5
|
||||
%119 = OpFAdd %float %118 %float_0_5
|
||||
%120 = OpVectorTimesScalar %v3float %103 %119
|
||||
%121 = OpLoad %v3float %36
|
||||
%122 = OpFAdd %v3float %121 %120
|
||||
OpStore %36 %122
|
||||
OpBranch %79
|
||||
%79 = OpLabel
|
||||
%123 = OpLoad %int %75
|
||||
%124 = OpIAdd %int %123 %int_1
|
||||
OpStore %75 %124
|
||||
OpBranch %76
|
||||
%78 = OpLabel
|
||||
%125 = OpLoad %v3float %36
|
||||
OpReturnValue %125
|
||||
%116 = OpLoad %int %84
|
||||
%117 = OpAccessChain %_ptr_Uniform_v4float %97 %int_0 %116
|
||||
%118 = OpLoad %v4float %117
|
||||
%119 = OpVectorShuffle %v3float %118 %118 0 1 2
|
||||
%120 = OpLoad %v4float %13
|
||||
%121 = OpVectorShuffle %v3float %120 %120 0 1 2
|
||||
%122 = OpFSub %v3float %119 %121
|
||||
%123 = OpExtInst %v3float %1 Normalize %122
|
||||
%124 = OpDot %float %115 %123
|
||||
%126 = OpFMul %float %124 %float_0_5
|
||||
%127 = OpFAdd %float %126 %float_0_5
|
||||
%128 = OpVectorTimesScalar %v3float %111 %127
|
||||
%129 = OpLoad %v3float %51
|
||||
%130 = OpFAdd %v3float %129 %128
|
||||
OpStore %51 %130
|
||||
OpBranch %88
|
||||
%88 = OpLabel
|
||||
%131 = OpLoad %int %84
|
||||
%132 = OpIAdd %int %131 %int_1
|
||||
OpStore %84 %132
|
||||
OpBranch %85
|
||||
%87 = OpLabel
|
||||
%133 = OpLoad %v3float %51
|
||||
OpReturnValue %133
|
||||
OpFunctionEnd
|
||||
%24 = OpFunction %v3float None %21
|
||||
%22 = OpFunctionParameter %_ptr_Function_v3float
|
||||
%23 = OpFunctionParameter %_ptr_Function_float
|
||||
%25 = OpLabel
|
||||
%133 = OpVariable %_ptr_Function_v3float Function
|
||||
%146 = OpVariable %_ptr_Function_v3float Function
|
||||
%157 = OpVariable %_ptr_Function_v3float Function
|
||||
%168 = OpVariable %_ptr_Function_v3float Function
|
||||
%172 = OpVariable %_ptr_Function_v3float Function
|
||||
%135 = OpAccessChain %_ptr_Function_float %22 %uint_0
|
||||
%136 = OpLoad %float %135
|
||||
%138 = OpFAdd %float %136 %float_9_99999975en05
|
||||
%140 = OpAccessChain %_ptr_Function_float %22 %uint_1
|
||||
%141 = OpLoad %float %140
|
||||
%143 = OpAccessChain %_ptr_Function_float %22 %uint_2
|
||||
%141 = OpVariable %_ptr_Function_v3float Function
|
||||
%154 = OpVariable %_ptr_Function_v3float Function
|
||||
%165 = OpVariable %_ptr_Function_v3float Function
|
||||
%176 = OpVariable %_ptr_Function_v3float Function
|
||||
%180 = OpVariable %_ptr_Function_v3float Function
|
||||
%143 = OpAccessChain %_ptr_Function_float %22 %uint_0
|
||||
%144 = OpLoad %float %143
|
||||
%145 = OpCompositeConstruct %v3float %138 %141 %144
|
||||
OpStore %146 %145
|
||||
%147 = OpFunctionCall %float %1000 %146
|
||||
%148 = OpAccessChain %_ptr_Function_float %133 %uint_0
|
||||
OpStore %148 %147
|
||||
%149 = OpAccessChain %_ptr_Function_float %22 %uint_0
|
||||
%150 = OpLoad %float %149
|
||||
%151 = OpAccessChain %_ptr_Function_float %22 %uint_1
|
||||
%146 = OpFAdd %float %144 %float_9_99999975en05
|
||||
%148 = OpAccessChain %_ptr_Function_float %22 %uint_1
|
||||
%149 = OpLoad %float %148
|
||||
%151 = OpAccessChain %_ptr_Function_float %22 %uint_2
|
||||
%152 = OpLoad %float %151
|
||||
%153 = OpFAdd %float %152 %float_9_99999975en05
|
||||
%154 = OpAccessChain %_ptr_Function_float %22 %uint_2
|
||||
%155 = OpLoad %float %154
|
||||
%156 = OpCompositeConstruct %v3float %150 %153 %155
|
||||
OpStore %157 %156
|
||||
%158 = OpFunctionCall %float %1000 %157
|
||||
%159 = OpAccessChain %_ptr_Function_float %133 %uint_1
|
||||
OpStore %159 %158
|
||||
%160 = OpAccessChain %_ptr_Function_float %22 %uint_0
|
||||
%161 = OpLoad %float %160
|
||||
%162 = OpAccessChain %_ptr_Function_float %22 %uint_1
|
||||
%153 = OpCompositeConstruct %v3float %146 %149 %152
|
||||
OpStore %154 %153
|
||||
%155 = OpFunctionCall %float %1000 %154
|
||||
%156 = OpAccessChain %_ptr_Function_float %141 %uint_0
|
||||
OpStore %156 %155
|
||||
%157 = OpAccessChain %_ptr_Function_float %22 %uint_0
|
||||
%158 = OpLoad %float %157
|
||||
%159 = OpAccessChain %_ptr_Function_float %22 %uint_1
|
||||
%160 = OpLoad %float %159
|
||||
%161 = OpFAdd %float %160 %float_9_99999975en05
|
||||
%162 = OpAccessChain %_ptr_Function_float %22 %uint_2
|
||||
%163 = OpLoad %float %162
|
||||
%164 = OpAccessChain %_ptr_Function_float %22 %uint_2
|
||||
%165 = OpLoad %float %164
|
||||
%166 = OpFAdd %float %165 %float_9_99999975en05
|
||||
%167 = OpCompositeConstruct %v3float %161 %163 %166
|
||||
OpStore %168 %167
|
||||
%169 = OpFunctionCall %float %1000 %168
|
||||
%170 = OpAccessChain %_ptr_Function_float %133 %uint_2
|
||||
OpStore %170 %169
|
||||
%171 = OpLoad %v3float %133
|
||||
%173 = OpLoad %v3float %22
|
||||
OpStore %172 %173
|
||||
%174 = OpFunctionCall %float %1000 %172
|
||||
%175 = OpCompositeConstruct %v3float %174 %174 %174
|
||||
%176 = OpFSub %v3float %171 %175
|
||||
%177 = OpExtInst %v3float %1 Normalize %176
|
||||
OpReturnValue %177
|
||||
%164 = OpCompositeConstruct %v3float %158 %161 %163
|
||||
OpStore %165 %164
|
||||
%166 = OpFunctionCall %float %1000 %165
|
||||
%167 = OpAccessChain %_ptr_Function_float %141 %uint_1
|
||||
OpStore %167 %166
|
||||
%168 = OpAccessChain %_ptr_Function_float %22 %uint_0
|
||||
%169 = OpLoad %float %168
|
||||
%170 = OpAccessChain %_ptr_Function_float %22 %uint_1
|
||||
%171 = OpLoad %float %170
|
||||
%172 = OpAccessChain %_ptr_Function_float %22 %uint_2
|
||||
%173 = OpLoad %float %172
|
||||
%174 = OpFAdd %float %173 %float_9_99999975en05
|
||||
%175 = OpCompositeConstruct %v3float %169 %171 %174
|
||||
OpStore %176 %175
|
||||
%177 = OpFunctionCall %float %1000 %176
|
||||
%178 = OpAccessChain %_ptr_Function_float %141 %uint_2
|
||||
OpStore %178 %177
|
||||
%179 = OpLoad %v3float %141
|
||||
%181 = OpLoad %v3float %22
|
||||
OpStore %180 %181
|
||||
%182 = OpFunctionCall %float %1000 %180
|
||||
%183 = OpCompositeConstruct %v3float %182 %182 %182
|
||||
%184 = OpFSub %v3float %179 %183
|
||||
%185 = OpExtInst %v3float %1 Normalize %184
|
||||
OpReturnValue %185
|
||||
OpFunctionEnd
|
||||
%31 = OpFunction %v2float None %27
|
||||
%28 = OpFunctionParameter %_ptr_Function_v3float
|
||||
%29 = OpFunctionParameter %_ptr_Function_v3float
|
||||
%30 = OpFunctionParameter %_ptr_Function_v3float
|
||||
%32 = OpLabel
|
||||
%181 = OpVariable %_ptr_Function_v2float Function
|
||||
%184 = OpVariable %_ptr_Function_v3float Function
|
||||
%202 = OpVariable %_ptr_Function_int Function
|
||||
%225 = OpVariable %_ptr_Function_v3float Function
|
||||
OpStore %181 %182
|
||||
%183 = OpLoad %v3float %28
|
||||
OpStore %30 %183
|
||||
%185 = OpLoad %v3float %30
|
||||
OpStore %184 %185
|
||||
%186 = OpFunctionCall %float %1000 %184
|
||||
%188 = OpFMul %float %186 %float_0_899999976
|
||||
%189 = OpAccessChain %_ptr_Function_float %181 %uint_1
|
||||
OpStore %189 %188
|
||||
%190 = OpAccessChain %_ptr_Function_float %181 %uint_1
|
||||
%191 = OpLoad %float %190
|
||||
%192 = OpAccessChain %_ptr_Function_float %181 %uint_0
|
||||
%193 = OpLoad %float %192
|
||||
%194 = OpFAdd %float %193 %191
|
||||
%195 = OpAccessChain %_ptr_Function_float %181 %uint_0
|
||||
OpStore %195 %194
|
||||
%196 = OpLoad %v3float %28
|
||||
%197 = OpLoad %v3float %29
|
||||
%198 = OpAccessChain %_ptr_Function_float %181 %uint_0
|
||||
%189 = OpVariable %_ptr_Function_v2float Function
|
||||
%192 = OpVariable %_ptr_Function_v3float Function
|
||||
%210 = OpVariable %_ptr_Function_int Function
|
||||
%233 = OpVariable %_ptr_Function_v3float Function
|
||||
OpStore %189 %190
|
||||
%191 = OpLoad %v3float %28
|
||||
OpStore %30 %191
|
||||
%193 = OpLoad %v3float %30
|
||||
OpStore %192 %193
|
||||
%194 = OpFunctionCall %float %1000 %192
|
||||
%196 = OpFMul %float %194 %float_0_899999976
|
||||
%197 = OpAccessChain %_ptr_Function_float %189 %uint_1
|
||||
OpStore %197 %196
|
||||
%198 = OpAccessChain %_ptr_Function_float %189 %uint_1
|
||||
%199 = OpLoad %float %198
|
||||
%200 = OpVectorTimesScalar %v3float %197 %199
|
||||
%201 = OpFAdd %v3float %196 %200
|
||||
OpStore %30 %201
|
||||
OpStore %202 %int_0
|
||||
OpBranch %203
|
||||
%203 = OpLabel
|
||||
OpLoopMerge %205 %206 None
|
||||
OpBranch %207
|
||||
%207 = OpLabel
|
||||
%208 = OpLoad %int %202
|
||||
%209 = OpBitcast %uint %208
|
||||
%211 = OpULessThan %bool %209 %uint_50
|
||||
OpSelectionMerge %213 None
|
||||
OpBranchConditional %211 %212 %213
|
||||
%200 = OpAccessChain %_ptr_Function_float %189 %uint_0
|
||||
%201 = OpLoad %float %200
|
||||
%202 = OpFAdd %float %201 %199
|
||||
%203 = OpAccessChain %_ptr_Function_float %189 %uint_0
|
||||
OpStore %203 %202
|
||||
%204 = OpLoad %v3float %28
|
||||
%205 = OpLoad %v3float %29
|
||||
%206 = OpAccessChain %_ptr_Function_float %189 %uint_0
|
||||
%207 = OpLoad %float %206
|
||||
%208 = OpVectorTimesScalar %v3float %205 %207
|
||||
%209 = OpFAdd %v3float %204 %208
|
||||
OpStore %30 %209
|
||||
OpStore %210 %int_0
|
||||
OpBranch %211
|
||||
%211 = OpLabel
|
||||
OpLoopMerge %213 %214 None
|
||||
OpBranch %215
|
||||
%215 = OpLabel
|
||||
%216 = OpLoad %int %210
|
||||
%217 = OpBitcast %uint %216
|
||||
%219 = OpULessThan %bool %217 %uint_50
|
||||
OpSelectionMerge %221 None
|
||||
OpBranchConditional %219 %220 %221
|
||||
%220 = OpLabel
|
||||
%222 = OpAccessChain %_ptr_Function_float %189 %uint_1
|
||||
%223 = OpLoad %float %222
|
||||
%224 = OpFOrdGreaterThan %bool %223 %float_9_99999975en05
|
||||
OpBranch %221
|
||||
%221 = OpLabel
|
||||
%225 = OpPhi %bool %219 %215 %224 %220
|
||||
OpSelectionMerge %227 None
|
||||
OpBranchConditional %225 %226 %227
|
||||
%226 = OpLabel
|
||||
%228 = OpAccessChain %_ptr_Function_float %189 %uint_0
|
||||
%229 = OpLoad %float %228
|
||||
%230 = OpLoad %float %34
|
||||
%231 = OpFOrdLessThan %bool %229 %230
|
||||
OpBranch %227
|
||||
%227 = OpLabel
|
||||
%232 = OpPhi %bool %225 %221 %231 %226
|
||||
OpBranchConditional %232 %212 %213
|
||||
%212 = OpLabel
|
||||
%214 = OpAccessChain %_ptr_Function_float %181 %uint_1
|
||||
%215 = OpLoad %float %214
|
||||
%216 = OpFOrdGreaterThan %bool %215 %float_9_99999975en05
|
||||
OpBranch %213
|
||||
%213 = OpLabel
|
||||
%217 = OpPhi %bool %211 %207 %216 %212
|
||||
OpSelectionMerge %219 None
|
||||
OpBranchConditional %217 %218 %219
|
||||
%218 = OpLabel
|
||||
%220 = OpAccessChain %_ptr_Function_float %181 %uint_0
|
||||
%221 = OpLoad %float %220
|
||||
%222 = OpLoad %float %34
|
||||
%223 = OpFOrdLessThan %bool %221 %222
|
||||
OpBranch %219
|
||||
%219 = OpLabel
|
||||
%224 = OpPhi %bool %217 %213 %223 %218
|
||||
OpBranchConditional %224 %204 %205
|
||||
%204 = OpLabel
|
||||
%226 = OpLoad %v3float %30
|
||||
OpStore %225 %226
|
||||
%227 = OpFunctionCall %float %1000 %225
|
||||
%228 = OpFMul %float %227 %float_0_899999976
|
||||
%229 = OpAccessChain %_ptr_Function_float %181 %uint_1
|
||||
OpStore %229 %228
|
||||
%230 = OpAccessChain %_ptr_Function_float %181 %uint_1
|
||||
%231 = OpLoad %float %230
|
||||
%232 = OpAccessChain %_ptr_Function_float %181 %uint_0
|
||||
%233 = OpLoad %float %232
|
||||
%234 = OpFAdd %float %233 %231
|
||||
%235 = OpAccessChain %_ptr_Function_float %181 %uint_0
|
||||
OpStore %235 %234
|
||||
%236 = OpLoad %v3float %28
|
||||
%237 = OpLoad %v3float %29
|
||||
%238 = OpAccessChain %_ptr_Function_float %181 %uint_0
|
||||
%234 = OpLoad %v3float %30
|
||||
OpStore %233 %234
|
||||
%235 = OpFunctionCall %float %1000 %233
|
||||
%236 = OpFMul %float %235 %float_0_899999976
|
||||
%237 = OpAccessChain %_ptr_Function_float %189 %uint_1
|
||||
OpStore %237 %236
|
||||
%238 = OpAccessChain %_ptr_Function_float %189 %uint_1
|
||||
%239 = OpLoad %float %238
|
||||
%240 = OpVectorTimesScalar %v3float %237 %239
|
||||
%241 = OpFAdd %v3float %236 %240
|
||||
OpStore %30 %241
|
||||
OpBranch %206
|
||||
%206 = OpLabel
|
||||
%242 = OpLoad %int %202
|
||||
%243 = OpIAdd %int %242 %int_1
|
||||
OpStore %202 %243
|
||||
OpBranch %203
|
||||
%205 = OpLabel
|
||||
%244 = OpLoad %v2float %181
|
||||
OpReturnValue %244
|
||||
%240 = OpAccessChain %_ptr_Function_float %189 %uint_0
|
||||
%241 = OpLoad %float %240
|
||||
%242 = OpFAdd %float %241 %239
|
||||
%243 = OpAccessChain %_ptr_Function_float %189 %uint_0
|
||||
OpStore %243 %242
|
||||
%244 = OpLoad %v3float %28
|
||||
%245 = OpLoad %v3float %29
|
||||
%246 = OpAccessChain %_ptr_Function_float %189 %uint_0
|
||||
%247 = OpLoad %float %246
|
||||
%248 = OpVectorTimesScalar %v3float %245 %247
|
||||
%249 = OpFAdd %v3float %244 %248
|
||||
OpStore %30 %249
|
||||
OpBranch %214
|
||||
%214 = OpLabel
|
||||
%250 = OpLoad %int %210
|
||||
%251 = OpIAdd %int %250 %int_1
|
||||
OpStore %210 %251
|
||||
OpBranch %211
|
||||
%213 = OpLabel
|
||||
%252 = OpLoad %v2float %189
|
||||
OpReturnValue %252
|
||||
OpFunctionEnd
|
||||
|
||||
; %1000 = OpFunction %float None %16
|
||||
; %17 = OpFunctionParameter %_ptr_Function_v3float
|
||||
; %19 = OpLabel
|
||||
; %128 = OpLoad %v3float %17
|
||||
; %129 = OpExtInst %float %1 Length %128
|
||||
; %130 = OpFSub %float %129 %float_1
|
||||
; OpReturnValue %130
|
||||
; OpFunctionEnd
|
||||
Reference in New Issue
Block a user