mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-04 16:23:52 +00:00
Vulcan Nightmare
Experimentally bringing up vulcan support
This commit is contained in:
parent
863a786c48
commit
83b576e8d9
189 changed files with 12147 additions and 7820 deletions
20
assets/shaders/postprocess.frag.glsl
Normal file
20
assets/shaders/postprocess.frag.glsl
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#version 450
|
||||
|
||||
layout(set = 0, binding = 0) uniform sampler2D uScene;
|
||||
|
||||
layout(location = 0) in vec2 TexCoord;
|
||||
|
||||
layout(location = 0) out vec4 outColor;
|
||||
|
||||
void main() {
|
||||
vec3 hdr = texture(uScene, TexCoord).rgb;
|
||||
// Shoulder tone map
|
||||
vec3 mapped = hdr;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (mapped[i] > 0.9) {
|
||||
float excess = mapped[i] - 0.9;
|
||||
mapped[i] = 0.9 + 0.1 * excess / (excess + 0.1);
|
||||
}
|
||||
}
|
||||
outColor = vec4(mapped, 1.0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue