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
0answers
17 views

Other displacement/deformation methods than vertex displacement?

Using vertex displacement on low-res models lead to artifacts, and I imagine tessellation might be a bit slow, if I want it pixel-perfect. I know signed distance fields can be used, though I doubt ...
0
votes
0answers
23 views

Tracking player on "overview map"

I'm working on a city-based isometric game where the player controls a character moving around in the city. I need to create both an overview map and a minimap similar to both GTA and Mafia 3. Here's ...
12
votes
1answer
2k views

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

I want to make a simple liquid something like these gifs:
2
votes
1answer
150 views

Water shader in Unity3D not working on some Linux distributions/some Mac OS?

I've got reports from some Linux users that the game's water isn't rendered on his machine. 3 example operating systems: Ubuntu 20.04 (with kernel 5.4.0-54-generic x86_64 Linux 4.15 Linux Mint 19.2 ...
0
votes
0answers
18 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
193 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
34 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
78 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
31 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
55 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
32 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
164 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
121 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
30 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
21 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
34 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 ...
3
votes
2answers
124 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
48 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
99 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 ...
1
vote
0answers
71 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
1answer
69 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
2k 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
42 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
38 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
44 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
38 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 ...
6
votes
1answer
733 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
129 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
73 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://...
2
votes
1answer
1k 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
127 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
284 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
347 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
161 views

Unity depth shader not giving correct values

I did the following shader (looked up and changed for my needs): ...
0
votes
0answers
202 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
108 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
240 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
83 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
1answer
412 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
270 views

Constant Buffer Alignment issues

I have issues with constant buffer member alignments. I have the following C++ struct: ...
2
votes
1answer
125 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 ...
1
vote
1answer
579 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
4k 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
79 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
1answer
113 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
377 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
49 views

glsl wrong light direction

I'm practicing the Phong lighting model with glsl, and here's my shaders: vertex shader: ...
0
votes
1answer
927 views

Making a crosshatching effect in Unity Shader Graphs

I'm learning Shader Graph and am trying to experiment with toon shading effects. One thing I'd love to do is make a traditional art styled crosshatching effect either inside shadows or at the edge of ...
0
votes
0answers
527 views

Mobile Unity Shader - how to work with on/off boolean

How do you set a boolean for a shader? How do you write a conditional or assign a boolean in a shader? So, it seems that shaders do not take booleans... so I tried assigning the float to 0 or 1 <...
0
votes
1answer
60 views

Ocean visible through the island's lake in Unity3D?

I'm working on a puzzle game featuring islands: there is a plane with a water shader, and objects colliding with that plane. Now I'd like to make lakes on the islands, with different (higher) water ...

1 2 3
4
5
37