0 votes

I need to apply this shader: (https://godotshaders.com/shader/2d-wind-sway/) to sprite3d

Godot version 3.5
in Engine by (20 points)

1 Answer

+1 vote
Best answer

You can use a Sprite3D too but MeshInstance is better

  1. Create MeshInstance
  2. Set Mesh to Quad mesh
  3. Set New ShaderMaterial
  4. Attach Shader

in the shader

  • change shader_type canvas_item; to shader_type spatial;
  • change render_mode blend_mix; to render_mode blend_mix, unshaded;
  • add uniform sampler2D albedo_texture : hint_albedo;
  • add the following function

.

void fragment() {
    vec4 result = texture(albedo_texture, UV);
    ALBEDO = result.rgb;
    ALPHA = result.a;
}
  • set albedo_texture
by (6,932 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.