mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 14:18:11 +08:00
Switch shader texture usage from sampler2D to texture2D plus sampler (fixes #1)
This commit is contained in:
+4
-2
@@ -16,8 +16,10 @@ layout(set=0, binding=0) uniform GuiNodeUniform {
|
||||
vec4 border_color;
|
||||
vec4 fill_color;
|
||||
};
|
||||
layout(set=0, binding=1) uniform sampler2D t_texture;
|
||||
|
||||
layout(set=0, binding=1) uniform texture2D t_texture;
|
||||
layout(set=0, binding=2) uniform sampler s_texture;
|
||||
|
||||
void main() {
|
||||
f_color = fill_color * texture(t_texture, v_uv / textureSize(t_texture, 0) * 100);
|
||||
f_color = fill_color * texture(sampler2D(t_texture, s_texture), v_uv / textureSize(sampler2D(t_texture, s_texture), 0) * 500);
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,6 +5,6 @@ layout(location=0) in vec2 a_position;
|
||||
layout(location=0) out vec2 v_uv;
|
||||
|
||||
void main() {
|
||||
v_uv = a_position;
|
||||
v_uv = (a_position + 1) / 2;
|
||||
gl_Position = vec4(a_position, 0.0, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user