Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Shaders/VertexShader.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ layout(location = 1) out flat vec3 o_Normal;
layout(location = 2) out flat vec3 o_Color;
void main() {
gl_Position = modelViewProj * a_Positions;
#ifdef VULKAN
int face = gl_VertexIndex / 6;
#else
int face = gl_VertexID / 6;
#endif
o_TexCoord = uvec2(face, 0);
o_Normal = (model * normals[face]).xyz;
o_Color = color.rgb;
Expand Down