Questions tagged [shaders]

a computer program that runs on graphics hardware and provides a high degree of control over how scenes are rendered

Filter by
Sorted by
Tagged with
0 votes
0 answers
32 views

Frustum culling using compute shader, how?

I'm working on a little project for a while - creating an area where you can spawn a bunch of grass. I've overcame a major headache when figuring out the GPU instancing for the mesh and the code looks ...
Leedy's user avatar
  • 1
0 votes
0 answers
45 views

Overlapping geometry (Z - Fighting) solution with shader in Unity

I have geometry that is overlapping with other geometry (the floor). So, I used a shader to bring my desired mesh to the top. However, a new problem arose: the shader was rendering not only on top of ...
Muhammad Faizan Khan's user avatar
2 votes
2 answers
97 views

How do materials and shaders work in graphics programming?

I stumbled upon a few videos about shaders and materials from The Cherno and my understanding is that materials are this sort of input that a shader takes to calculate an output instead of hard coding ...
Konjointed's user avatar
0 votes
0 answers
28 views

How do you recreate a standard lit shader using custom lighting?

When using a standard lit shader the environment reflection on the material gets soft/blurry when you have smoothness at anything lower than 1 (which would be perfect mirror reflection). But when you ...
Ben Mora's user avatar
  • 427
0 votes
1 answer
37 views

GLSL limit uniform sampler2D to 4 for some reason

I'm writing a deferred rendering pipeline and my fragment shader looks like this: ...
Ronen Ness's user avatar
0 votes
1 answer
164 views

Shader to give the effect of a 2D character covered in oil

I have a 2D pixel art game where characters can be covered in a flammable black oil-like substance and I am looking for a simple way to depict that visually. Simply tinting the character black won't ...
Martin's user avatar
  • 43
0 votes
0 answers
38 views

Depth Map doesn't work in 2D URP

This is a further question from my last, originally I was trying to change the way the depth map is rendered per-pixel. However, through more testing, I've found that actually it has nothing to do ...
Pow's user avatar
  • 183
3 votes
2 answers
1k views

It's possible to use more than 4 channels of a texture in GLSL?

I have a Texture with 6 channels. Each channel store a mask that is used to change a color of a part of my player's sprite. When the texture only had 3 channels it was easy to implement this color ...
IDKsla's user avatar
  • 33
0 votes
0 answers
34 views

How do I pick terrain in GLSL/OpenGL by picking 2D vertices positions?

Presumably the problem is with the internal formats and my understanding of that, but I've been stuck a while, got this sort of approaching working fine on a more straight forward colour picker, but ...
Paul's user avatar
  • 1
1 vote
1 answer
42 views

Problem recreating shader on Phaser 3

I'm trying to recreate the following shader from shadertoy using Phaser 3: https://www.shadertoy.com/view/wdG3Rz I managed to fix the errors I was getting but it just loads an empty black square when ...
Javier Villanueva's user avatar
1 vote
0 answers
36 views

How do you supply custom reflections to a shader?

I'm using Unity with Amplify Shader Editor and/or Shader Graph, but willing to learn to write a shader if that's what it takes to achieve what I need. I need to be able to supply my own reflection ...
Ben Mora's user avatar
  • 427
1 vote
1 answer
60 views

Unity shader to give thickness to flat plane

I have this hexagonal grate floor: Which is a flat plane with the following shader: The hex lattice created using the method by Andrew Hung. Albedo and metallic/smoothness shader are just simple ...
Dr Rob Lang's user avatar
0 votes
1 answer
78 views

How do I render zones like Cities Skylines district tool?

I am trying to implement a zoning system like the district tool in Cities Skylines (see screenshot below). The player is able to draw/modify/erase zones with a brush tool. Internally, I represent each ...
sqd's user avatar
  • 111
0 votes
0 answers
23 views

Efficient Implementation of Dynamic Snake-Like Body in UE5: Seeking Advice on Optimized Approach

Platforms: iOS, Android, and PC. I want to implement a snake body that can dynamically grow in length, narrow, and bend (simulate body movement, similar to bending in an arc). I'm using UE5, and ...
Toki.u. Doki's user avatar
0 votes
1 answer
56 views

Is Unity Built-in Render Pipeline the default option, which includes mobile/diffuse shader?

I have been using mobile/diffuse shader in my project for awhile. However, I am not yet familiar with the term "Built-in Render Pipeline". Is it true that "Built-in Render Pipeline"...
Job_September_2020's user avatar
0 votes
1 answer
77 views

Is it possible to prepare a generic bump map shader to be used by (injected at) any 3D game?

Is it possible to prepare a generic bump map shader to be used by any 3D game? I found this bump map shader: ...
Gussak Thor's user avatar
0 votes
0 answers
49 views

Need advice on how to implement grass shader similar to Breath of the wild

What I am trying to achieve : I’m trying to recreate the grass shader of Breath of the wild & Tears of the Kingdom. There is a glow on the edge of the individual grass blades present when the sun/...
Abhishek Jathan's user avatar
0 votes
1 answer
56 views

Normal map lighting is just slightly off

I've been trying to implement normal mapping into my custom OpenGL shader. The result I'm getting is almost there, but it looks like the Point Light is not ...
Tom Tsagkatos's user avatar
0 votes
1 answer
33 views

Is shader array shared with other shader or not?

The documentation for Material.SetFloatArray it states: Sets a float array property on the material. If a float array property with the given name already exists, ...
aaa's user avatar
  • 107
0 votes
0 answers
64 views

How do i make the terrain texture less repeating?

question in the title no more to add, don't say "but it depends on how you set up your project" cause i'll set up my project how i need to set it up to solve the problem.
Atsinganoi Dragon's user avatar
0 votes
1 answer
30 views

Can we use Universal RP shaders for some objects and Mobile shaders for other objects in a Unity scene?

I am sorry if this question sounds silly. But, I am new to Universal RP shaders, and have to ask this question. Previously, in my project, I had many beautiful objects that use Mobile shaders. Today, ...
Job_September_2020's user avatar
0 votes
1 answer
81 views

How does vector raised to the power of another vector work?

I was watching this tutorial and at timestamp 3:03 he did this: This blows my mind because I didn't expect that to actually work, how the heck does that work ???? For example, if I have vector (2, 3, ...
aaa's user avatar
  • 107
3 votes
1 answer
252 views

If UV coordinate is Vector2, then why does UV node in shader graph output Vector4?

I'm new to shader, so please pardon my lack of knowledge. I am trying to understand what does UV node do in shader graph. I tried searching on google and in https://docs.unity3d.com/Packages/com.unity....
aaa's user avatar
  • 107
0 votes
1 answer
97 views

Can’t understand what this shader is doing

I believe this is a fragment shader which is supposed to distort an image by creating a zoom and swirl like affect but I have no idea what the shader is actually doing ...
Kayla's user avatar
  • 107
1 vote
1 answer
118 views

What specific lighting property creates "the unity look"

Nearly all unity games have specific "unity" look. It is quite obvious that it is caused by the rendering pipeline and shading, but I was wondering which specific part is responsible for ...
Tribski's user avatar
  • 155
0 votes
0 answers
32 views

Pass texture array into shader and paint mesh vertices depending on vertexattributes

Well, I'm a newbie with shaders, I'm just trying to paint a mesh depending on the vertex attribute passed with one or another texture. The idea is to achieve this, for example: For this, I have been ...
z3nth10n's user avatar
  • 141
1 vote
0 answers
109 views

Use of a Global Shaders in Unreal Engine to apply some pre-processing operations

I'm a little experienced in Unreal Engine, but I don't know the Unreal's graphics programming from a very low level. More in details I would like to know how could use an Unreal's Global Shader to ...
Giuseppe's user avatar
0 votes
1 answer
168 views

How can vertex position can be converted to fragment position?

I started learning open gl and graphics programming for a while (im using open tk as im working on c#) so i finally came across lighting where you make the ambient diffusion. Im pretty sure that you ...
Alex Mathew's user avatar
0 votes
1 answer
57 views

Custom Shader leads to wonky clipping

I have a custom shader that will change vertex heights based on texture color. My big issue is that some areas of the mesh texture peek through when they should be hidden. What's going on here? plane ...
Jacksonkr's user avatar
  • 229
1 vote
1 answer
44 views

Prevent color adjustment in ViewportTexture

In Godot 4.1.1, I'm trying to use ViewportTextures to capture values generated by some shaders for use in another shader. One SubViewport is capturing the result of an unshaded spatial shader on a ...
stewbasic's user avatar
  • 170
0 votes
1 answer
226 views

Fade edges of 2D spline-mesh

I'm re-writing my Unity game in Raylib and are trying to recreate a path/road-shader I made with Shader Graph. The first picture is how it looks in Unity, with faded/blurred edges. The path is a 2D ...
Johan Tovesson's user avatar
4 votes
0 answers
69 views

Simple shader to draw lights on a skyscraper

I have some basic shapes in the background of a scene that represent a small city. There is a stage where the scene becomes a nights scene. I would like to have the city come to life at night with ...
Charl Cillie's user avatar
0 votes
0 answers
53 views

Concept Shader to achieve such Toon/Graphical Novel look style

Hi to all, I have no clue how to achieve this kind of style (DallE Ai picture) by having a shader and custom textures applied to a 3D object. I see an outline (maybe sobel on normals and depth), and a ...
Matthyou's user avatar
0 votes
0 answers
63 views

What are the Godot equivalent to these Unity types and Functions for graphics processing?

Here are some unity types in this script: https://github.com/aras-p/UnityGaussianSplatting/blob/main/package/Runtime/GaussianSplatRenderer.cs which I am trying to convert to Godot: ...
Ethan's user avatar
  • 145
0 votes
0 answers
36 views

Connecting circles of the same color

I've been following couple tutorials on making blobs with connected colors, and it works fine, but I have issues modifying it. I'm spawning circles with dot gradient of certain color. Then in a shader ...
John's user avatar
  • 1
1 vote
0 answers
100 views

How do I add URP lighting reaction to the following handwritten shader?

I'm on Unity. I'm not very experienced with shaders nor shader graphs, but I managed to get this one to work on URP. What it currently does is, it takes noise values, and creates a tileset out of them....
Kepol's user avatar
  • 183
0 votes
0 answers
87 views

Transparency on sprite rig using URP to hide sections of sprites based on sorting order in Unity

I've been trying to crack this all day, spent a lot of time experimenting with the stencil buffer and while I was getting some interesting behavior, I was not getting what I intended. I would like to ...
Bjorn The Fire's user avatar
0 votes
0 answers
228 views

Creating a fake point light with empty object in the Unity shadergraph

I'm trying to create a fake point light from an Empty object with the shadergraph. This is a Blender prototype of the effect i'm trying to create. In Unity I do get the light mask to work somewhat as ...
hurmeli's user avatar
0 votes
0 answers
49 views

Is it possible to activate/deactivate depth writes in geometry shader?

I'm trying to achieve rendering to multiple targets with multiple viewports. Currently it does not work possibly because I have a single depth buffer so a first write to it with a specific viewport ...
philB's user avatar
  • 129
1 vote
1 answer
154 views

How can I dynamically change the skin and blush colours of an animated sprite's face in Unity?

I want to achieve this effect in unity when processing my sprites before After I was thinking that I could use two color pickers to tell a shader only to create a gradient if two colors share a ...
hello's user avatar
  • 11
5 votes
1 answer
286 views

Explode image into component pixels shader

I'm currently stuck on trying to write a shader for Godot 4.x. and get it to look right. I'd like to take an image, pixelate a bit so that particles are a bit chunky, and then explode it into ...
Ghoul Fool's user avatar
1 vote
1 answer
90 views

Vertex Shader Sphere Projection and CPU Distance Calculation

I have multiple planes whose vertices are transformed to a position on a sphere in the vertex shader. The GLSL function called pointToSphere transforms a point <...
Miguel Myers's user avatar
0 votes
1 answer
66 views

Why is my toon shader not getting pixelated?

I made a very simple unlit toon shader that works great, however I have to also pixelate my objects, I tried adding this part marked in blue that modifies the UVs but that did not have the desired ...
Majs's user avatar
  • 405
0 votes
1 answer
72 views

ForwardAdd pass gets weird results when a point light is on in Unity

I'm writing a custom shader for the transparent object with built-in pipeline of Unity2022.3.9f1. For Subshader the Tags set like below ...
OtakuFitness's user avatar
0 votes
1 answer
31 views

Rotate UVs in shader and contains result into quad with repeat edge pixels

I ask for help - I need to rotate the UV scan inside the quad by a certain angle (set by a parameter) so that the result is embedded in the original UV, and the missing areas are repeat edge pixels. ...
AleVerDes's user avatar
1 vote
1 answer
46 views

Visual shader dropdown missing

I can't seem to create a visual shader in godot 4, in order to use the visual shader editor. what am I missing?
Ghoul Fool's user avatar
1 vote
0 answers
435 views

Unity custom shader turning pink

I'm quite new to writing custom shaders. Wanted to try it out by creating a sand-standard surface shader. A problem that occurred was when I finished writing my custom shader in Unity, the material ...
Pantra's user avatar
  • 11
0 votes
1 answer
319 views

Can I add texture transparency and still use alpha clip in shader graph?

I have this simple shader that will "fade out" and object using alpha clip, for this to work the alpha has to be set to 0.5. I want to add a texture to this shader but I cannot figure out ...
Majs's user avatar
  • 405
0 votes
0 answers
93 views

Is there any way to store values in vertex shader such that they can be used in the next frame?

As I understand, the values assigned in the vertex shader aren't persistent and storing them doesn't do anything. I want to store the MVP matrix in another variable to be used in the next frame. ...
Nikhil Nair's user avatar
0 votes
1 answer
94 views

How can I store the current frame's MVP matrix (Or any other data about the current frame) so that I can use it in the next frame?

I've read several articles about motion blur and all were made with OpenGL. There is no equivalent of MVP matrix in C# scripts, so I wondered if the data could be stored on the GPU itself. Is it ...
Nikhil Nair's user avatar

1
2 3 4 5
40