Simplified text overlay example, code cleanup, better text blending
This commit is contained in:
parent
0c2720efc3
commit
3c230c7ff5
18 changed files with 119 additions and 408 deletions
|
|
@ -21,7 +21,7 @@ layout (location = 3) out vec3 outLightVec;
|
|||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
void main()
|
||||
|
|
@ -30,9 +30,9 @@ void main()
|
|||
outUV = inUV;
|
||||
gl_Position = ubo.projection * ubo.model * vec4(inPos.xyz, 1.0);
|
||||
|
||||
vec4 pos = ubo.model * vec4(inPos, 1.0);
|
||||
outNormal = mat3(transpose(inverse(ubo.model))) * normalize(inNormal);
|
||||
vec4 pos = ubo.model * vec4(inPos, 1.0);
|
||||
outNormal = mat3(transpose(inverse(ubo.model))) * normalize(inNormal);
|
||||
vec3 lPos = mat3(ubo.model) * ubo.lightPos.xyz;
|
||||
outLightVec = lPos - pos.xyz;
|
||||
outViewVec = -pos.xyz;
|
||||
outLightVec = lPos - pos.xyz;
|
||||
outViewVec = -pos.xyz;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue