People who code: we want your input. Take the Survey

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
1answer
139 views

Why don't ShaderToy shaders work with LibGDX?

Can someone tell me what is different about the shader implementation in LibGDX that makes it incompatible with the shaders from ShaderToy? It looks like you can use ShaderToy shaders directly with ...
0
votes
1answer
83 views

How to convert from frag position to UV coordinates when my viewport doesn't cover the screen?

So, I'm implementing SSAO as part of my rendering pipeline using OpenGL/GLSL. It works pretty well when I have a camera that takes up the entire screen. However, when my camera is smaller than the ...
0
votes
1answer
243 views

How to get neigbor pixel coordinates in Unity HLSL shader

I am writing Mandelbrot set shader for Unity. I wrote an Image Effect shader and it works. Unfortunately, each point "shimmers" on translate scale. This is because, for each shader call I ...
0
votes
0answers
17 views

Is it possible to have 2D and 3D properties of the shader in Unity?

In properties of standard objects there are both 2D and 3D properties, like this On the other hand, in properties of a shader, I can apparently specify only 1D and 4D properties. Is this true? Is the ...
0
votes
0answers
21 views

Quixel asset to unity

I downloaded asset from Quixel, I'm using Unity HDRP, the problem I am facing is how to properly create a mask map cause the asset from Quixel doesn't have metalness map where in HDRP mask map it ...
0
votes
0answers
20 views

Per-component Shader Blend in Unity

Context : I'm writing a 2D mobile game in Unity where the graphics are essentially black lines drawn on a background image plus some lighting. Running full RGB calculations for every step seems like a ...
0
votes
0answers
19 views

Send Geometry Data to Multiple Shaders

So I am implementing a deferred rending model for my engine, and I want to be able to send all scene geometry into a single shader to calculate ambient, diffuse, normal, ect thats not the question. ...
0
votes
2answers
3k views

Understanding Screen Position Node in Unity Shader Graph

I'm struggling to understand what exactly the Screen Position node outputs in Unity's Shader Graph. I'm using the screen position with scene depth to calculate the distance between two objects. Every ...
0
votes
0answers
46 views

Rendering Mode transparent is not applying in webgl build

I am using this method to convert opaque rendering mode to transparent. ...
0
votes
0answers
40 views

How to highlight edge of movement range

I am working on a small tactical game like X-com. I now have a working-ish version and would like to treat myself to some aesthetic upgrades! I have been thinking hard about the following but I can't ...
0
votes
1answer
25 views

How can I sample objects color based on position and apply to an object in a shader?

I think what I want to achieve is similar to how grass can get the terrain color so it looks more blended, though this is not what I will be doing. My texture is a palette of colors: I have created a ...
0
votes
0answers
12 views

Interactive texture modification (such as fluid mixing) in Unity [duplicate]

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 ...
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
1k 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
131 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
166 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
29 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
74 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
30 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
46 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
19 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
118 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
69 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
29 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
110 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
47 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
90 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
58 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
22 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
64 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
47 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
35 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
33 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
35 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
484 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
126 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
68 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
107 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
166 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
229 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
148 views

Unity depth shader not giving correct values

I did the following shader (looked up and changed for my needs): ...
0
votes
0answers
141 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 ...

1 2
3
4 5
36