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
4 votes
1 answer
82 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
0 votes
0 answers
16 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
0 answers
21 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
  • 375
0 votes
1 answer
19 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
24 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
23 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
47 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
52 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
  • 375
0 votes
0 answers
28 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
56 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
0 votes
1 answer
61 views

Cubemap rotation

I have a skybox with stars cubemap So, how can I rotate stars cubemap on Z axis using "Rotate About Axis"?
Ahmed Dyaa's user avatar
1 vote
1 answer
61 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 ...
Magikarp's user avatar
0 votes
0 answers
12 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 ...
Zeke Sanders's user avatar
0 votes
0 answers
52 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 ...
Cei's user avatar
  • 863
3 votes
1 answer
189 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 ...
Miguel Myers's user avatar
1 vote
0 answers
31 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 ...
Pinet's user avatar
  • 11
1 vote
1 answer
120 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 ...
dahrasz's user avatar
  • 55
0 votes
1 answer
43 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. ...
Nikhil Nair's user avatar
0 votes
1 answer
57 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 ...
Memory1's user avatar
1 vote
1 answer
77 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 ...
dahrasz's user avatar
  • 55
1 vote
0 answers
119 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 ...
Basic's user avatar
  • 1,064
5 votes
1 answer
57 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 ...
ninthtale's user avatar
0 votes
1 answer
81 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 ...
MaximMogulev's user avatar
0 votes
0 answers
61 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" ...
danglingPointer's user avatar
0 votes
0 answers
85 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 ...
Harper Rhett's user avatar
1 vote
1 answer
109 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 ...
Cei's user avatar
  • 863
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?
ina's user avatar
  • 274
2 votes
1 answer
253 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 ...
Harper Rhett's user avatar
0 votes
0 answers
38 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: ...
koogel's user avatar
  • 79
0 votes
1 answer
130 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 ...
OtakuFitness's user avatar
2 votes
2 answers
78 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://...
idchlife's user avatar
  • 167
0 votes
1 answer
100 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 ...
Wiley Rush's user avatar
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 ...
DDD's user avatar
  • 1
0 votes
1 answer
48 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 ...
JS4137's user avatar
  • 107
0 votes
0 answers
100 views

three.js shader to keep moving vertices of points cloud inside sphere

I am trying to achieve the effect of having a points cloud with moving points while also keeping them confined within a sphere of radius X. I have managed to do it without using shaders but I want to ...
Dimitris Karagiannis's user avatar
0 votes
1 answer
108 views

Animating A 2D Stylized Cloud Programmatically

I am tiling the following background cloud image horizontally. I would like to give it more character by making the top of the image deform. I would preferably like the puffs on top to bulge bigger ...
PayasoPrince's user avatar
1 vote
1 answer
212 views

How to support Texture Tiling + Offset for custom shader

I've written a custom shader (with help) and I'm not sure why it does not have tiling & offset capabilities. What is the simplest way to add that feature to my shader? current shader code ...
Jacksonkr's user avatar
  • 223
0 votes
0 answers
44 views

Is it possible to extract both the color and the depth texture from one RenderTexture and use it in a Shader?

I can access the same with duplicating the cameras AND the rendertextures, but that seems like a lot of overkill of just getting the depth buffer. I don't need a very precise depth buffer, so it can ...
Dirk Boer's user avatar
  • 121
0 votes
1 answer
42 views

How to make a backdrop that supports different grid effects?

I am learning UE5 using a course on Udemy, and also trying to build a simple (as I thought) project of myself. The game is billiards with top-down perspective. I want to make a billiards table that ...
Eugene's user avatar
  • 103
0 votes
1 answer
69 views

How to compute visible area of a sphere

I have a number of spheres in my scene. I also have another object that I want to scale depending on the amount of a selected sphere that is visible (it can be occluded by multiple other spheres ...
BinaryGuy's user avatar
  • 141
0 votes
1 answer
81 views

Custom TextMeshPro Shader doesn't render on Android

I wanted to make build of a project using custom shader for TextMeshPro text assets. It renders nicely on PC but It gives me block instead when build for the meta Quest 2. For me it looks like it ...
Felox's user avatar
  • 67
0 votes
1 answer
27 views

Unity shader is changing the selectable area to the original texture it used

I know a little about shaders, but not much. I cobbled one together to to light my sprites, and it's working great if not for one thing: I originally tested the shader with a chair texture. I made a ...
Jam's user avatar
  • 111
3 votes
0 answers
62 views

Smooth self shadow on dense foliage

I don't know how to achieve or research smooth lighting on foliage, like in this screenshot of theHunter: Call of the Wild. The grass is translucent, but blocks light smoothly when it's tall and ...
Cebbi's user avatar
  • 171
0 votes
1 answer
82 views

How to scale down noise intensity?

I'm currently making a planet and for that, I added noise, to create terrain on the surface. The method I'm using is creating simplex noise (that ends up looking like the image below) And I write ...
Chillzy's user avatar
  • 47
0 votes
0 answers
106 views

How to combine TextMeshPro Font Material with Wiggle Text Shader in Unity?

I have a Unity GameObject with a TextMeshPro component (let's call this object "White Letter"). The Font Material is using the "TextMeshPro/Distance Field" shader. This works ...
kanamekun's user avatar
  • 369
1 vote
1 answer
167 views

Material Transparency is not showing in the build

I have came across a weird situation. I have a gameobject that has a standard shader material. The material rendering mode is set to Transparent. This is working fine in the Unity editor, but its ...
Muhammad Faizan Khan's user avatar
1 vote
1 answer
74 views

Solving distortion with non-linear scaling in a shader

I am currently working on implementing an older paper in Unity to show the progression of some graphics technologies, and part of that involves sprites being able to cast shadows. A trivial ...
Noon's user avatar
  • 13
0 votes
0 answers
42 views

Shader code for placing 5 smaller images in different offsets on a larger base image

I'm trying to texture atlas in realtime, with 5 smaller texture2Ds to be placed on a larger base texture2D... This shader code only shows the first texture and not the others - and even though it is ...
ina's user avatar
  • 274
1 vote
0 answers
134 views

Expected a smoothly fading opacity in this Raylib shader, but instead it is chunky

In my main file, I create a regular icosahedron and assign the below shaders to it using the Raylib framework in C++17. I intended for the vertex shader to assign a 1.0 alpha value to points at Z=-5....
James Watson's user avatar
0 votes
0 answers
96 views

Unity URP Invert desaturated shader effect with

I wanted to have a shader that invert and desaturate the background scene color with a mask in URP using scene color. I made a shader within shadergraph : And it did not render as expected, I think ...
Felox's user avatar
  • 67

1
2 3 4 5
39