I am trying to implement a DrawableTexture2D using BastiaanOlij's demo project stream (https://www.youtube.com/live/O1gwSoXTv_g), but only keeping it drawing the albedo and not the texture. The smoking gun here seems to be this section of code in draw.gdshader, specifically the highlighted line.
**vec2 screen_uv = FRAGCOORD.xy / texture_size;**
vec4 color = texture(source_texture, screen_uv);
float radius = length(UV * 2.0 - 1.0);
float alpha = 1.0 - smoothstep(0.2, 0.8, radius);
COLOR0 = vec4(color.rgb, color.a * alpha);
}```
When removing the "/ texture_size" section of the code it goes back to drawing over the entire texture, my problem is that in the tutorial it included the full line, while having it work on the full texture and also making it so it would draw in a radius and not only over the 2 pixel radius it is now.
Any idea what could be causing this problem on my project currently?
36 likes, 6 comments. "Dev stream 74 - Trying out drawable textures"