Add Vulkan sphere integration support
This commit is contained in:
11
tests/RHI/integration/sphere/Res/Shader/sphere_vulkan.frag
Normal file
11
tests/RHI/integration/sphere/Res/Shader/sphere_vulkan.frag
Normal file
@@ -0,0 +1,11 @@
|
||||
#version 450
|
||||
|
||||
layout(set = 2, binding = 0) uniform texture2D uTexture;
|
||||
layout(set = 3, binding = 0) uniform sampler uSampler;
|
||||
|
||||
layout(location = 0) in vec2 vTexCoord;
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
|
||||
void main() {
|
||||
fragColor = texture(sampler2D(uTexture, uSampler), vTexCoord);
|
||||
}
|
||||
19
tests/RHI/integration/sphere/Res/Shader/sphere_vulkan.vert
Normal file
19
tests/RHI/integration/sphere/Res/Shader/sphere_vulkan.vert
Normal file
@@ -0,0 +1,19 @@
|
||||
#version 450
|
||||
|
||||
layout(location = 0) in vec4 aPosition;
|
||||
layout(location = 1) in vec2 aTexCoord;
|
||||
|
||||
layout(set = 1, binding = 0, std140) uniform MatrixBuffer {
|
||||
mat4 gProjectionMatrix;
|
||||
mat4 gViewMatrix;
|
||||
mat4 gModelMatrix;
|
||||
};
|
||||
|
||||
layout(location = 0) out vec2 vTexCoord;
|
||||
|
||||
void main() {
|
||||
vec4 positionWS = gModelMatrix * aPosition;
|
||||
vec4 positionVS = gViewMatrix * positionWS;
|
||||
gl_Position = gProjectionMatrix * positionVS;
|
||||
vTexCoord = aTexCoord;
|
||||
}
|
||||
Reference in New Issue
Block a user