Browse Source

Improve visual appearance in the 2D Sprite Shaders demo

- Scale the sprites up so they take a larger portion of the window.
- Enable mipmaps on the sprite to avoid artifacts at low resolutions.
Hugo Locurcio 3 years ago
parent
commit
d7c7e4ede3

+ 1 - 1
2d/sprite_shaders/godotea.png.import

@@ -21,7 +21,7 @@ compress/bptc_ldr=0
 compress/normal_map=0
 compress/normal_map=0
 flags/repeat=0
 flags/repeat=0
 flags/filter=true
 flags/filter=true
-flags/mipmaps=false
+flags/mipmaps=true
 flags/anisotropic=false
 flags/anisotropic=false
 flags/srgb=2
 flags/srgb=2
 process/fix_alpha_border=true
 process/fix_alpha_border=true

BIN
2d/sprite_shaders/screenshots/sprite.png


+ 21 - 17
2d/sprite_shaders/sprite_shaders.tscn

@@ -61,64 +61,68 @@ shader_param/amount = 4.0
 
 
 [node name="SpriteShaders" type="Node2D"]
 [node name="SpriteShaders" type="Node2D"]
 material = SubResource( 1 )
 material = SubResource( 1 )
-position = Vector2( 263.737, 179.444 )
-scale = Vector2( 0.3, 0.3 )
+position = Vector2( 512, 300 )
 
 
 [node name="Normal" type="Sprite" parent="."]
 [node name="Normal" type="Sprite" parent="."]
 material = SubResource( 2 )
 material = SubResource( 2 )
-position = Vector2( -2.16144, 0 )
+position = Vector2( -300, -150 )
+scale = Vector2( 0.375, 0.375 )
 texture = ExtResource( 2 )
 texture = ExtResource( 2 )
 
 
 [node name="Outline" type="Sprite" parent="."]
 [node name="Outline" type="Sprite" parent="."]
 material = SubResource( 3 )
 material = SubResource( 3 )
-position = Vector2( 400, 0 )
+position = Vector2( -150, -150 )
+scale = Vector2( 0.375, 0.375 )
 texture = ExtResource( 2 )
 texture = ExtResource( 2 )
 
 
 [node name="Aura" type="Sprite" parent="."]
 [node name="Aura" type="Sprite" parent="."]
 material = SubResource( 4 )
 material = SubResource( 4 )
-position = Vector2( 800, 0 )
+position = Vector2( 0, -150 )
+scale = Vector2( 0.375, 0.375 )
 texture = ExtResource( 2 )
 texture = ExtResource( 2 )
 
 
 [node name="Blur" type="Sprite" parent="."]
 [node name="Blur" type="Sprite" parent="."]
 material = SubResource( 5 )
 material = SubResource( 5 )
-position = Vector2( 1200, 0 )
+position = Vector2( 150, -150 )
+scale = Vector2( 0.375, 0.375 )
 texture = ExtResource( 2 )
 texture = ExtResource( 2 )
 
 
 [node name="Fatty" type="Sprite" parent="."]
 [node name="Fatty" type="Sprite" parent="."]
 material = SubResource( 6 )
 material = SubResource( 6 )
-position = Vector2( 1600, 0 )
+position = Vector2( 300, -150 )
+scale = Vector2( 0.375, 0.375 )
 texture = ExtResource( 2 )
 texture = ExtResource( 2 )
 
 
 [node name="DropShadow" type="Sprite" parent="."]
 [node name="DropShadow" type="Sprite" parent="."]
 material = SubResource( 7 )
 material = SubResource( 7 )
-position = Vector2( 0, 800 )
+position = Vector2( -300, 150 )
+scale = Vector2( 0.375, 0.375 )
 texture = ExtResource( 2 )
 texture = ExtResource( 2 )
 
 
 [node name="OffsetShadow" type="Sprite" parent="."]
 [node name="OffsetShadow" type="Sprite" parent="."]
 material = SubResource( 8 )
 material = SubResource( 8 )
-position = Vector2( 400, 800 )
+position = Vector2( -150, 150 )
+scale = Vector2( 0.375, 0.375 )
 texture = ExtResource( 2 )
 texture = ExtResource( 2 )
 
 
 [node name="Silouette" type="Sprite" parent="."]
 [node name="Silouette" type="Sprite" parent="."]
 material = SubResource( 9 )
 material = SubResource( 9 )
-position = Vector2( 800, 800 )
+position = Vector2( 0, 150 )
+scale = Vector2( 0.375, 0.375 )
 texture = ExtResource( 2 )
 texture = ExtResource( 2 )
 
 
 [node name="Glow" type="Sprite" parent="."]
 [node name="Glow" type="Sprite" parent="."]
 material = SubResource( 10 )
 material = SubResource( 10 )
-position = Vector2( 1200, 800 )
+position = Vector2( 150, 150 )
+scale = Vector2( 0.375, 0.375 )
 texture = ExtResource( 2 )
 texture = ExtResource( 2 )
 
 
 [node name="Disintegrate" type="Sprite" parent="."]
 [node name="Disintegrate" type="Sprite" parent="."]
 material = SubResource( 11 )
 material = SubResource( 11 )
-position = Vector2( 1600, 800 )
+position = Vector2( 300, 150 )
+scale = Vector2( 0.375, 0.375 )
 texture = ExtResource( 2 )
 texture = ExtResource( 2 )
 region_rect = Rect2( 141, 115, 39, 6 )
 region_rect = Rect2( 141, 115, 39, 6 )
 
 
 [node name="Camera2D" type="Camera2D" parent="."]
 [node name="Camera2D" type="Camera2D" parent="."]
-offset = Vector2( 248, 120 )
 current = true
 current = true
-drag_margin_left = 0.0
-drag_margin_top = 0.0
-drag_margin_right = 0.0
-drag_margin_bottom = 0.0