1
0
Fork 0
forked from wry/wry

vulkan: separate images and samplers

This commit is contained in:
Julian Orth 2025-03-03 19:39:47 +01:00
parent 2a5fa4cd1e
commit fdafdf9912
9 changed files with 137 additions and 83 deletions

View file

@ -4,12 +4,13 @@
#include "transfer_functions.glsl"
#include "tex.common.glsl"
layout(set = 0, binding = 0) uniform sampler2D tex;
layout(set = 0, binding = 0) uniform sampler sam;
layout(set = 1, binding = 0) uniform texture2D tex;
layout(location = 0) in vec2 tex_pos;
layout(location = 0) out vec4 out_color;
void main() {
vec4 c = textureLod(tex, tex_pos, 0);
vec4 c = textureLod(sampler2D(tex, sam), tex_pos, 0);
if (eotf != oetf) {
if (src_has_alpha) {
c.rgb /= mix(c.a, 1.0, c.a == 0.0);