mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-14 13:03:49 +08:00
feat: optimize animation
This commit is contained in:
1326
app/shaders/fragment.glsl
Normal file
1326
app/shaders/fragment.glsl
Normal file
File diff suppressed because it is too large
Load Diff
20
app/shaders/vertex.glsl
Normal file
20
app/shaders/vertex.glsl
Normal file
@@ -0,0 +1,20 @@
|
||||
#version 300 es
|
||||
|
||||
out vec4 out_position;
|
||||
out vec2 out_uv;
|
||||
|
||||
const vec4 blitFullscreenTrianglePositions[6] = vec4[](
|
||||
vec4(-1.0, -1.0, 0.0, 1.0),
|
||||
vec4(3.0, -1.0, 0.0, 1.0),
|
||||
vec4(-1.0, 3.0, 0.0, 1.0),
|
||||
vec4(-1.0, -1.0, 0.0, 1.0),
|
||||
vec4(3.0, -1.0, 0.0, 1.0),
|
||||
vec4(-1.0, 3.0, 0.0, 1.0)
|
||||
);
|
||||
|
||||
void main() {
|
||||
out_position = blitFullscreenTrianglePositions[gl_VertexID];
|
||||
out_uv = out_position.xy * 0.5 + 0.5;
|
||||
out_uv.y = 1.0 - out_uv.y;
|
||||
gl_Position = out_position;
|
||||
}
|
||||
Reference in New Issue
Block a user