mirror of
https://github.com/opus-tango/IntroductionToVulkan.git
synced 2026-03-20 12:05:20 +00:00
Added license.txt file.
Added Project folder with source code examples Part 1, Part 2, Part 3 and Part 4.
This commit is contained in:
BIN
Project/Tutorial03/Data03/frag.spv
Normal file
BIN
Project/Tutorial03/Data03/frag.spv
Normal file
Binary file not shown.
35
Project/Tutorial03/Data03/frag.spv.txt
Normal file
35
Project/Tutorial03/Data03/frag.spv.txt
Normal file
@@ -0,0 +1,35 @@
|
||||
shader.frag
|
||||
Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 14
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 9
|
||||
ExecutionMode 4 OriginLowerLeft
|
||||
Source GLSL 400
|
||||
Name 4 "main"
|
||||
Name 9 "out_Color"
|
||||
Decorate 9(out_Color) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypePointer Output 7(fvec4)
|
||||
9(out_Color): 8(ptr) Variable Output
|
||||
10: 6(float) Constant 0
|
||||
11: 6(float) Constant 1053609165
|
||||
12: 6(float) Constant 1065353216
|
||||
13: 7(fvec4) ConstantComposite 10 11 12 12
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
Store 9(out_Color) 13
|
||||
Return
|
||||
FunctionEnd
|
||||
17
Project/Tutorial03/Data03/shader.frag
Normal file
17
Project/Tutorial03/Data03/shader.frag
Normal file
@@ -0,0 +1,17 @@
|
||||
// Copyright 2016 Intel Corporation All Rights Reserved
|
||||
//
|
||||
// Intel makes no representations about the suitability of this software for any purpose.
|
||||
// THIS SOFTWARE IS PROVIDED ""AS IS."" INTEL SPECIFICALLY DISCLAIMS ALL WARRANTIES,
|
||||
// EXPRESS OR IMPLIED, AND ALL LIABILITY, INCLUDING CONSEQUENTIAL AND OTHER INDIRECT DAMAGES,
|
||||
// FOR THE USE OF THIS SOFTWARE, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PROPRIETARY
|
||||
// RIGHTS, AND INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// Intel does not assume any responsibility for any errors which may appear in this software
|
||||
// nor any responsibility to update it.
|
||||
|
||||
#version 400
|
||||
|
||||
layout(location = 0) out vec4 out_Color;
|
||||
|
||||
void main() {
|
||||
out_Color = vec4( 0.0, 0.4, 1.0, 1.0 );
|
||||
}
|
||||
16
Project/Tutorial03/Data03/shader.vert
Normal file
16
Project/Tutorial03/Data03/shader.vert
Normal file
@@ -0,0 +1,16 @@
|
||||
// Copyright 2016 Intel Corporation All Rights Reserved
|
||||
//
|
||||
// Intel makes no representations about the suitability of this software for any purpose.
|
||||
// THIS SOFTWARE IS PROVIDED ""AS IS."" INTEL SPECIFICALLY DISCLAIMS ALL WARRANTIES,
|
||||
// EXPRESS OR IMPLIED, AND ALL LIABILITY, INCLUDING CONSEQUENTIAL AND OTHER INDIRECT DAMAGES,
|
||||
// FOR THE USE OF THIS SOFTWARE, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PROPRIETARY
|
||||
// RIGHTS, AND INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// Intel does not assume any responsibility for any errors which may appear in this software
|
||||
// nor any responsibility to update it.
|
||||
|
||||
#version 400
|
||||
|
||||
void main() {
|
||||
vec2 pos[3] = vec2[3]( vec2(-0.7, 0.7), vec2(0.7, 0.7), vec2(0.0, -0.7) );
|
||||
gl_Position = vec4( pos[gl_VertexIndex], 0.0, 1.0 );
|
||||
}
|
||||
BIN
Project/Tutorial03/Data03/vert.spv
Normal file
BIN
Project/Tutorial03/Data03/vert.spv
Normal file
Binary file not shown.
72
Project/Tutorial03/Data03/vert.spv.txt
Normal file
72
Project/Tutorial03/Data03/vert.spv.txt
Normal file
@@ -0,0 +1,72 @@
|
||||
shader.vert
|
||||
Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 40
|
||||
|
||||
Capability Shader
|
||||
Capability ClipDistance
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main" 25 29
|
||||
Source GLSL 400
|
||||
Name 4 "main"
|
||||
Name 12 "pos"
|
||||
Name 23 "gl_PerVertex"
|
||||
MemberName 23(gl_PerVertex) 0 "gl_Position"
|
||||
MemberName 23(gl_PerVertex) 1 "gl_PointSize"
|
||||
MemberName 23(gl_PerVertex) 2 "gl_ClipDistance"
|
||||
Name 25 ""
|
||||
Name 29 "gl_VertexIndex"
|
||||
MemberDecorate 23(gl_PerVertex) 0 BuiltIn Position
|
||||
MemberDecorate 23(gl_PerVertex) 1 BuiltIn PointSize
|
||||
MemberDecorate 23(gl_PerVertex) 2 BuiltIn ClipDistance
|
||||
Decorate 23(gl_PerVertex) Block
|
||||
Decorate 29(gl_VertexIndex) BuiltIn VertexIndex
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 2
|
||||
8: TypeInt 32 0
|
||||
9: 8(int) Constant 3
|
||||
10: TypeArray 7(fvec2) 9
|
||||
11: TypePointer Function 10
|
||||
13: 6(float) Constant 3207803699
|
||||
14: 6(float) Constant 1060320051
|
||||
15: 7(fvec2) ConstantComposite 13 14
|
||||
16: 7(fvec2) ConstantComposite 14 14
|
||||
17: 6(float) Constant 0
|
||||
18: 7(fvec2) ConstantComposite 17 13
|
||||
19: 10 ConstantComposite 15 16 18
|
||||
20: TypeVector 6(float) 4
|
||||
21: 8(int) Constant 1
|
||||
22: TypeArray 6(float) 21
|
||||
23(gl_PerVertex): TypeStruct 20(fvec4) 6(float) 22
|
||||
24: TypePointer Output 23(gl_PerVertex)
|
||||
25: 24(ptr) Variable Output
|
||||
26: TypeInt 32 1
|
||||
27: 26(int) Constant 0
|
||||
28: TypePointer Input 26(int)
|
||||
29(gl_VertexIndex): 28(ptr) Variable Input
|
||||
31: TypePointer Function 7(fvec2)
|
||||
34: 6(float) Constant 1065353216
|
||||
38: TypePointer Output 20(fvec4)
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
12(pos): 11(ptr) Variable Function
|
||||
Store 12(pos) 19
|
||||
30: 26(int) Load 29(gl_VertexIndex)
|
||||
32: 31(ptr) AccessChain 12(pos) 30
|
||||
33: 7(fvec2) Load 32
|
||||
35: 6(float) CompositeExtract 33 0
|
||||
36: 6(float) CompositeExtract 33 1
|
||||
37: 20(fvec4) CompositeConstruct 35 36 17 34
|
||||
39: 38(ptr) AccessChain 25 27
|
||||
Store 39 37
|
||||
Return
|
||||
FunctionEnd
|
||||
Reference in New Issue
Block a user