Files
atdunbg f73e52926f Reorganize directory layout: editor panels/, grouped shaders, drop stale header
- App/editor: move 7 panels into panels/ (Editor core stays at root)
- shaders/: group into pbr/ post/ debug/ env/ (runtime load paths updated)
- Delete outdated duplicate Engine/src/Renderer/VulkanAssetUploader.h
2026-10-07 09:52:17 +08:00

24 lines
693 B
GLSL
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#version 450
// 全屏三角形:无顶点缓冲,从 gl_VertexIndex 派生 UV。
// 0 → (-1,3)? 经典三角覆盖整个屏幕:
// idx0:(-1,-1) idx1:(3,-1) idx2:(-1,3),UV 相应 [0..2],
// 光栅化插值后屏幕内 UV 恰好落在 [0,1]。
layout(location = 0) out vec2 fragUV;
// 全屏 pass 通用 push(16B,与 tonemap.frag 及所有全屏 pass 一致,VUID-08878)
layout(push_constant) uniform PushConstants {
float exposure;
float aces;
float _pad0;
float _pad1;
} pc;
void main() {
vec2 p = vec2(
float((gl_VertexIndex << 1) & 2),
float(gl_VertexIndex & 2));
fragUV = p;
gl_Position = vec4(p * 2.0 - 1.0, 0.0, 1.0);
}