mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 04:08:32 +09:00
[Fix] (MG_Impl/EGL/EGLForVulkan): use GL semantics for demo shader
This commit is contained in:
@@ -17,9 +17,10 @@ namespace MobileGL {
|
||||
// TODO: complete EGL impl for Vulkan
|
||||
|
||||
const char* demoFS = R"(#version 460
|
||||
layout(location = 0) in vec3 fragColor;
|
||||
layout(location = 0) out vec4 outColor;
|
||||
void main() {
|
||||
outColor = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
outColor = vec4(fragColor, 1.0);
|
||||
}
|
||||
)";
|
||||
const char* demoVS = R"(#version 460
|
||||
@@ -27,8 +28,8 @@ namespace MobileGL {
|
||||
vec2 positions[3] = vec2[](vec2(0.0, -0.5), vec2(0.5, 0.5), vec2(-0.5, 0.5));
|
||||
vec3 colors[3] = vec3[](vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0), vec3(0.0, 0.0, 1.0));
|
||||
void main() {
|
||||
gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0);
|
||||
fragColor = colors[gl_VertexIndex];
|
||||
gl_Position = vec4(positions[gl_VertexID], 0.0, 1.0);
|
||||
fragColor = colors[gl_VertexID];
|
||||
}
|
||||
)";
|
||||
void PrepareDemoRes() {
|
||||
|
||||
Reference in New Issue
Block a user