Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; SPIR-V
- ; Version: 1.0
- ; Generator: Khronos; 28
- ; Bound: 83
- ; Schema: 0
- OpCapability Shader
- %1 = OpExtInstImport "GLSL.std.450"
- OpMemoryModel Logical GLSL450
- OpEntryPoint Vertex %vs_main "vs_main" %in_vertex_index %position %uv
- OpEntryPoint Fragment %fs_main "fs_main" %position_0 %uv_0 %66
- OpExecutionMode %fs_main OriginUpperLeft
- OpSource GLSL 450
- OpMemberName %VertexOutput 0 "position"
- OpMemberName %VertexOutput 1 "uv"
- OpName %VertexOutput "VertexOutput"
- OpName %out "out"
- OpName %in_vertex_index "in_vertex_index"
- OpName %position "position"
- OpName %uv "uv"
- OpName %vs_main "vs_main"
- OpName %position_0 "position"
- OpName %uv_0 "uv"
- OpName %fs_main "fs_main"
- OpMemberDecorate %VertexOutput 0 Offset 0
- OpMemberDecorate %VertexOutput 1 Offset 16
- OpDecorate %in_vertex_index BuiltIn VertexIndex
- OpDecorate %position BuiltIn Position
- OpDecorate %uv Location 0
- OpDecorate %position_0 BuiltIn FragCoord
- OpDecorate %uv_0 Location 0
- OpDecorate %66 Location 0
- %void = OpTypeVoid
- %int = OpTypeInt 32 1
- %int_1 = OpConstant %int 1
- %uint = OpTypeInt 32 0
- %uint_1 = OpConstant %uint 1
- %int_2 = OpConstant %int 2
- %float = OpTypeFloat 32
- %float_0 = OpConstant %float 0
- %float_1 = OpConstant %float 1
- %float_0_5 = OpConstant %float 0.5
- %float_100 = OpConstant %float 100
- %float_999999 = OpConstant %float 999999
- %v4float = OpTypeVector %float 4
- %v2float = OpTypeVector %float 2
- %VertexOutput = OpTypeStruct %v4float %v2float
- %_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput
- %19 = OpConstantNull %VertexOutput
- %_ptr_Input_uint = OpTypePointer Input %uint
- %in_vertex_index = OpVariable %_ptr_Input_uint Input
- %_ptr_Output_v4float = OpTypePointer Output %v4float
- %position = OpVariable %_ptr_Output_v4float Output
- %_ptr_Output_v2float = OpTypePointer Output %v2float
- %uv = OpVariable %_ptr_Output_v2float Output
- %29 = OpTypeFunction %void
- %_ptr_Function_v4float = OpTypePointer Function %v4float
- %uint_0 = OpConstant %uint 0
- %_ptr_Function_v2float = OpTypePointer Function %v2float
- %_ptr_Output_float = OpTypePointer Output %float
- %_ptr_Input_v4float = OpTypePointer Input %v4float
- %position_0 = OpVariable %_ptr_Input_v4float Input
- %_ptr_Input_v2float = OpTypePointer Input %v2float
- %uv_0 = OpVariable %_ptr_Input_v2float Input
- %66 = OpVariable %_ptr_Output_v4float Output
- %v3float = OpTypeVector %float 3
- %vs_main = OpFunction %void None %29
- %20 = OpLabel
- %out = OpVariable %_ptr_Function_VertexOutput Function %19
- %23 = OpLoad %uint %in_vertex_index
- OpBranch %30
- %30 = OpLabel
- %31 = OpBitcast %int %23
- %32 = OpISub %int %31 %int_1
- %33 = OpConvertSToF %float %32
- %34 = OpBitwiseAnd %uint %23 %uint_1
- %35 = OpBitcast %int %34
- %36 = OpIMul %int %35 %int_2
- %37 = OpISub %int %36 %int_1
- %38 = OpConvertSToF %float %37
- %40 = OpCompositeConstruct %v4float %33 %38 %float_0 %float_1
- %42 = OpAccessChain %_ptr_Function_v4float %out %uint_0
- OpStore %42 %40
- %44 = OpAccessChain %_ptr_Function_v4float %out %uint_0
- %45 = OpLoad %v4float %44
- %46 = OpVectorShuffle %v2float %45 %45 0 1
- %47 = OpCompositeConstruct %v2float %float_1 %float_1
- %48 = OpFAdd %v2float %46 %47
- %49 = OpVectorTimesScalar %v2float %48 %float_0_5
- %50 = OpAccessChain %_ptr_Function_v2float %out %uint_1
- OpStore %50 %49
- %51 = OpLoad %VertexOutput %out
- %52 = OpCompositeExtract %v4float %51 0
- OpStore %position %52
- %54 = OpAccessChain %_ptr_Output_float %position %uint_1
- %55 = OpLoad %float %54
- %56 = OpFNegate %float %55
- OpStore %54 %56
- %57 = OpCompositeExtract %v2float %51 1
- OpStore %uv %57
- OpReturn
- OpFunctionEnd
- %fs_main = OpFunction %void None %29
- %58 = OpLabel
- %62 = OpLoad %v4float %position_0
- %65 = OpLoad %v2float %uv_0
- %59 = OpCompositeConstruct %VertexOutput %62 %65
- OpBranch %68
- %68 = OpLabel
- %69 = OpCompositeExtract %v2float %59 1
- %70 = OpCompositeExtract %float %69 0
- %71 = OpFMul %float %70 %float_100
- %72 = OpFAdd %float %71 %float_1
- %73 = OpExtInst %float %1 Floor %72
- %74 = OpFMul %float %73 %float_999999
- %75 = OpExtInst %float %1 Floor %71
- %76 = OpFAdd %float %75 %float_1
- %77 = OpFMul %float %76 %float_999999
- %78 = OpFSub %float %77 %74
- %81 = OpCompositeConstruct %v3float %78 %78 %78
- %82 = OpCompositeConstruct %v4float %81 %float_0
- OpStore %66 %82
- OpReturn
- OpFunctionEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement