-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0d379d3
commit 2baf266
Showing
15 changed files
with
448 additions
and
106 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#version 450 | ||
|
||
|
||
void main() { | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#version 450 | ||
#extension GL_EXT_buffer_reference : require | ||
|
||
struct Model | ||
{ | ||
mat4 modelMatrix; | ||
}; | ||
|
||
struct Material | ||
{ | ||
vec4 colorFactor; | ||
vec4 metalRoughFactors; | ||
ivec4 textureImageIndices; | ||
ivec4 textureSamplerIndices; | ||
vec4 alphaCutoff; | ||
}; | ||
|
||
layout (buffer_reference, std430) readonly buffer ModelData | ||
{ | ||
Model models[]; | ||
}; | ||
|
||
layout (buffer_reference, std430) readonly buffer MaterialData | ||
{ | ||
Material materials[]; | ||
}; | ||
|
||
layout (set = 0, binding = 0) uniform addresses | ||
{ | ||
MaterialData materialBufferDeviceAddress; | ||
ModelData modelBufferDeviceAddress; | ||
} bufferAddresses; | ||
|
||
|
||
layout (location = 0) in vec3 position; | ||
|
||
|
||
layout (push_constant) uniform PushConstants { | ||
mat4 viewProj; // (64) | ||
// (16) | ||
// (16) | ||
// (16) | ||
// (16) | ||
} pushConstants; | ||
|
||
void main() { | ||
mat4 model = bufferAddresses.modelBufferDeviceAddress.models[gl_InstanceIndex].modelMatrix; | ||
gl_Position = pushConstants.viewProj * model * vec4(position, 1.0f); | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.