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
6
votes
1answer
468 views

How to simulate a liquid like “The Cook” or “Bake it”?

I want to make a simple liquid something like these gifs:
0
votes
0answers
13 views

Water shader not working on some machines in Unity3D?

I've got a report from a player (1 in ~100), that the water isn't rendered on his machine. I use this shader: https://roystan.net/articles/toon-water.html I've made a small change so I can use it in ...
0
votes
0answers
14 views

How to make it possible to change the width of the stripes?

I am making a shader to create stripes based on this tutorial, but I cannot set the width for each stripe and make a shader that accepts light. ...
0
votes
2answers
54 views

How can I draw orbit paths for a solar system?

I’m trying to make the orbital paths visible for my solar system simulation game. I have most around with trail renderers and solid line sprite but not achieving the desired look I want. I’m hoping to ...
0
votes
0answers
20 views

Ascii Art 3D Shader

For a small interactive piece I'm doing I'd like to use 2d ascii art but where the font size per text character is effected by the raytraced distance of the target point from the camera. Above is my ...
0
votes
0answers
51 views

LibGDX 2D Silhouette

recently I decided to implement in my game the drawing of a silhouette of the player when he is behind objects (the top layer of the map). Found a similar question here, but it doesn't matter to me to ...
0
votes
0answers
27 views

How to fuse 2 sprites as they approach each other in Unity2D?

Hi i seen this video by Sebastian Lague on ray marching. Link: https://www.youtube.com/watch?v=Cp5WWtMoeKg&t=204s At 3:19 mins. I want this merging effect but for 2D sprites. Please can someone ...
0
votes
1answer
31 views

How to use an overlapping shader so that it uses layers sort from sprite renderer and its transparent

Im using the shader from question , but once I put it in the game, and my character gets close to it, it will be hidden by the shadow of the tree, which is transparent. Any way to make the shader ...
0
votes
1answer
27 views

How can I color in only specific regions of my scene?

I am interested in having large portions of my game be grayscale, but I'd like certain parts of the scene to have full color. Something like this: Is this something that is possible with shaders or ...
0
votes
0answers
17 views

Help with modifying a geometry grass shader to allow removing areas?

So I have this geometry grass shader from a roystan tutorial I followed but it applies the grass effect to the entire mesh at once. I need to find a way to only apply grass to set areas much like how ...
0
votes
0answers
29 views

How to free up TEXCOORD slots for Unity's Universal Render Pipeline?

I am writing custom a custom shader for Unity's Universal Render Pipeline (Version 7.3.1). The meshes are built using three separate UVMaps for different portions of the mesh. The reason I actually ...
0
votes
1answer
22 views

Can geometry grass shaders be painted to a terrain or are they limited to meshes?

So I was follow the roystan grass shader tutourial and although it works well I don't understand the use for it. From what I understand the shader is basically just a flat plane that calculates grass ...
0
votes
0answers
21 views

How to fix normal map in unity

hey, I'm just using unity, I'm having a problem with the normal map, like the picture above, if I use blender I just need to change the sRGB to non-color data, but when I import it to unity using the ...
0
votes
1answer
19 views

Texture uniform does not work

So im programming a raytracer at the moment and Im passing a 3d texture from the cpu to the gpu but the gpus texture has not the same values The uniform part (its made in Unity): ...
0
votes
1answer
17 views

Utilize remote PC to Boost UE4 Editor Performance

As the title suggests, I would like to know how I can take advantage of a desktop PC at my workplace to help boost the performance of the editor on my laptop at home. General editor actions such as ...
2
votes
1answer
50 views

How to render thin glass with proper refraction?

I want to render thin bumpy glass with refraction. But it offsets too much(look at the black frame of the glass). Looks thick. How to do thin glass refraction properly? Or is it possible to exclude ...
0
votes
2answers
43 views

Mesh shaded as single pixel

I am trying to procedurally generate planets in Unity. The actual planet is already done, but now I am trying to add clouds. For this I created a PBR-Graph shader that draws the clouds based on some ...
0
votes
1answer
35 views

Passing touch position to compute shader

I am working on a game where I have to mix colored liquids as shown here. I am working with a plugin (StableFluids) to get this effect: Effect Problem: The shaders used in the plugin are able to ...
0
votes
0answers
18 views

Can't import shaders/textures to Godot from Blender 2.8

I'm using this shader for my models and then i import them like this This is the original model in blender: the result in godot: I think i might have missed some step but not sure of which one, i ...
0
votes
0answers
15 views

Shader Tiling Texture Overlapping between X and Z Axes

I have a shader (code at the bottom of this) that I'm using for a terrain. It renders a texture on the sides of the terrain (the x and z axes) and between those axes the texture tends to overlap. I ...
0
votes
1answer
35 views

Interactive texture modification (such as swirling) in Unity

I am working on a game where I want to allow users to mix multiple colors (similar to shown in this video): https://youtu.be/11UFYyv8hjs?t=316. I have the following questions: I am expecting that ...
2
votes
2answers
1k views

Texturing different block types on an optimized voxel mesh

I have a cubic world (like Minecraft) where I'm generating chunks. In those chunks, only visible vertices and faces are generated. Currently, it means that if I have a 2x2x1 chunk, it will generate 8 ...
0
votes
0answers
18 views

Improve appearance of neon LineRenderer at sharp corners

I followed the answer given in how to make 2d neon using linerender and get neon effect nicely, but when I draw a line with a tight circle or overlap nearby lines, I get unsightly triangle artifacts ...
0
votes
0answers
17 views

How to purposely overscan a Unity Camera?

For many shader effects that use the scene color, we want this color to be displaced along the object plane. Think water, glass, heat distortion, etc. However, of course, if this happens near the ...
0
votes
0answers
17 views

Help with Unity global illumination removes cel shaded effect

So I am using this toon shader I got from the asset store that supports global illumination. However it seems like the global illumination destroys the cell shaded effect, and when in shadow it looks ...
0
votes
1answer
41 views

My lighting stays the same when I go indoors?

My problem can be seen here notice how the shadows don't change intensity or color when moving indoors to the cave. The only thing that changes is the highlights when I move under the directional ...
0
votes
1answer
22 views

How to perform some custom math between the model matrix and the projection matrix?

I'm trying to write a shader in Unity that will perform some custom math after the model*view matrix is applied but before the ...
1
vote
0answers
40 views

Creating Blender-like cavity shader

I'm trying to achieve in Godot something similar to cavity effect from Blender (this can be enabled in viewport options; cube on the left is displayed by viewport with this option enabled): How would ...
0
votes
1answer
110 views

What is the difference between these two shaders in terms of performance?

I have implemented a two pass Gaussian blur shader in GLSL like this: ...
1
vote
0answers
60 views

Wireframe shader sometimes won't render parts depending on camera rotation

I'm trying to make a stylized wireframe shader for a game using this method, but it seems to be conflicting with my character controller. Here's some images to better show what's going on: https://...
0
votes
1answer
131 views

Unity3D URP - How do I approach creating Fog of War for 3D top-down stealth game?

What I try to achieve is a fog of war system for 3d top-down stealth game. I have searched the Internet and it seems that behavior I want to achieve can be done by using secondary camera that is ...
0
votes
0answers
29 views

How to programmatically overlay a shader on a terrain by mask (Unity)?

I can paint the terrain with textures.I would like to see water drawn with a shader, and not a stationary water texture on the terrain. Moreover, it was possible to assign a shader to the terrain, but ...
1
vote
1answer
45 views

How can I cast light onto a sprite in 3D environment?

I'm making a 2.5D game, where 2D sprites are in a 3D environment. I'm using URP and I have a problem with lighting the sprites. The sprites are lighting up from behind, and not front. I tried with ...
0
votes
1answer
51 views

How to do “Screen Space Texture” mapping on a Unity UI Image?

So I'm fairly new to the shader and I've been trying to achieve this kind of effect from Ronja Tutorials, but instead of using it for normal mesh object, I'm trying to use it for Screen Space UI Image ...
-1
votes
1answer
58 views

Unity depth shader not giving correct values

I did the following shader (looked up and changed for my needs): ...
0
votes
0answers
15 views

How can I make the overlapping object's outlines merge and not display on top of other objects that have the outline shader?

This is what I am trying to achieve. I was following https://www.youtube.com/watch?v=SlTkBe4YNbo but the outlines show on top of other if the objects overlap. I tried looking through various outline ...
0
votes
1answer
58 views

Generating the distance of an intersection through a box from the camera in Unity C#

So, I recently saw this fantastic video by Sebastian Lague about planetary generation- https://www.youtube.com/watch?v=lctXaT9pxA0&t=1100s And I decided to replicate it, however, on a flat plane, ...
1
vote
1answer
80 views

OpenGL texture2d/image sampling issue. Strange artifacts in texture

I have an issue when using textures in OpenGL, strange artifacts occur where geometry overlaps, but not always. Video Reference. I am using a GL_TEXTURE_2D with <...
0
votes
0answers
25 views

Help with unity cel shader not work when turning away from the main light?

So i'm using this really good toon shader I found, that works with multiple directional and point lights. Only problem is, it acts weirdly when turning away from the main light seen here, ( sorry for ...
0
votes
0answers
29 views

Unity: What's the difference between SRP batching & GPU Instancing?

I've been researching a lot about Draw calls and how to reduce them, i'm using GPU Instancing and it's amazing, but i did not ...
0
votes
1answer
93 views

How to make a cell shader like BOTW in Unity?

It seems most cell shader tutorials focus on individual shaders for materials, but the effect used in BOTW seems to be more like a filter, that is applied to everything. I've researched multiple ...
1
vote
1answer
35 views

Constant Buffer Alignment issues

I have issues with constant buffer member alignments. I have the following C++ struct: ...
1
vote
1answer
63 views

How to render a grid of dots being exactly 1x1 pixel wide using a shader?

I would like to render a grid with many dots, all equally spaced and being exactly 1 pixel wide. What I was able to achieve so far is this : What I would like is (simulated using image editing ...
0
votes
1answer
54 views

How to write depth texture and read values from it

I am new in Unity and specializing in another field. But now I have to rapidly study it for a new project. I will be very thankful if anyone explain me how to read values of the depth buffer. I wrote ...
1
vote
3answers
516 views

Convert from Shader to ShaderGraph

I am working on procedural generation in Unity, and am now a bit stuck. I am using Perlin noise to generate a heightmap, including lacunarity, persistence, octaves and frequencies. Today I have been ...
0
votes
1answer
33 views

Controlling noise density

I'm trying to fake terrain blending by using an opacity mask on my road mesh to reveal the grass underneath. I'm currently multiplying some Perlin noise by a Rectangle node displaying my texture at 80%...
0
votes
0answers
33 views

Unity Grid Shader line Color

First of all I'm sorry if my question is a odd thing to ask, but i'm new to Shader things and don't know how to handle this stuffs. I have a shader that draws grid on a ground plane and it works just ...
0
votes
1answer
20 views

Apply Secondary Normal Map to Standard Shader by Script

I have a material with an existing normal map. I added a secondary normal map to represent damage via script. I assign to the appropriate texture property ...
0
votes
1answer
75 views

#pragma target 3.0 or 3.5? What is gained. What is lost for compatibility with older systems

I've just designed an image-based layering system shader. Multiple textures with Alphas overlay to create a fully dressed character, using 1 material. pragma target 3.0 is where I had started (...
0
votes
1answer
29 views

glsl wrong light direction

I'm practicing the Phong lighting model with glsl, and here's my shaders: vertex shader: ...

1
2 3 4 5
34