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

1
vote
0answers
447 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
252 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
135 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
442 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
63 views

Why won't my triangle draw in OpenGL C#?

I am currently working on messing around with OpenGL and graphics programming and decided to work on OpenGL in C# using the OpenGL4CSharp Library and SFML .NET library. I am currently following this ...
0
votes
0answers
53 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
163 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 ...
100
votes
1answer
14k 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
521 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
1k 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: ...
0
votes
0answers
112 views

Libgdx Shaders TMX

i've been struggling with adding shader on the world map. Since i would like to have night time in the world and i stumble across shaders. Problem i got is that shaders is only being applied to the ...
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
713 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 ...
9
votes
2answers
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
643 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 ...
3
votes
2answers
342 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
339 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
729 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
1k 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
341 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
388 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
121 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
349 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
96 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
93 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
83 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
108 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
697 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
239 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
0answers
173 views

top down shooter grayscale field of view

I am looking for a solution to make something that looks like this: The stage I got to is something like this: So my question is: Is there a shader out there that would do the grayscale job?
0
votes
1answer
172 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
153 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
509 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
198 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 ...
0
votes
1answer
61 views

Having 3D material properties depend on shader

Disclaimer: I apologise if this is somehow a duplicate question or is unclear. I am in the process of writing a 3D scene renderer/editor in C++ using the OpenGL specification. It is actually going ...
0
votes
2answers
212 views

Why doesn't my simple HLSL shader work?

I'm using Monogame to draw 2D primitives to the screen. To do that, rather than use included structures like VertexPositionColor, I wrote my own vertex class for 2D....
-1
votes
1answer
90 views

Guide for beginner in shaders [closed]

first of all i know nothing about opengl or shaders and now tried to learn but im stuck little bit, I've downloaded some shader tutorials from unity learning center but i can't completely understand ...
1
vote
1answer
230 views

How to draw lines with fountain pen effect in Unity?

I'm working on drawing lines in Unity, I've already implemented smooth line drawing with LineRenderer. But I need lines have ...
0
votes
1answer
112 views

Different shader programs but same buffer drawing

I've setup 3 different instances of the same shader code (e.g. I've compiled the code into 3 separate programs) For each program, I've gone through the whole route of something like this: ...
1
vote
1answer
704 views

Can't Unity draw fine and smooth line?

I'm working on drawing lines in Unity, but find there is no way to draw clear, fine and smooth line in Unity, neither ...
1
vote
1answer
78 views

Per pixel normal mapping resulting in static on normals starting on Z axis

For the past week I've been trying to implement bump mapping in DirectX 11 using the Frank Luna's '3D Game Programming with DirectX 11' book. I got it working until I tried to add a flat 2D plane ...
0
votes
3answers
158 views

Do I need to “use” the shader program when buffering and defining VBO data?

I'm trying to wrap my head around the relation between a GL "program", and the VAOs, buffers, textures, etc. I don't quite understand when I need to "use" my shader program, and when (if ever) I need ...
-2
votes
1answer
566 views

Shader FloodFill Alogrithm

I'm new to openGL and shaders. Is there a way to implement shader algorithms for floodfills? Basically, I have a picture with outlines and i want to fill the insides of where the user touches it
0
votes
1answer
655 views

Drawing a grid over a terrain using a mesh - Shader Depth and Z-Buffer

What I'm trying to achieve is rendering a (huge) tile grid over a terrain. For that I'm using a generated mesh of quads, one for every tile, whose vertices Y value is the same of the terrain to "shape"...
-4
votes
1answer
102 views

Shaders vs renderers: Photorealism

What is Renderer? How it is different from a shader? For Photorealism which one is more important?
0
votes
2answers
153 views

Isometric - Do I need to add shade to the sprite images itself, or render shade during runtime?

So I'm drawing sprites right now for my game world. It's going to be isometric, not rotatable, 2.5 Dimensional. Do I need to add in the shadow to my sprites right now (which would mean to have 5~6 ...