mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Stabilize Vulkan rendering state for minimap, foliage, and water
This commit is contained in:
parent
8efc1548dc
commit
bd0305f6dd
10 changed files with 834 additions and 117 deletions
|
|
@ -27,6 +27,7 @@ layout(location = 0) out vec3 FragPos;
|
|||
layout(location = 1) out vec3 Normal;
|
||||
layout(location = 2) out vec2 TexCoord;
|
||||
layout(location = 3) out float WaveOffset;
|
||||
layout(location = 4) out vec2 ScreenUV;
|
||||
|
||||
float hashGrid(vec2 p) {
|
||||
return fract(sin(dot(floor(p), vec2(127.1, 311.7))) * 43758.5453);
|
||||
|
|
@ -57,5 +58,8 @@ void main() {
|
|||
|
||||
FragPos = worldPos.xyz;
|
||||
TexCoord = aTexCoord;
|
||||
gl_Position = projection * view * worldPos;
|
||||
vec4 clipPos = projection * view * worldPos;
|
||||
gl_Position = clipPos;
|
||||
vec2 ndc = clipPos.xy / max(clipPos.w, 1e-5);
|
||||
ScreenUV = ndc * 0.5 + 0.5;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue