Shaders Questions

7

Hi, I started shaders with Godot while working on my first game, and I'm out of painkillers for my head so here I am. I try to reproduce the whirpool shader made for unity in this blogpost. So far, ...
Recur asked 24/10, 2021 at 1:32

16

Is there a way to hide objects under another object? I have a multimesh with a shader creating moving grass, but it pokes through my farm plot blocks. You can see the effect here I found some code t...
Joint asked 11/10, 2021 at 13:4

2

I'm trying to a pass single color to a shader via a texture3D at the coordinates 8, 65, 7. I set my texture3D pixel to white, but when I draw it in the shader it appears as black. Heres how I set u...
Deangelo asked 9/10, 2021 at 16:53

4

Hi there, I need some advice and knowlege about shaders. I want scrolling texture on a Cube-Mesh. The texture should be scaled down (not shown in full size). The tutorials I found were outdated. W...
Subatomic asked 6/10, 2021 at 14:40

3

Is there a way to directly animate a shader uniform via AnimationPlayer or in some other way? If not, this is something to consider for the future versions as it'd be very useful. I know it can be don...
Benedetta asked 24/9, 2021 at 10:41

6

For my current game I need an outline shader with these requirements: The outline should stay the same thickness reguardless of camera distance and viewing angle. The outline width should be configur...
Cenogenesis asked 15/5, 2021 at 20:14

5

I'd like to create a day night effect like in graveyard keeper: https://www.gamedeveloper.com/programming/graveyard-keeper-how-the-graphics-effects-are-made They said they used a look up table, presu...
Wordless asked 2/10, 2021 at 15:40

3

Is there any way to run a vertex shader (calculating around 100-1000 individual vec3), recovering the results in GDScript? Hacky/workaround stuff is okay. Summary: I have a function that takes a poi...
Boelter asked 27/7, 2021 at 0:39

3

If we take as an example the following Shadertoy shader we can see that it is made of 3 different files, namely Buffer A, Buffer B, and Image. How would I create something similar in Godot. Do I need ...
Hulbig asked 19/3, 2021 at 7:6

10

Hey I'm trying to create a custom post process on top of everything (including transparent objects) that requires the depth pass. I've tried using the screen-reading technique (https://docs.godotengi...
Prism asked 24/3, 2020 at 17:50

15

If each vertex of a triangle mesh has a vertex colour, how do you colour a pixel using the vertex color of the nearest vertex? Linear interpolation: If I set fragment ALBEDO.rgb = COLOR.rgb in my fra...
Stevestevedore asked 16/9, 2021 at 18:14

4

If I have coordinates of a pixel in world space, how can I tell if there is part of a material there or not? i.e. does the material draw anything there?
Oto asked 18/9, 2021 at 16:25

3

What's the exact blending operation that blend_premul_alpha shader mode applies to pixels?
Jurisprudent asked 17/9, 2021 at 7:0

9

I can't seem to find a way to draw thick three-dimensional lines. Line width parameter in the spatial shader says it's disabled. I also cannot use custom shaders because there is no access to vertex d...
Woodham asked 13/9, 2021 at 5:22

3

ok, so im working on a 3D 3rd person game. I have hterrain(zylanns terrain) and a slightly more than basic understanding of the godot platform(i created a functional start menu screen using the automa...
Twobyfour asked 8/9, 2021 at 10:43

2

Hey! I'm trying to make a shader like this: Here's my pathetic attempt at getting somewhere near that: shader_type canvas_item; uniform sampler2D palette_texture; uniform float palette_number; unif...
Gabor asked 11/9, 2021 at 15:25

3

I want to draw a line across a sprite that is consistently 1 screen pixel wide, here is a simplified version of the shader code (just use this on a sprite): shader_type canvas_item; render_mode blend...
Saval asked 10/9, 2021 at 17:37

14

I need to draw a bunch of rectangles (possibly hundreds) with a custom shader, but each rectangle needs to have different uniforms set in the shader. As per documentation I tried using _draw() on a No...
Dowser asked 6/9, 2021 at 5:7

3

I want to use a vertex shader to add some static noise to a mesh for procedurally generated terrain. It seems wasteful for this function to be called every time the mesh is rendered, though, since it ...
Varner asked 31/8, 2021 at 1:23

11

Hi, I'm trying to code a shader that makes a Sprite2D transparent dependently on the lights by changing the alpha of the texture color. I started by making it invisible in the dark and visible in the ...
Fortdefrance asked 18/8, 2021 at 9:52

6

Hi, I'm building my first game and learning Godot, and I have a question about how to achieve an effect I am after. I have programming experience but no game dev experience. Goal: I want to create a...
Birk asked 8/8, 2021 at 19:27

6

I create a simple 3D cube, I apply a SpatialMaterial with a red color (#ff4f4f). I create a second cube, with a ShaderMaterial, I put the red color to on albedo. Why there are differents ? Source c...
Pericope asked 11/8, 2021 at 8:6

9

Hello, im sorry if this is a really obvious question but, ¿how do I manage to apply this shader onto my World scene? I can't seem to find the way. Thanks. The shader is this: https://github.com/marmi...
Reproductive asked 10/8, 2021 at 4:43

4

I'm making an isometric voxel game. I'd like to make it so that if a character is obscured by a roof that is exactly 3 blocks above the player, then the roof is moved over 2 blocks so that you can see...
Livia asked 7/8, 2021 at 16:49

5

hello everybody Im trying to make a 2d memory game but the problem is to flip the card. in order to flip the card I need to rotate the image along the y axis but in 2d I cant do that so instead I need...
Soutane asked 1/8, 2021 at 18:7

© 2022 - 2024 — McMap. All rights reserved.