mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 07:28:14 +00:00
added the game
This commit is contained in:
18
Scenes/Parts/DitheredTransparency.gdshader
Normal file
18
Scenes/Parts/DitheredTransparency.gdshader
Normal file
@@ -0,0 +1,18 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
void fragment() {
|
||||
vec4 tex_color = texture(TEXTURE, UV);
|
||||
vec4 color = tex_color;
|
||||
|
||||
// Get pixel coordinate in texture space
|
||||
vec2 tex_size = vec2(textureSize(TEXTURE, 0)); // Godot 4
|
||||
ivec2 coord = ivec2(floor(UV * tex_size));
|
||||
|
||||
// Simple checker pattern based on texture pixel positions
|
||||
bool checker = (coord.x + coord.y) % 2 == 0;
|
||||
|
||||
if (checker)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user