Created
August 16, 2020 04:21
-
-
Save lachlansneff/14fb496e0184f8d5faa8227a6dec3c54 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 450 | |
layout(location = 0) in vec4 Vertex_Position; | |
layout(location = 1) in uvec4 Vertex_Normal; | |
layout(location = 2) in uvec4 I_TestInstancing_Property; | |
layout(location = 0) out vec4 v_Position; | |
layout(set = 0, binding = 0) uniform Camera { | |
mat4 ViewProj; | |
}; | |
layout(set = 1, binding = 0) uniform texture2D Texture; | |
void main() { | |
v_Position = Vertex_Position; | |
gl_Position = ViewProj * v_Position; | |
} | |
Module { | |
header: Header { | |
version: ( | |
1, | |
0, | |
0, | |
), | |
generator: 0, | |
}, | |
types: Arena { | |
data: [ | |
Type { | |
name: None, | |
inner: Vector { | |
size: Quad, | |
kind: Float, | |
width: 4, | |
}, | |
}, | |
Type { | |
name: None, | |
inner: Vector { | |
size: Quad, | |
kind: Uint, | |
width: 4, | |
}, | |
}, | |
Type { | |
name: None, | |
inner: Matrix { | |
columns: Quad, | |
rows: Quad, | |
kind: Float, | |
width: 4, | |
}, | |
}, | |
Type { | |
name: Some( | |
"Camera", | |
), | |
inner: Struct { | |
members: [ | |
StructMember { | |
name: Some( | |
"ViewProj", | |
), | |
origin: Offset( | |
0, | |
), | |
ty: Handle(3), | |
}, | |
], | |
}, | |
}, | |
Type { | |
name: None, | |
inner: Scalar { | |
kind: Float, | |
width: 4, | |
}, | |
}, | |
Type { | |
name: None, | |
inner: Image { | |
base: Handle(5), | |
dim: D2, | |
flags: SAMPLED, | |
}, | |
}, | |
], | |
}, | |
constants: Arena { | |
data: [], | |
}, | |
global_variables: Arena { | |
data: [ | |
GlobalVariable { | |
name: Some( | |
"Vertex_Position", | |
), | |
class: Input, | |
binding: Some( | |
Location( | |
0, | |
), | |
), | |
ty: Handle(1), | |
}, | |
GlobalVariable { | |
name: Some( | |
"Vertex_Normal", | |
), | |
class: Input, | |
binding: Some( | |
Location( | |
1, | |
), | |
), | |
ty: Handle(2), | |
}, | |
GlobalVariable { | |
name: Some( | |
"I_TestInstancing_Property", | |
), | |
class: Input, | |
binding: Some( | |
Location( | |
2, | |
), | |
), | |
ty: Handle(2), | |
}, | |
GlobalVariable { | |
name: Some( | |
"v_Position", | |
), | |
class: Output, | |
binding: Some( | |
Location( | |
0, | |
), | |
), | |
ty: Handle(1), | |
}, | |
GlobalVariable { | |
name: None, | |
class: Uniform, | |
binding: Some( | |
Descriptor { | |
set: 0, | |
binding: 0, | |
}, | |
), | |
ty: Handle(4), | |
}, | |
GlobalVariable { | |
name: Some( | |
"Texture", | |
), | |
class: Uniform, | |
binding: Some( | |
Descriptor { | |
set: 1, | |
binding: 0, | |
}, | |
), | |
ty: Handle(6), | |
}, | |
GlobalVariable { | |
name: Some( | |
"gl_Position", | |
), | |
class: Output, | |
binding: Some( | |
BuiltIn( | |
Position, | |
), | |
), | |
ty: Handle(1), | |
}, | |
], | |
}, | |
functions: Arena { | |
data: [ | |
Function { | |
name: Some( | |
"main", | |
), | |
parameter_types: [], | |
return_type: None, | |
global_usage: [], | |
local_variables: Arena { | |
data: [], | |
}, | |
expressions: Arena { | |
data: [ | |
GlobalVariable( | |
Handle(4), | |
), | |
GlobalVariable( | |
Handle(1), | |
), | |
GlobalVariable( | |
Handle(7), | |
), | |
GlobalVariable( | |
Handle(5), | |
), | |
AccessIndex { | |
base: Handle(4), | |
index: 0, | |
}, | |
GlobalVariable( | |
Handle(4), | |
), | |
Binary { | |
op: Multiply, | |
left: Handle(5), | |
right: Handle(6), | |
}, | |
], | |
}, | |
body: [ | |
Store { | |
pointer: Handle(1), | |
value: Handle(2), | |
}, | |
Store { | |
pointer: Handle(3), | |
value: Handle(7), | |
}, | |
], | |
}, | |
], | |
}, | |
entry_points: [ | |
EntryPoint { | |
stage: Vertex, | |
name: "main", | |
function: Handle(1), | |
}, | |
], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment