Questions tagged [shaders]
a computer program that runs on graphics hardware and provides a high degree of control over how scenes are rendered
1,956
questions
1
vote
0
answers
31
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 ...
0
votes
0
answers
8
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 ...
1
vote
0
answers
70
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 ...
0
votes
1
answer
72
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 ...
0
votes
1
answer
51
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 ...
1
vote
1
answer
33
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 ...
0
votes
1
answer
141
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 ...
2
votes
0
answers
52
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 ...
0
votes
0
answers
35
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 ...
0
votes
0
answers
46
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:
...
0
votes
0
answers
32
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 ...
1
vote
0
answers
57
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. Currently I'm changing the light intensity or brightness "manually" with ...
0
votes
0
answers
44
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 ...
0
votes
0
answers
112
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 ...
0
votes
0
answers
36
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 ...
1
vote
1
answer
111
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 ...
5
votes
1
answer
206
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 ...
1
vote
1
answer
61
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 <...
0
votes
1
answer
56
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 ...
0
votes
1
answer
45
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
...
0
votes
1
answer
26
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. ...
1
vote
1
answer
38
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?
1
vote
0
answers
196
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 ...
0
votes
1
answer
207
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 ...
0
votes
0
answers
66
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.
...
0
votes
1
answer
77
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 ...
0
votes
1
answer
90
views
Cubemap rotation
I have a skybox with stars cubemap
So, how can I rotate stars cubemap on Z axis using "Rotate About Axis"?
1
vote
1
answer
74
views
Getting coordinates within a bezier space
I have created an object that is comprised of two bezier curves (constructed of an identical finite segments equal to a variable named resolution). The two curves ...
0
votes
0
answers
14
views
Finding highest point on displacement map returns bizarre results
I find the highest point of a displacement map sampled at 9 different UV coordinates that i pass in an array to the shader. Then if the result is more than 0.7 I output a red pixel at every UV ...
0
votes
0
answers
73
views
How to remove plastic-like reflection from visual shader?
The problem is that this is a piece of terrain, it should not have blue reflections like it's made of plastic. But when the camera gets close enough, these specular highlights are rendered.
This is ...
3
votes
1
answer
269
views
How To Make Seamless Custom CubeMap?
I'm currently working on a Three.js project, and I'm aiming to create a seamless cube map. To achieve this, I created six planes and assembled them into a cube. Then, I utilized a shader to generate ...
1
vote
0
answers
50
views
How to create intersection shader that simulates squishing?
I want to create a shader that will make spheres/circles look like a blob when colliding.
I don't understand shadergraph at all, but I tried to follow intersection shader tutorials.
The problem is ...
1
vote
1
answer
365
views
How Can I Make a Silhouette Shader When an Object is Behind Another Object in Godot 4
I've been trying to replicate the effect created in this guide (https://www.gdquest.com/tutorial/godot/shaders/silhouette-2d/) in Godot 4, but I haven't had any luck.
The problem seems to be that in ...
0
votes
1
answer
72
views
Which pixels does the fragment shader of an unlit shader, applied on an object, affect in Unity?
Let's say that I have a cube that has an unlit shader applied to it. The shader does basic ray-marching.
...
0
votes
1
answer
70
views
Discontinuous Normals on a Normalized Cube Mesh with Displacement Texture
In my project, I have created a normalized cube using six plane meshes. To improve its visual quality, I added a displacement texture and calculated the normals for that texture to ensure proper ...
2
votes
1
answer
94
views
How can I make a 2D shader that darkens all sprites not in a certain area?
I was wondering if there was a way to make a 2D shader (or use any other method) to selectively black out areas of the screen that are not in a specific region.
I need this shader because in the game ...
1
vote
0
answers
212
views
Unlit camera-facing billboard in ECS/DOTS shader
I'm attempting to create an unlit billboard shader for use in DOTS. I'm using quads to host the material
(Some regular, some DOTS for comparison purposes)
I've cribbed together something from this ...
5
votes
1
answer
75
views
How can I hide the interior frontfaces of a portal when viewed from the outside?
I'm trying to follow This tutorial for a portal mask shader. It's an awesome effect but it comes with a couple of caveats. The shader as he designs it can only exist in a bubble, as:
The portal is ...
0
votes
1
answer
116
views
How to achieve Quake moving lava effect using OpenGL under v2.0?
On the first boss fight level you could notice how lava moves what is not a surprise for a software renderer. But according to the Quake fandom, GLQuake was released in 1997, hence OpenGL had no ...
0
votes
0
answers
172
views
In a Unity Camera Stack: how to grab a Camera's "view texture" (to be used inside of a shader)?
Here is the situation:
I have a URP Camera Stack; actually just two cameras: a perspective base & an orthogonal overlay.
I have some distortion shader (example, not mine) that "runs" ...
0
votes
0
answers
123
views
How can I prevent height map artifacting when wrapping a texture around a sphere?
So, I have been on a bit of a journey wrapping a texture around a sphere. So, if you are reading this looking for spherical texture wrapping solutions, I would suggest checking out my last post as ...
1
vote
1
answer
285
views
How to outline animated mesh in Godot?
this little freak, is roughly 1.3 meters tall so around 4.2 feet. In first person he is decently easy to spot but in third person he blends too easily with ground so even if he is only 4-5 meters ...
0
votes
0
answers
27
views
Teeth sticking out from character clothing mask shader
So this issue happens after using a character clothing shader here
How do you have the clothing mesh hide the body mesh underneath?
i'm not sure what is causing this exactly? how do we fix this?
3
votes
1
answer
514
views
How can I map a texture around a sphere without a seam?
I am attempting to wrap a texture around a sphere without any warping using Unity's Shader Graph. I have been following this StackExchange answer, and have semi-successfully converted their shader ...
0
votes
0
answers
45
views
ImGui errors when trying to make a game menu
I want to make a simple game menu, but I ran into a problem where ImGui cannot stop rendering and apart from that it throws shader errors. I initialize ImGui in this way:
...
0
votes
1
answer
249
views
A problem of sampling _CameraOpaqueTexture in Unity 2020.3
I'm using URP 10.6 and I found a wired problem. I use following code to sample the _CameraDepthTexture
...
2
votes
2
answers
93
views
How to make texture look sharper and more detailed, when you look closer?
I have this material of a rocky wall. At far it seems okay, but often when walking close by it's obvious that the texture actually has not enough resolution and seems way too blurry.
Far: https://...
0
votes
1
answer
178
views
Iterating through every pixel in a shader - skipping pixels
I made the below shader to draw a mesh for every pixel on a texture, and color it with that pixel.
It iterates through the pixels, correctly drawing and coloring the mesh instances. However it skips ...
0
votes
0
answers
31
views
Persistent Variable Issue: Incorrect Texture Index in C++/Opengl Rendering
I am attempting to render two different textures in C++/OpenGL. However, I am encountering an issue where the integer I pass as the texture index to my Fragment Shader always seems to be set to 0. In ...
0
votes
1
answer
72
views
Should I use a full shader solution or geometry for vector rendering in OpenGL?
I am trying to create a vector rendering library for OpenGL in Rust. Currently, the goal is to produce nanovg-like rendering. I have found two approaches to doing my rendering:
The pure shader ...