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

What makes a shader function with a LineRenderer?

A LineRenderer has both Material and Color properties. But many shaders do not work, ie the line will not respect the Color property, or the line will show black (regardless of the materials having ...
0
votes
0answers
22 views

Blur shader showing Pink color?

I got this shader from GitHub page. In my scene, which is "LWRP" the image that should appears blur effect, it showing Pink color and there is no effect. Here is the shader script. ...
1
vote
0answers
36 views

Whats the least expensive way to play video in unity?

Alright, Ive asked this various ways but my situation is I have several (over 100) objects that have screens that need to play animated videos on them. There does not need to be sound, but this is for ...
0
votes
0answers
11 views

Unity 2019 Extremely Reflective Foliage

I've been working on a project involving a lot of foliage and I needed translucency so I upgraded to the latest unity beta to get access to the new features and the HDRP (which is still available on ...
0
votes
0answers
15 views

Compiling a simple shader in PyOpenGL

I am starting with OpenGL and I am translating the code from learnopengl to python and for some reason I am not being able to compile the Vertex Shader. This is all that I have: ...
1
vote
1answer
34 views

HLSL equivilant to “Object” data from “Texture Coordinate” node in Blender

I mocked up a shader how I wanted it with the node editor in Blender. Now I'm trying to write it in HLSL. In Blender there is a node group called "Texture Coordinate". If I use the "uv" node from the ...
1
vote
1answer
50 views
+50

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
45 views

Alpha is not working in diffuse light shader

I am following this tutorials series on rastertek.com and I got a bit stuck on the Diffuse Lighting Tutorial. Particulary, the part that does not work for me is alpha channel of the light color. Here ...
1
vote
1answer
49 views

Planet Surface Rendering: Precision issues

I have been experimenting with C++ and OpenGL, and I am currently writing a program that renders the surface of a planet; specifically, our moon. It's a modified version of the GPU Gems implementation ...
1
vote
0answers
32 views

Trying to convert Unreal shader graph to Unity, what nodes are a close equivalent in the Unity shader graph?

I am trying to convert an Unreal shader graph to a Unity Shader Graph. https://api.unrealengine.com/udk/Three/VolumetricLightbeamTutorial.html I am struggling with understanding which nodes to use ...
0
votes
0answers
14 views

Trees made with Unity's Tree Editor have 2 sides: 1 bright and 1 normal

(The directional light lits the side shown at the right side of the picture.) I tried changing shaders, but that just makes the bright side fully dark. I tried changing Ambient Occlusion but that ...
0
votes
0answers
25 views

How to access lighting data of a different Pixel in a Unity Shader?

I'm trying to write a shader with "block/tile-wise lighting" for sprites (Coloring entire objects/tiles with the same light & brightness). I've started with modifying the /Sprites/Diffuse shader. ...
1
vote
1answer
33 views

How to access Lit shader properties through code?

Currently i'm using HDRP in my project, so i have a question. How can i access Lit shader properties through code ? Or where i can see names of variables in this shader ? For example:
0
votes
0answers
24 views

How to stack shaders in Godot?

I have a CanvasLayer singleton that I am using for transition effects between scenes in my game. This CavasLayer contains a ...
1
vote
1answer
62 views

Morphing a 3D model into a sphere or cube using a vertex shader

I want to morph between 3d models.I found a simple OpenGL code to morphing In Graphics Shaders: Theory and Practice(page 456) but I couldn't Implement it correctly in unity. ...
1
vote
1answer
52 views

Does Unity3D custom shader use its default GPU or CPU skinning automatically?

I'm writing my own shader in mobile, but was wondering if it uses default GPU or CPU skinning feature in Unity3D? I'd like to use GPU skinning and already enabled GPU skinning. Is there any way to ...
0
votes
0answers
27 views

Wind Trees from Book of the Dead in a Separate Unity Project

I want to make wind work on a project separate from Book of the Dead demo. I've been able to import the tree assets, plus the WindControl script and two helpers ...
1
vote
0answers
51 views

Draw a perfect circle in UI

This is the problem I have. I have created a shader that draws circle. But depending on the distance from the camera thickness changes. Is it possible to keep thickness constant?
2
votes
1answer
34 views

How to detect syntax error in unity shader scripting

Hi. I'm following shader scripting tutorial and I often make syntax mistakes. like other languages, can you have visual studio automatically underline with red color?
11
votes
1answer
227 views

How can I make outline shader like “Life is Strange”?

I want to make sketch shader like life strange. shader has two part: 1.animated dashed line 2.noisy outline I like to know how can I make noisy outline? see outline of objects First I tried to ...
1
vote
0answers
22 views

Hard coded triangle in HLSL geometry shader doesn't show on screen

In Unity I'm planning on using a geometry shader for processing points into quads and can't quite figure out why I'm not getting output from my geometry shader. I've edited it down to a minimum ...
1
vote
0answers
27 views

Unity Shader: Make water on terrain transparent without fading

I want to create a shader for a terrain to make the water fully transparent but not invisible or faded. In this example I would want the purple square to be seen through water but not through the ...
2
votes
0answers
61 views

Trying to get Vertexshader to work Monogame 2D

If I don't use the vertex shader, it gives me white textures which is what the default color is. Once I add the vertex shader, the screen is black. I figure it is something wrong with the Matrices I ...
1
vote
0answers
30 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
0answers
23 views

Blinking color shader

Currently i'm using Unity3D, and i want to make one variable blink along time in a fragment shader. Now i have code like this: ...
0
votes
1answer
20 views

Setting shader by script?

I make s shader file and drop it on object with material. I wrote this script to run shader when press Space button. All is good except that script not load shader when run the game !! I have to do it ...
0
votes
1answer
36 views

Godot: error(10) expected '(' after Identifier

When trying to write up a new shader for a material, I've been trying to create a variable to use to alter speed and test animation. Now, the below outputs fine until I try to assign a value to number....
0
votes
1answer
52 views

How can I transform a world space point to a camera's screen coordinate?

I'm trying to transform a point in fragment shader from world space to screen coordinate of a second camera. Not the main one. I think I know how to achieve that to the main camera, but I'm ...
0
votes
0answers
43 views

Adding drop shadow to text in Minecraft

I would like to know how to take a text object rendered using the default Minecraft font renderer and add a drop shadow behind it. I believe what I need to do is make a copy of the text object, ...
0
votes
0answers
38 views

How I can create HQx or xBR pixel art upscaling shader in GLSL?

I want to make an image scaling shader in OpenGL Shader Language... but I have no idea how to make it. I want to implement either the HQx algorithm or an xBR variant. My game engine is GameMaker: ...
0
votes
0answers
29 views

How to make plane thick with shader in Unity?

I use plane as wall, door,... using Double Sided Shaders. I just want to make my wall, door,... thicker so it doesn't look like paper, I don't need to make it look super realistic. I wonder if I can ...
0
votes
2answers
63 views

Shader vs Working with Pixels

I am working on 2d games only. In that context, when would I ever need to use a shader rather than simply manipulate the pixel-data of an image? For example, I have an image of a car and I want to ...
1
vote
0answers
26 views

Why is the clear coat second normal disabled by default?

As described here, in order to set up a clear coat material with normals for both layers in Unreal Engine 4, it is first necessary to enable this feature in the project settings: Why is this not ...
1
vote
0answers
94 views

Unity blit() not writing to RenderTexture

I found a nice Gaussian Blur shader online and am attempting to use it to blur a render texture using blit(). However, the render texture remains unblurred. I know for a fact the blur shader works as ...
0
votes
1answer
85 views

How to add emission to texture in shader?

I want a texture to emit itself by 1, not more. In Standard Shader I enable Emission and set texture to Color and Color to 1. I don't need emission to go beyond the object, I only need the texture to ...
0
votes
1answer
26 views

Creating materials in modeling program vs in Unity: when to do either?

This is something I should know the answer to by now, so I'm asking to clear up the gaps in my knowledge: As I (re)learn about shaders, specifically in relation to Unity, I see all sorts of ways to ...
0
votes
0answers
26 views

Performance of static const variable in shader

I am using static const variables based on uniform variables. For example: ...
0
votes
1answer
56 views

Why do I get an unexpexted token error while compiling this shader?

I get the following error syntax error unexpected token vertex I am still learning shaders so I can't really understand the reason for this error. How can I make this shader work? ...
0
votes
1answer
86 views

Texture Atlas and HLSL Shader for sprite tiling

I am trying to create a shader that allows to tile a specific region of a texture. This seem to be a common need however I can't seem to find any information about how to get this effect done. The ...
1
vote
0answers
80 views

How can I make Matrix Rain?

I want to make 3d Matrix rain like this shader that you can rotate camera.I tried to convert this shader but It have many calculations that it's expensive inside game engine.then I tried to make this ...
0
votes
1answer
81 views

DirectX 11 Compute Shader error DXGI_ERROR_DEVICE_HUNG

I am trying to use a compute shader for ray picking technology. My shader accepts: vertex buffer of all models index buffer of all models a buffer of transformation matrices of all models Offset ...
0
votes
0answers
99 views

Don't Render always on top Unity world space canvas UI

I have a World Space Canvas where I have a text object which is always rendering on top. I checked that it has UI/Default Shader attach. Is there any way available ...
1
vote
0answers
40 views

Artefacts in SSAO Shader

I am having trouble with my Screen Space Ambient Occlusion shader. The objects in the game have the correct occlusion applied to them, however the occlusion flips depending on the angle of the camera:...
1
vote
1answer
152 views

How do I make my glsl RGB displacement map look like this

I want to use a RGB texture as described in this video here. Here is my texture so far. The author says the first line has no R channel and ranges from B = 0 to B = 255. While each other line has R ...
0
votes
0answers
70 views

How to get Pixel Coordinates of certain colors in a Texture?

I have a relatively big Texture, and I try to find a certain color pixels pattern: eg. White, Black, White, Green . They are lying next to each other, If I use Texture2d.Getpixels() on every pixel ...
0
votes
2answers
48 views

Extracting individual components of a vector in the Source Shader Editor

I'm using the Source Shader editor and would like to mask a vector output to one or two values, yet there is no existing mask node, as far as I can see. What HLSL code should I use to output what I ...
0
votes
0answers
55 views

How to create a shader for this hue change effect?

In this cut scene from Shovel Knight, the individual pixel art tableaux don't merely fade in and out. Rather, they fade in and out as well as undergo various hue changes. Here's an example: The ...
0
votes
1answer
125 views

Multiple Colour Gradient Lerp

I want to return a colour for a position t, given an arbitrary number of colour stops - a stop is comprised of a position, and a colour. Like selecting a colour from a multiple-colour gradient, ...
1
vote
1answer
33 views

What does vertex:disp and tessellate:tessEdge mean? [Shader] [Unity]

I came across the following declaration on unity tutorial #pragma surface surf BlinnPhong addshadow fullforwardshadows vertex:disp tessellate:tessEdge nolightmap ...
0
votes
0answers
101 views

How can I convert 3D mesh to SDF?

Previously, I found an useful article that explained how to convert 3d mesh to SDF easily. I want our artists to be able to easily convert from polygonal data to SDFs with little-to-no effort. ...