Questions tagged [godot-shader-language]
34 questions
0
votes
1 answer
How to move an object through the scene tree in Godot?
I created an Area2D node and created an AnimatedSprite node in it.
I select a random sprite and create it with the Add_child function, I scroll with the script, but the scrollable background appears in the foreground and closes the "player"
tried to…

SY DIE
- 1
0
votes
0 answers
how do i fade out a texture in Godot shader?
Hello I was wondoring how can I fade out the edges of the rainbow shine
to create somewhat of a card foil effect
Using Godot 4.1 stable .
This is what I've done . . .
(I combined Two Shaders I found online , I'm new to shaders).
Using a panel as the…

ilies
- 15
- 7
0
votes
1 answer
light_mode shadow_only material in godot 4 for 2D light
I want to make a 2D object that becomes transparent when light hits it. This is completely opposite to the light_only light mode. To be honest light_only doesn't work in Godot 4.0, it's fixed in 4.1
In Godot 3 I would use shader with AT_LIGHT_PASS.…

Michael Strike
- 11
- 1
0
votes
0 answers
Godot particle shader - rotation on global axis instead of local axis?
I'm wondering how I can do a rotation on a global axis rather than the particle's local axis in a particle shader.
Here are my rotate y and x functions:
mat4 rotate_y(float theta) {
return mat4(vec4(cos(theta), 0, -sin(theta), 0), vec4(0, 1, 0,…

Makazau
- 615
- 7
- 17
0
votes
1 answer
Godot Particle Shader CUSTOM - storing more than 4 pieces of data?
I'm wondering if there is any way I can store more than 4 pieces of custom data between frames of a particle shader. In my shader, each particle is given a random xyz position and xyz rotation. I want these to be remembered because I want to…

Makazau
- 615
- 7
- 17
0
votes
0 answers
How To Create A Directional Shield Impact Shader?
This is an image of the shield's shader that I want to recreate in my project.
As you can see, the impact shader doesn't works by lighting up an entire shield when it gets hit by the bullet. Because the impact area effect is limited, so only a…

Jellyfish
- 57
- 6
0
votes
0 answers
How to get light to pass through my shader
I have a plane that has a shader material attached to it to generate perlin noise. I'd like for my light to pass through it so that it can cast shadows on the stuff below.
Here is my shader:
shader_type spatial;
uniform float scale:…

mic
- 4,300
- 1
- 19
- 25
0
votes
1 answer
Godot 2D Outline shader is duplicating edge pixels (bleeding pixels)
I have this original png file:
And I am applying this shader from the GDQuest shader tutorial in the Sprite Node:
https://github.com/GDQuest/godot-shaders/blob/master/godot/Shaders/outline2D_outer.shader
As the png is cut at the edge of the image…

fguillen
- 36,125
- 23
- 149
- 210
0
votes
0 answers
Hollow radial gradient shader with speedlines
I'm trying to create a shader which Ideally produces this:
And so far I've come up with this shader:
shader_type canvas_item;
uniform vec4 main_color : hint_color = vec4(1.0);
uniform float outter_radius : hint_range(0.0, 1.0) = 1.0;
uniform float…

cak3_lover
- 1,440
- 5
- 26
0
votes
1 answer
cropping and expanding using shader?
I'm trying to create a shader which can crop or expand a texture (along the x axis)
so far this is what I've come up with on the cropping part:
shader_type canvas_item;
uniform float start_x:hint_range(0.0, 1.0, 0.001) = 0.0;
uniform float…

cak3_lover
- 1,440
- 5
- 26
0
votes
0 answers
How can I hide part of a Sprite2D which is out of TileMap's tiles? Godot 4 beta 16
I am making a blood traces, but sometimes traces can spawn in the way like this, so I have a part of my trace which is out of wall.enter image description here
So how can I cut out or hide this part?
I tried to do that with enter image description…
0
votes
1 answer
Clipping outside texture shader
I'm trying to create a shader which decides the silhouette of the sprite by giving a texture (sampler2D) as input in shader parameter and clips anything outside it's bound
And so far this is what I've been able to come up with:
shader_type…

cak3_lover
- 1,440
- 5
- 26
0
votes
0 answers
Place sprites at certain positions using a shader
What I achieved:
I created a shader (based on this code with this plant asset) that takes a black and white reference image (like a height map) and places plants on a grid determined by the darkness/lightness-value of the respective pixel.
Where I…

st_phan
- 715
- 9
- 23
0
votes
0 answers
Hide files tab in Shader editor Godot 4
Is there a way to hide the "files" tab in the visual shader editor in godot 4?

Tom Dorone
- 1,575
- 2
- 9
- 7
0
votes
1 answer
How to combine world environment post processing with custom post processing shader in a 3D world, Godot 4.0
I am trying to use the in-built post processing effects attached to a Camera3D while also applying a custom post processing effect to run in combination with the other effects.
I have read tutorials on how to create custom post processing effects,…

Henrik Söderlund
- 1
- 2