Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
78 views

I’m having a problem in Godot 4 with calling the start_shake function in my screen shake system. In the scene 1_level.tscn, I have SceneRoot with a child node Map, which is an instance of Map.tscn. I ...
Zuza_n's user avatar
  • 11
0 votes
0 answers
34 views

I am writing a Godot shader that outlines edges based on normal buffer and depth buffer. Here's how it looks like: Here's how it should look: Here's the code: } else { float central_depth = ...
Sasha Net Official's user avatar
0 votes
1 answer
267 views

Im learning shaders in Godot, and I need to read the value of a variable from a shader. I currently have a similar setup to the following: shader_type canvas_item; varying float value; void fragment(...
lemmgua's user avatar
  • 47
0 votes
0 answers
59 views

I've been trying to follow the shader made in this youtube video: https://youtu.be/4dfADUfyKTA?si=82ABjYR1zPsPueSr However the shader was created with Godot 4.2 and I am working with 4.3 which as I ...
Grantlbart's user avatar
0 votes
0 answers
60 views

I am trying to accomplish what is discussed in this video (timestamp is at the part of interest) Essentially, I have a mesh (a billboarded quadmesh with a texture) that may be fully lit, fully shaded ...
Matthew Goulart's user avatar
0 votes
0 answers
358 views

I'm trying to build a shader that will perform some post processing based on some entities that exist in the world space... I went through some theory and tried to apply the knowledge I gathered but ...
shade of blue's user avatar
1 vote
0 answers
49 views

From my understanding, in a Godot Canvas Item Shader (fragment): COLOR contains the current pixel color of the Canvas Item (for example white if on a white text) TEXTURE contains the texture if there ...
Lahzey's user avatar
  • 413
0 votes
0 answers
178 views

I am trying to play the animation once the enemy enters the area 2d of my player. For some reason the queue free is activated and is not showing the dead animation. Any ideas? func ...
Maximo Nova's user avatar
1 vote
2 answers
262 views

I want to have a slider that the player uses to change how a shader affects the color of a sprite. Here is the shader: shader_type canvas_item; uniform vec4 color : source_color; void fragment(){ ...
StinkyGuyJeff's user avatar
0 votes
1 answer
253 views

Inconsistent Results for Grass Shader Sampling Ground Texture Between Different Renderers I'm currently developing a Grass Shader that samples the ground texture in Godot 4. However, I've encountered ...
ilies's user avatar
  • 85
0 votes
1 answer
483 views

Godot 4.2 I have a shader that changes the hue of an AnimatedSprite2D. Here is the shader: shader_type canvas_item; uniform vec4 color : source_color; void fragment(){ vec4 pixelColor = texture(...
StinkyGuyJeff's user avatar
2 votes
1 answer
147 views

I am trying to understand spatial shaders in Godot and have a simple vertex shader: shader_type spatial; void vertex(){ VERTEX.y -= VERTEX.x; } I applied it to a sphere with this result: So it ...
Another_coder's user avatar
0 votes
1 answer
105 views

I have a Godot CanvasItem shader that is assigned to the material of a specific tile in a TileMap. In the shader, I need to know the position of a light relative to the bottom of the tile. I am ...
Antoine Aubry's user avatar
0 votes
1 answer
769 views

I am working on a 2 player cooperative game. Both of them are on a ship together. One of them is the pilot and another shoots a turret on the ship. The problem is that I would like to make the ship ...
user2635469's user avatar
1 vote
1 answer
305 views

I am making a portal system in godot 4. There are 2 worlds, everything in the normal world is on layer 1 or culling layer 1 (lights), and vice versa for altered world. The player model that moves ...
Jack Spencer's user avatar
0 votes
0 answers
218 views

I'm relatively new to Godot (came from Unity after all the trouble) but got around pretty good. I'm currently doing alot of shaders and since I use some functionality at different spots I thought it ...
Reborok's user avatar
  • 25
1 vote
1 answer
1k views

Similar question: Bend a mesh along spline Related: How to bend geometry with geometry nodes Related: Unity Curve Modifier What I'm trying to do: I want to create a Godot vertex shader that bends ...
rptfrg's user avatar
  • 142
3 votes
0 answers
250 views

left is wgsl, right is gdshader Bevy MRE here I am trying to port a water shader written in gdshader to WGSL (in Bevy). However I noticed that there is some seaming going on. After some time I figured ...
Racid's user avatar
  • 413
1 vote
2 answers
2k views

I wrote a shader on a CanvasItem in Godot: shader_type canvas_item; void fragment() { vec2 distortedUV = UV; distortedUV.x += sin(distortedUV.y * 5.0 * TIME/100.0 + TIME) * 0.1; COLOR = ...
Null Salad's user avatar
  • 1,070
1 vote
1 answer
1k views

I'm sorry, I can't explain it normally, but I hope you understand. In general, there is an image from the camera and it is displayed in the game. Also in 3d, the camera creates a depth texture that is ...
certrue's user avatar
  • 11
1 vote
0 answers
542 views

I wrote a shader to apply patterns to objects, for colorblind users. The pattern is passed in as a shader parameter, currently with a linear filter: uniform sampler2D pattern : filter_linear; The ...
4444's user avatar
  • 3,730
0 votes
1 answer
248 views

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 ...
SY DIE's user avatar
  • 3
0 votes
0 answers
1k views

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 ...
ilies's user avatar
  • 85
0 votes
1 answer
829 views

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 ...
Michael Strike's user avatar
0 votes
1 answer
527 views

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 ...
Makazau's user avatar
  • 741
1 vote
1 answer
2k views

I am quite new to shaders at all and can't get this easy task running. I created a ColorRect object and also a new shader material, to simulate a fog layer in my top down 2D game. Everything is ...
Nuker's user avatar
  • 2,597
4 votes
1 answer
2k views

Problem: I have a material which uses a shader in godot4(first stable release) and this is the code for the shader: shader_type canvas_item; uniform sampler2D custom_texture; uniform float cutoff: ...
Mahmood's user avatar
  • 615
0 votes
1 answer
808 views

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....
fguillen's user avatar
  • 39.5k
1 vote
0 answers
151 views

I'm trying to follow this video but in Godot 3: https://youtu.be/VSwVwIYEypY attached is an image of my project tree and the ColorRect i want to render the texture to. i have two shaders, one is ...
Andriy Sultanov's user avatar
0 votes
1 answer
573 views

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:...
cak3_lover's user avatar
  • 2,080
0 votes
0 answers
281 views

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? ...
eqwvevewbhwe's user avatar
1 vote
1 answer
500 views

I'm attempting to distort a "shadow" based on a normal map of the background, which I have access to in my shader. Video You can see here that I have a character hopping in front of a ...
Tyo's user avatar
  • 11
0 votes
1 answer
947 views

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 ...
cak3_lover's user avatar
  • 2,080
0 votes
0 answers
275 views

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/...
st_phan's user avatar
  • 914
2 votes
1 answer
301 views

Is it possible to apply a shader while preserving the self color? so far this is what I've come up with shader_type canvas_item; void fragment(){ vec4 self_color = texture(TEXTURE, UV); vec4 ...
cak3_lover's user avatar
  • 2,080
0 votes
1 answer
573 views

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 ...
Henrik Söderlund's user avatar
0 votes
1 answer
4k views

How do you specify the depth value in the fragment shader, if you would like to for example render a texture of a sphere that also affect depht buffer in the cameras z-direction? In OpenGL you can use ...
Lasersköld's user avatar
  • 2,255
2 votes
0 answers
1k views

I have two simple translucent circle sprites that I'm using as fake shadows (shown below) under some characters (not shown below). When the characters get close enough, sometimes their shadow circles ...
Sean Heber's user avatar
4 votes
1 answer
3k views

:) TL:DR When writing a custom spatial shader the ALBEDO color isn't the output color, even if render_mode unshaded is set. Long story I created a new project in Godot v3.4.4.stable.official [...
Benjamin Schulte's user avatar
1 vote
1 answer
977 views

I am writing a spatial shader in godot to pixelate an object. Previously, I tried to write outside of an object, however that is only possible in CanvasItem shaders, and now I am going back to 3D ...
Magikarp's user avatar
  • 170
2 votes
1 answer
202 views

In a 3D scene in Godot, I am attempting to create a pixel-perfect outline for a Spatial shader (applied after a pixelation effect to ensure the same resolution). To achieve this, I would like to ...
Magikarp's user avatar
  • 170
3 votes
1 answer
486 views

I have a project in Godot that renders billboarded quads on top of enemies. The quads(meshinstances) are children nodes of the enemy nodes. I want to render just the quads to a viewport for post-...
Dave's user avatar
  • 103
0 votes
1 answer
332 views

I'm trying to cut sprites in non-rectangular forms, I found this for angled cutting but is there a way to crop if an equation is given? for example the equation of an oval (x−h)^2/a^2 + (y−k)^2/b^2=1 ...
cak3_lover's user avatar
  • 2,080
3 votes
1 answer
2k views

I'm trying to apply a pixelation shader to my textures and I need it to be applied only once, after that I can reuse my shader generated images as textures over and over without having to calculate ...
cak3_lover's user avatar
  • 2,080
0 votes
1 answer
412 views

I'm trying to create a pixelation shader which I can view through the camera2D node something like this but instead of black and white I need pixelation using this answer I got a pixelation shader but ...
cak3_lover's user avatar
  • 2,080
1 vote
1 answer
728 views

how can i use the visual shader in the enviroment sky godot 3.4 any idea? I dont have nothing else to put..
Rubén ramirez's user avatar
1 vote
0 answers
1k views

I have this defined outside of any functions in a shader. I get the error Expected initialization of constant const vec2 rels[4] = { vec2(-1.0, 0.0), vec2(1.0, 0.0), vec2(0.0, -1.0), ...
Petruza's user avatar
  • 12.4k
3 votes
1 answer
1k views

I need to pass an array of integers to a shader as a uniform. As uniform arrays are not yet supported, I'm using a FORMAT_R8 texture/isampler2D to achieve this. If I'm correctly reading the bytes from ...
Petruza's user avatar
  • 12.4k