Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [shaders]

a computer program that runs on graphics hardware and provides a high degree of control over how scenes are rendered

0
votes
1answer
195 views

Unity - Fading mesh particles

Is there any ways to fade mesh particles like color over lifetime method with addictive shader. I have little to no understandings of shader coding, and fade rendering issue kicks in even with vertex ...
0
votes
1answer
576 views

How to create pixel perfect noise shader?

I would like to know how they created the pixel perfect noise shader in monument valley 2 in that b/w level (example picture). I think it starts with a billboard shader, but I have no clue how to ...
0
votes
1answer
198 views

Wavy effect/shader in LibGDX

HaxeFlixel has a nifty built-in shader called FlxWaveEffect. Video Demo (Flash required) if you start the game and steer the player into an enemy. Usage (search ...
0
votes
0answers
799 views

How to implement a curved world effect without using a shader?

Curving your game world can be a very effective yet simple effect to add a lot of flavor to your games. This is mostly used in endless runners and other mobile games, but also used in big titles ...
0
votes
1answer
811 views

Noticeable quality loss on texture captured using Graphics.Blit vs Shader output directly to a mesh

I'm currently using a GPU shader to generate a texture. I want to be able to capture the output of this out I'm using Graphics.Blit to output the shaders result to a ...
0
votes
1answer
98 views

How can you pass a large amount of textures or equivalent to the fragment shader in OpenGL?

I am adding shadow mapping to a game engine I am working on. For this effect, each light source needs it's own associated shadow map cube texture. I am going to be exaggerated and say there can be ...
0
votes
1answer
130 views

How to create a depth-recording shader for shadow mapping?

I am attempting to implement shadow maps. I am first going to implement spotlights over directional lights (I am aware this is harder). Since I was already rendering the geometry, my attempt was to ...
4
votes
0answers
101 views

Writing a leather shader

I'm trying to write a leather material shader. I have a normal map, bump map (grayscaled), specular map, diffuse map, cube maps. I have done the following ...
69
votes
1answer
7k views

How can I replicate Quantum Break's distortion particle effect?

Quantum Break has this fantastic particle effect, it's a distortion effect like broken glass. I want know how I can replicate this effect? You can see it below, and a full video is available on ...
4
votes
0answers
93 views

Phantom objects in ray tracing

I am attempting to add volumetric shadowing to an application I am working on to test some things. For this effect I wrote the following fragment ...
0
votes
1answer
337 views

Camera and multiple shaders

What is the best way to handle a moving camera inside many shader programs? I believe most games need to have one common projection matrix inside all shader programs to use a moving camera. Currently ...
0
votes
0answers
59 views

Change something that affects everything under -Y value to use normal orientation instead

I'm starting to get a grasp of shaders and I have this one from here and would like to modify it so that instead of just affecting the area under a specified Y value it can be depending on how the ...
2
votes
2answers
188 views

In a shader, what is the meaning of “<some float>.xy?”

I'm trying to research this in Unity manuals online, and I'm finding plenty of references to .xy but not sure what it is. While this is for Unity, I'm assuming ...
1
vote
2answers
416 views

Creating color texture from greyscale heightmap in shader

I'm trying to create a shader that takes a grayscale map as input, and returns a colored albedo that I want to use as texture for my PCG planets, I think that the code below should work, but it only ...
71
votes
1answer
9k views

How can I make a “wet surface”/“shallow puddle” shader in Unity?

In my game I need to create dynamic water puddles but I cannot find a tutorial that shows how I can make such an effect (an example of which is shown below). How can I do it?
1
vote
1answer
527 views

Unity shaders - blend edges of tile textures stored in an atlas

I'm creating a tile based game. The tiles can have different textures. All the textures are loaded at startup and dynamically packed in a texture atlas (this is done to make modding easier). Each tile ...
0
votes
1answer
307 views

OpenGL Tessellation Shader Not Working

I've been trying to play around with tessellation shaders in OpenGL for a couple of hours now, but I'm having trouble to get it to work. I've been following The Little Grasshopper Triangle ...
1
vote
0answers
145 views

Recreating A Puzzle Effect Using Stencils

I'm trying to recreate something I saw on reddit a while back. I tried rendering camera output onto planes, but am not getting the results that I want -- this is basically what I'm trying to recreate: ...
1
vote
1answer
488 views

Unity procedural skybox shader texture stretching

I am using the procedural skybox shader that Unity provides, but have tweaked it so that I can have a cloud texture. The problem I have, is that the texture is not tiling correctly, even though it is ...
0
votes
0answers
58 views

How to put triangle information into a glsl shader for dynamic shadows?

I am experimenting with how much I can push the GPU with clever optimizations and correct use of hardware, so I know this may lag my computer a lot, that's not the issue. Currently my goal is as ...
1
vote
0answers
185 views

GLSL: sphere galaxy

I'm trying to draw sphere galaxy mentioned in this tutorial: http://martindevans.me/game-development/2016/01/14/Procedural-Generation-For-Dummies-Galaxies/ Here is an image for reference: Basically, ...
0
votes
1answer
55 views

Creating “Tube Lights” and switches

I've been banging my head at this for quite some time now. I'm creating a 2D stealth game and want to implement "lights" in rooms like in DeadBolt, and I cannot think of any way how I must go about ...
2
votes
2answers
2k views

What can I do with the 4th component of gl_Position?

When I set gl_Position I usually assign it such as gl_Position = vec4(in_position, 1.0) where ...
101
votes
1answer
15k views

How can I create a “see behind walls” effect?

Divinity: Original Sin 2 has a beautiful see-through system. When I go behind walls, a splash mask will appear, and when I move around the game, it changes. It's like a dissolve shader, and has a ...
1
vote
1answer
49 views

Customising character appearance though textures

At the moment I am contemplating adding character customisation to my game, however I am unsure what approaches are available when it comes to using textures/decals to add facial features (like facial ...
2
votes
0answers
56 views

Game objects all blue underneath

I have an empty scene with a single object in it, a cube. The cube renders initially as pink, when it has no material attached. When I attach a material though. Any material. Odd things happen. I ...
2
votes
2answers
673 views

Getting scene normals in Unity

When I get the depthnormals with the shaderreplace script, it just replaces all the shaders in the scene and uses the meshes geometry to calculate the normals, ignoring the normalmap textures applied ...
8
votes
1answer
2k views

Moving texture according to position in shader

Divinity Original Sin have beautiful particle effect , When I move around game I see galaxy through particle that move according to my position.how can I make like it? you can see this effect here: ...
2
votes
1answer
1k views

Achieving 2D Lighting for Terraria-Like Game

I'm trying to achieve the fog-of-war lighting style that Terraria and Starbound have. Terraria's lighting system seems to be more blocky/tile based, but Starbound's is a lot more smooth. The Desired ...
0
votes
1answer
771 views

Change shadervalues for different Meshes in Three.js

Hey I am writing a Shader for Three.js. My goal is to have multiple objects with the same shader and each object should have a color set on the object that is then given to the shader. The goal is to ...
11
votes
3answers
2k views

How can I make natural rain drops on screen?

I'm trying to make rain effect drop with metaballs and trail on screen.I find a clue in shadertoy but I didn't understand how implemented: https://www.shadertoy.com/view/ltffzl unfortunately it have ...
3
votes
1answer
709 views

How can I replicate the look of Zelda: BotW in my own shaders?

At the moment I really want to develop a game with a similar shading technique that is used in Zelda BOTW however I do not know how I can achieve that look? To me it looks like they are using a cel ...
4
votes
2answers
360 views

How to run Shader after Build without problems?

I always have problems with shaders, while my partners avoid using custom shaders because it always causes problems. When I write shaders I have to test it in many devices and optimize every time. In ...
0
votes
1answer
396 views

how can I make delay in shader?

my effect is loop but I need have delay between each flash effect.i don't want use c# code because i believe there is easy way to implement delay in shader. ...
0
votes
1answer
826 views

Using a dissolve shader as well as the Standard shader

I'm applying a "burning" dissolve shader to an object which uses the Standard shader already. Because I need the Standard shader for better lighting, etc, I looked into how to use them "both" or how ...
2
votes
1answer
2k views

Unity post-processing effect conflicts with UI Image blur shader

I'm unable to use a UI image blur effect when I'm also using a grayscale post-processing effect on my camera. I activate the grayscale post-processing effect when the game is paused, which is also ...
6
votes
1answer
369 views

Animating compression wave shader which uses image for displacement map

I've been testing a variety of shockwave or ripple effect shaders, and spent time on this cleaned up and improved version on shadertoy. I'm not entirely satisfied with that because it produces an ...
2
votes
2answers
426 views

Spherical fragment shader shockwave regardless of screen dimensions

I've been working on a shockwave shader based on some examples I've looked at. My primary issue is that the screen/resolution dictates the shape of the shockwave. I need it to be spherical, but with ...
5
votes
2answers
123 views

Counting shader animation “iterations”

I'm writing a shader that animates "pinching" an image and releasing it. It's similar to this shader on shadertoy. One issue I have is that my shader should only "animate" once - meaning the image ...
4
votes
1answer
369 views

Gravity well shader for Unity2D

I'm trying to find or create a gravity well distortion shader for Unity. I've been looking around and all I can find are "lenses" which bend space around a black hole. I'd rather have a distortion ...
5
votes
0answers
97 views

How many Pipelines in a Typical Rendered Scene DirectX12

I'm learning DirectX12 right now and I'm missing a few pieces of the puzzle in my own head on the overall structure of how you would setup a game. Specifically, I'm trying to get an idea of how ...
1
vote
0answers
105 views

How can I rolling plane by vertex shader?

I have plane that i wanna roll it by vertex shader like this: https://www.desmos.com/calculator/mrfrugwvm5 this is my shader: ...
0
votes
1answer
89 views

Calculating correct normal direction from multi-variable function

I am working with a plane model which I am offsetting the vertices on the up axis to look like waves by using the function: Sin(vertex.x * frequency) * amplitude + Cos(vertex.y * frequency) * ...
2
votes
0answers
121 views

Generating color for mesh in Texture3D or shader?

In Unity, I'm trying to choose between two ways of procedurally colorizing meshes (with vertex color). The main concern here is performance, knowing that my software is already GPU bound (more ...
0
votes
1answer
779 views

blur and gray shader

I'm new to shaders. I am trying to combine the blur shader and the grayscale shader. Here's what I have came up with so far: ...
1
vote
0answers
271 views

How to create inline glow shader for 2d polygon in CG using Unity Shader Lab?

So here is what I am trying to do. Given irregular polygon (on the left) I would like to be able to create a shader that would resemble Photoshop inline glow effect with opaque fill (on the right). ...
0
votes
1answer
213 views

How can i prevent objects faces clipping over other objects faces?

I have a naked body, I have a bra over that body, I have a suit over that bra. Since the objects arent accurate enough, i get ugly "clipping". Is there a way or method I can prevent this? (except ...
0
votes
2answers
177 views

Compiled shader not working?

I did a simple pixel shader that makes the texture monochrome, and it works perfectly when it is precompiled, but not when compiled (returns E_FAIL). The effect was compiled using fxc.exe with these ...
1
vote
1answer
659 views

Modifying Alpha in Unity Standard Shader

I'm trying to create a shader in Unity with a slider that can adjust the transparency. (This is the first step toward something more sophisticated.) I try to do this by setting the alpha of the ...
2
votes
1answer
221 views

One Giant Shader VS Many Small Shaders

I am building forward rendering engine combined with atlas shadow map technique. My goal is to build an engine that is capable of rendering similar scenes from games such as.. Doom Overwatch So I ...