Shaders Questions

4

Im looking at doing some reflection shader. How do I access the eye vector? The vector between the camera and the vertex. Thanks!
Perseid asked 14/5, 2019 at 11:0

8

Solved

Hey, I have created a Triplanar shader with VisualShader so that i can have separate textures on the X,Y and Z Axis for a custom mesh. I have copied a shader i created in Unity (which works) however i...
Maki asked 25/9, 2023 at 12:32

3

I can attach a shader to a Sprite2D with no problem. But when I attach a shader to a billboarded Sprite3D I get no effect. How do I apply a canvas_item shader to a Sprite3D?
Dorcus asked 18/9, 2023 at 21:41

2

I can’t view the depth of objects no matter what I try, they just appear black. 139077-unknown.png760×323 64.6 KB I’ve been grabbing code from forums to access depth data, both via camera render targe...
Knox asked 29/5, 2019 at 17:39

2

I've been reading about mega textures and wondering how feasible it would be to do in Godot. For it to work, I'd need to be able to render my mesh-to-be-mega-textured to its own buffer with a special ...
Crowned asked 6/12, 2023 at 18:18

16

I've been intrigued by the idea of being able to use vector graphics in game engines, both for 2D UI / HUD elements as well as textures on 3D surfaces. While this doesn't make sense for anything reali...
Bashan asked 28/3, 2022 at 16:37

10

Hello, I'm wondering if it is possible to prevent "discard" from affecting realtime shadows (see gif above). In unity, realtime shadows are not affected by discard. You need to use "addshadow" ke...
Never asked 23/4, 2023 at 17:28

9

Hi, all! After a few cups and a bottle I started thinking I can't now live without ocean shader. And not another sine-ased wavery things, but something nice. What I want is shader style of GTA SA or ...
Gatto asked 27/7, 2018 at 20:45

8

So i need to change the mesh texture in-game, while user playing. when i used this code, my object texture becomes pink (texture issue color). Is there way to fix that? var texture = ImageTexture.new...
Infuscate asked 3/12, 2023 at 15:51

2

I'm doing some development work with GLSL shaders and have one returning a buffer of PackedByteArray that represents point information. I'd like to convert this to a PackedVector3Array so that I can t...
Vesuvius asked 28/11, 2023 at 11:18

1

Solved

VisualShaders have changed from what I remember in Godot 4.2. I want to add a texture input to my shader. I've added a Texture2DParameter node which allows me to attach an image to my shader. I can al...
Swansea asked 2/12, 2023 at 19:47

13

Godot Engine v4.1.3.stable.official (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors. :33 - Unknown identifier in expression: 'shearMatrix'. Shader compilation failed. :25 -...
Wundt asked 30/11, 2023 at 13:47

4

Hi there, I'm new here and i'm trying to replicate the effet described in this tutorial. I was able to create the model, unwarp it as described (each face covers the entirty of the UV space) and dis...
Grimalkin asked 15/8, 2021 at 9:24

9

I want to use world triplanar texture mapping but only for the initial position when an object is created. After that I want the texture to be fixed to the object even if I move the object. Any ideas ...
Conk asked 23/11, 2023 at 14:23

5

I don't actually know how costly a function call is in a gdshader. Is it worth it to use a macro for a one-liner over a function? I'm having a hard time finding an opinion on the internet about this. ...
Bes asked 22/11, 2023 at 0:52

8

Solved

I currently have a shader that takes two textures and when the normal is less than 0.5 uses the second texture (I'm using it for snow effects). The normal I'm using I calculate via vec3 global_normal ...
Trinary asked 21/11, 2023 at 5:51

8

Solved

SCREEN_TEXTURE : hint_screen_texture This thing captures the entire screen, even what is outside the game window and it is very annoying, I only need what is in the window.
Cyclopropane asked 17/11, 2023 at 16:43

4

So I'm trying to have a shader that adds multiples textures on top of each other but I'm encountering an issue with rendering. shader_type spatial; // Declare the textures uniform sampler2D base_tex...
Crampton asked 19/11, 2023 at 22:41

4

Hello! I have a laser that I set up with a Line2D and various particle emitters as children to a RayCast2D node. I would like to add a shader to make the Line2D look nicer and I have one functioning -...
Hanus asked 19/11, 2023 at 21:16

24

Solved

is there a equivalent to unity lerp function in Godot shader. I have tried Mix function it does not work. I have attached the screenshot of what is required. Any help is appreciated. Thanks in advanc...
Retrusion asked 15/11, 2023 at 14:5

6

Trying to understand why vertex() and fragment() COLOR produces different result. I have a simple Sprite2D CanvasTexture with the following shader code attached. The vertex() version gives a gradient ...
Blacklist asked 16/11, 2023 at 0:50

2

191140-so-bad-lightning-mf-xd.png1920×1032 385 KBHello everyone, Help someone with advice, or maybe there is someone who would like to help me in general, since I’m new to this. Maybe someone knows ho...

2

I am working on a project for college in Unity that involves displaying a very big pointcloud. I have implemented the point cloud as a mesh with 1 vertex per point and no triangles. I want to implemen...
Fairbanks asked 1/12, 2017 at 11:45

2

Solved

hi guys… i have came across a billboard shader and i added a alpha cutout in it to make it work as a tree billboard shader but now i want to add some shadows in it as i want my trees to cast shadows s...
Sufflate asked 26/8, 2013 at 10:25

4

I have a very basic shader (new to shaders!), it takes in an int variable and uses logic to set the colour. Technically it works, but all the sprites are set to the colour of the last one set in code....
Dorothy asked 7/4, 2020 at 0:28

© 2022 - 2024 — McMap. All rights reserved.