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
2
votes
2answers
160 views
+50

Seamless 2D wrap-around effect

I am trying to show multiple images on a grid system which are randomly generated and the grid is moving from right to left. What my client wants is when a part of a picture goes off the left edge of ...
4
votes
1answer
252 views

Weird shader behavior on different devices

I'm trying to combine an ordinary shader with a Single Distance Field shader (for fonts and scalable icons) into one shader program. The idea is simple - if uv.x is less than 1.0, it is drawn as ...
0
votes
1answer
59 views

Strange GLSL performance problems

I'm having weird performance problems with a GLSL shader I'm working on. This small example fragment shader: ...
11
votes
3answers
3k 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 ...
0
votes
2answers
76 views

2D Camera Movement Temporal Reprojection

Having an Orthographic Camera with its View Projection Matrix given from the current and last frame, how to reproject the previous frame to the new one?
0
votes
0answers
20 views

Depth Mask Shader

How can I use this in Unity to render something only at a specific depth, for example : I have small boat on the water surface but I see water surface inside boat.
1
vote
1answer
467 views

OpenGL Bump Map — Texture artifacts ?

I am learning OpenGL (and learning the math behind it) and I'm making a simple OBJ viewer, nothing fancy. I have diffuse, specular and ambient light/texture working fine and now I am implementing the ...
1
vote
1answer
51 views

How can I update my materials to work with LWRP?

I'm using Unity 2019.1.6f1. When I open a new scene with the LWRP template project, I see errors from all materials in the scene. For example, the Jigsaw appears in my scene but in console window I ...
3
votes
2answers
202 views

Fine tuning light shader mechanics

I'm currently trying to implement the lighting technique described in this article. I've done pretty much exactly what is done in the article. My technique is the same, and my shader is the same. ...
2
votes
2answers
4k views

Writing and reading Computebuffer in a Shader

I'm trying to write into a Computebuffer in the fragment shader, but it doesn't work. Its pretty hard to get the Depth-Value in the Compute Buffer, so it would be so easy to just use the Pixel/...
0
votes
1answer
17 views

How can I apply UV mapping in parent space?

I'm trying to apply UV mapping in parent space - ie. taking into account the object's own transformation matrix but no matrices further up the transformation hierarchy. For example, I'd want to be ...
0
votes
1answer
19 views

Can't Create High Definition Render Pipeline Asset in Unity (Create > Rendering Doesn't Exist)

I've upgraded my project to Unity version 2019.3.0a11. It complains and can't load scripts, mostly because it can't seem to load the original HDRPipeline. I want to make graphics display properly. In ...
0
votes
1answer
399 views

Overlap color between objects

I'm currently trying to build a game with Ogre3D that is basically a moving vehicle that leaves a green trail (2D manual mesh) in it's path, what i'm trying to achieve is exactly what this image shows:...
0
votes
1answer
133 views

why my shader is black in the game mode?

I used this useful blending modes It's good but it just work in Editor mode. what is the problem?! ...
0
votes
1answer
781 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"...
0
votes
0answers
19 views

OpenGL Bump map issues

I'm using Core-Profile OpenGL version 3.3 and I'm trying to implement bump mapping. I'm loading the model thanks to assimp and adding 2 textures to the material one for the diffuse color and one for ...
2
votes
1answer
567 views

Unlit Node Shadow Shader Graph

How to make unlit node cast shadows? Is is possible with the current state of Shader Graph in LWRP? In this great article Toon Shader OP grabs pass from VertexLit shader. Is something similar ...
0
votes
1answer
149 views

Issues to display a texture loaded with libPNG with opengles 3.0

I'm trying to load a texture loaded with libPNG on a XY coordinates. I know the width and the height of the texture (32x32). The texture is already loaded successfully and I have his Id. Here is my ...
0
votes
1answer
193 views

BRDF Incorrect specular highlights

I'm currently attempting to implement BRDF lighting, and am hitting a bit of a snag with my specular term - the specular highlights aren't rendering correctly. To make things simple, I'm using a ...
10
votes
1answer
7k views

How can I create a height-based volumetric fog?

Recently, I have been looking for techniques to make volumetric fog on some Y position level of the game world. But all I have found are some fog made by using particle system or built-in engine fog ...
0
votes
1answer
214 views

World space coords for 2d images

How can I make an 2d image using World space coords with a shape? Like a circle instead of a quad.In 3d you can modify the vertices but if I want a smooth circle there will be too much vertices. What ...
0
votes
1answer
148 views

Unity HDRP Testing - Scene View Issues / Lighting / Shaders / Shadows

Yo Guys. Makings this dope, GlassChess Game, Wanted to try out the new HDPR in unity 2018, add the package and volia, its working. (done all settings) So I used custom glass shader before trying out ...
0
votes
0answers
33 views

Unity Default Shader Greyed Out

I created a pland in Unity 3D and then tried to alter the material. I looked at it's material component, but all the options are greyed out! how do I fix this problem?
0
votes
1answer
30 views

how to make UI material ignore scene lighting, have same brightness as albedo?

I have a material on a quad surface object that is parented to a canvas for a pause menu. The material is animated (materials on UI elements such as canvases cannot be animated because of [reasons], ...
1
vote
1answer
265 views

How to write a PBR Unlit Shader in Unity?

I have a REALLY specific case here: I have an Texture (a webcam), that is used by a shader to pickup a few x,y colors at the cordinates, and renders to a ...
1
vote
0answers
83 views

2D Shader for affecting lights based on y-distance

I've been struggling with this problem for a few weeks (mostly because I'm so new to shaders), but I have an angled camera for my 2D game that uses lights. I saw this link about the '3D light ...
0
votes
1answer
40 views

Rotate mesh to normal

I have some instanced geometry (basic tube meshes) laid out in a grid, and I have a noise texture (normal map) that I want to use to rotate my instances with. So head pixel in my texture is a normal ...
1
vote
0answers
15 views

pixel displacement with shader

Having started learning shaders and experimenting with tools like Shadertoy, I am attempting to make stereoscopic (anaglyph or autostereogram) shaders as an exercise. For this, I need to displace each ...
1
vote
1answer
107 views

How can I achieve this top-down water effect in Unity?

I want to create a virtual fish pond similar to this in Unity (full video): The ocean floor and fish are not a problem, but the effect of moving water that displaces the content below the surface is ...
3
votes
4answers
2k views

How to render grid properly, especially over distance?

I'm drawing a grid, pretty much like one can see in the Unity editor itself or any 3D-editor, many 3D-related applications and some games. But it doesn't look pretty in my case. I put a few random ...
12
votes
2answers
4k views

Rorschach ink blot (aka Psychology test pictures) shader

(source: bonnefil.com) I want this magnificent pattern to be in my game. So far I have figured out... Draw one side, then render it twice left and right. How do I render this pattern on one side? ...
3
votes
1answer
74 views

OpenGL Fragment shader: not all fragments showing colors

I'm writing a simple 3D renderer and while the model loads fine, the colors are off. Quite a few fragments in the model show no color at all. Here is the render: The locations of the blacked out ...
2
votes
1answer
62 views

OpenGL Textures: Texture contains color lines when object is further away that some distance

I tried searching on the web but couldn't find a reason for this. When I render an object close to the camera, the object and texture renders fine. But further away from a fixed distance, it starts ...
2
votes
0answers
71 views

How can I make a tendril flame like aura visual effect?

I am a bit new to UE4 and I'm trying to get a tendril flame like aura like the picture below. Does anyone know how I would go about this? Should I use post processing or particles?
1
vote
1answer
59 views

Is there a way to set a shader define in Löve?

I know I can use shader:send() to change variables, but is there a way to set/change a #define?
0
votes
1answer
2k views

Using ShaderGraph for UI elements with transparency

I am trying to design some UI elements using shader graph. In this case specifically a lifebar that is transparent where empty. For a normal lifebar with a filled and empty color I got it working ...
1
vote
0answers
29 views

Modify Unity's New 2D Renderer for the Lighweight Render Pipeline

I would like to use the new 2D renderer available with the LWRP to take advantage of the 2D lights. I would also like to replicate the things in this video - basically, I want my character to be ...
0
votes
1answer
4k views

UV World mapping in shader with Unity.

Please refer to this Answer. DMGregory script is working for me, although I have a problem I can't fix because I don't talk shader :) The tiling will be applied correctly on geometry aligned on XY ...
1
vote
1answer
149 views

How to hide objects behind an invisible plane?

I am using Unity 2019.1.4f1 (personal) in regular 3D mode. I want to make a material for a plane that will cause everything behind that plane to be invisible. I want a character who steps through a ...
3
votes
1answer
92 views

Shader is distorting a Texture of a sprite it's working on

I've been testing out fragment shaders in SFML, trying to learn how to write and use them and I've run into a recurring problem. Every shader distorts the texture. Top left is the distorted test ...
11
votes
1answer
8k views

How to implement this kind of ripples with a GLSL fragment shader?

So I have already implemented the reflection part: ...
1
vote
1answer
56 views

rotation matrix problems - opengl and own types

In an effort to learn things deeper I'm writing my own mathematics for the first time instead of using libraries. As far as I can tell my matrix multiplication is correct, and translation and scaling ...
0
votes
0answers
31 views

How to add a fluorescent effect on an image in Unity

I have recently been attempting to create a true on-screen representation of a fluorescent orange colour on an image. Whereby, I believe post-processing with unity will deliver the best results. Thus,...
0
votes
2answers
143 views

Limit Color Pallete Using Shader (Unity)

Basically, what I want to do is take a primary input image texture (which is a render texture in-game) and a secondary pallete texture (contains X number of colors, and is X by 1 pixels in size). What ...
0
votes
0answers
194 views

LWRP Custom Shader Graph material casts no shadow

I created an empty Shader Graph by clicking Create -> Shaders -> PBR Graph. I created the material for this shader and assigned it to my game object, but the object does not cast a shadow. If I ...
1
vote
3answers
108 views

Spatial Jitter problem in large unity project

I have a very large environment where i am getting very weird view of objects as picture given below: As you can see there are black lines/spot, maybe the vertex lit problem. Currently I am using ...
0
votes
1answer
63 views

Unity Vertex Color Shader with Transparency

I'm trying to achieve a simple effect: I have a cube mesh and I want some of the vertices to change color. In this case, I want it to form some sort of a gradient where the unchanged vertices are set ...
0
votes
1answer
2k views

How to use a .mtl file in Unity?

I want to use a .mtl file to draw my objects in unity. Can I somehow convert a .mtl file into a normal Unity material? My .mtl file is like this: ...
0
votes
0answers
26 views

HLSL Texture Sampling Instability

I'm having some very strange behavior trying to calculate gradients in a shader. In both snippets, uv is the texture coordinate, duv is a float3 proportional to (1/width,1/height,0), c is tex2D(...
0
votes
0answers
63 views

Unity 3D HDRP - Making a hole in a gameobject by shader using stencil

Unity version 2019.1.2f1 HDRP project. I am trying to make a hole in a finished gameobject which has a material and shader don't want to interfere with, the point being this should work with any ...