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
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#version 450
|
||||
|
||||
// Bloom 高斯模糊:可分离 9-tap,方向由 push 给出(H/V 各跑一次)。
|
||||
// 源图为半分辨率,线性采样 + 权重对应的偏移天然抗锯齿。
|
||||
|
||||
layout(location = 0) in vec2 fragUV;
|
||||
layout(location = 0) out vec4 outColor;
|
||||
|
||||
layout(set = 0, binding = 0) uniform sampler2D srcImage;
|
||||
|
||||
layout(push_constant) uniform PushConstants {
|
||||
float exposure; // 未用(程序级统一布局)
|
||||
float stepX; // param0: UV 步长 x(水平 pass = 1/width,垂直 = 0)
|
||||
float stepY; // param1: UV 步长 y
|
||||
float _pad0;
|
||||
} pc;
|
||||
|
||||
const float weights[5] = float[](0.227027, 0.1945946, 0.1216216, 0.054054, 0.016216);
|
||||
|
||||
void main() {
|
||||
vec2 off = vec2(pc.stepX, pc.stepY);
|
||||
|
||||
vec3 c = texture(srcImage, fragUV).rgb * weights[0];
|
||||
for (int i = 1; i < 5; ++i) {
|
||||
c += texture(srcImage, fragUV + off * float(i)).rgb * weights[i];
|
||||
c += texture(srcImage, fragUV - off * float(i)).rgb * weights[i];
|
||||
}
|
||||
outColor = vec4(c, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user