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
0answers
104 views

How can I achieve simulated fluid surface deformation in a bottle?

I'd like to mimic this effect seen in Half Life: Alyx: I can't figure out what is going on here, people say "it is just a shader effect it isn't simulating anything", but I don't think that is true ...
0
votes
0answers
32 views

Making a 'Darkvision' Mechanic for a Unity C# Game, Not Sure Where to Start

I am endeavoring to make a small multiplayer dungeon crawler and would like to introduce a mechanic like 'Darkvision' from table-top RPGs. The desired effect would be that where there is some ...
0
votes
0answers
32 views

Unity Shader-Graph randomly tiled sprite

Lets say I have a shader with a clean white tile. Then I use it on a wall and tile it a few times. I also have a sprite with numbers. Now, is it possible and if yes how. To put a random sprite ...
0
votes
0answers
29 views

How to create fog effect over specific tiles in dungeon game

I'm working on a game in unity and I have areas the player cannot enter blocked off by game objects that are animated sprites that are supposed to look like fog. They don't look that great and I'd ...
0
votes
0answers
22 views

How to rotate a skybox cubemap using Unity Shadergraph

@Seyed Morteza Kamali solved his own problem of rotating a mesh cubemap with shadergraph here: How can I rotate cubemap in shadergraph? However, I have a starry night cubemap inside my Skybox shader ...
0
votes
0answers
16 views

WebGL Bulge Effect by Editing Library

I'm creating a game using CreateJS, a JavaScript library for (in this case) WebGL rendering. I have no experience with WebGL or WebGL shaders, so this is new territory for me. I want to create/add a ...
0
votes
0answers
13 views

Setting up a shader for RTS construction grid visibility (around cursor)

I've set up a shader, thanks to the good help of @DMGregory over at : Draw animating grid with terrain deformation and variable colors here's what I got so far : here's what it's supposed to look ...
0
votes
0answers
29 views

Does Unity provide access to a camera's Viewport Rect in a shader?

If I, for example, set a camera's Viewport Rect to W:0.5 H:0.5, is there some way to access that in a shader? Is there some way to extract it from unity_CameraProjection? I thought about comparing ...
0
votes
1answer
16 views

URP cant get Pixel Perfect Camera to work

I am currently using URP to add bloom to my particlesystems. The problem im facing is that I cant pixelate the game. I have tried to implement several methods to post pixelate (via shaders and render ...
0
votes
1answer
30 views

How can I rotate cubemap in shadergraph?

I know how to rotate cube map with legacy surface shader Shader Rotation Matrix: ...
0
votes
1answer
28 views

How to position/transform vertices for 2D UI in shaders?

I am building a 3D engine and have a rendering abstraction that focuses on writing shaders. Most my 3D shaders have gl_Position output like: ...
0
votes
1answer
14 views

Unity shader to pick 1 of 2 base colors for individual instances (picture)

I am building this scene in 3D using Unity 2019.3.13's Universal Render Pipeline. I have a block prefab that I want to instance, but I want to choose which are yellow and which are blue (you can see ...
0
votes
1answer
42 views

OpenGL color attachments don't work

Trying to implement GBuffer. Only gAlbedoSpec color attachment (GL_COLOR_ATTACHMENT2) works properly. When i try to use another texture (gPosition or gNormal) in ...
1
vote
0answers
19 views

How do we export blender material with shaders and blender texture to unity?

I've blender model, it has noise texture and glossy shaders, when I import it to unity, they are not the same. I tried both cycle and Eevee render and was looking for different ways to export the fbx ...
0
votes
0answers
11 views

How to make a per object horizontal scanline effect

I am trying to create a scanline / horizontal bar effect to use for specific objects instead of an image effect that covers the whole screen. So far i have managed to make this Vertex shader ...
-1
votes
0answers
21 views

How do I get quad shader on quake 3 player models?

See this video here: https://youtu.be/ZldYmyGRb_M?t=22 What are the files and functions and where do I place them in a custom player model?
0
votes
1answer
27 views

DirectX11 how to use textures and samplers in slots in shaders

I have a system to render many objects, but I don’t know how to render more tan one object with same shader, let me explain: I have a sphere and a cylinder, but both objects can be rendered by ...
3
votes
1answer
190 views

Infinite world floor grid shader

I am trying to render an infinite world floor grid, similar to this question. My project is using SceneKit with Metal Shading Language but the concepts are no doubt similar between GLSL/HLSL. Here ...
1
vote
0answers
53 views

In HLSL script, why does random function produce negative values?

I'm currently learning shader scripting with Unity HLSL language and this awesome resource: https://thebookofshaders.com I created my random method and a zeroOrOne method which just return 0 or 1 ...
1
vote
0answers
7 views

Custom shader with stencil breaks Unity built-in masking

my custom shader works like a charm for what I wanted it, but if it is referenced in the scene, Unity built-in masking stops working (both the Sprite Mask component and the rect-based Mask stop ...
0
votes
0answers
75 views

Prevent sprite from rotating with camera

I am creating a small 2d game and looking for a way, to prevent certain sprites from rotating with the camera. I could not find any settings that would allow me to do so, so my next best guess would ...
0
votes
0answers
28 views

Punching holes through a texture and making them regenerate back again in an efficient way

I'm working on a prototype where the user can use the mouse to punch holes through a texture, making this texture see-through in that area for a certain amount of time. After that time, the hole will "...
0
votes
0answers
22 views

Forward rendering and separation of shaders logic

I'm currently playing with writing a rendering engine and implementing a forward rendering pipeline. I have few doubts on how things should be implemented regarding the render passes as-well as the ...
1
vote
0answers
28 views

Can't get world position from reverse Z buffer

I'm using this solution to render using a reversed Z buffer. This looks fine and completely fixes all my z-fighting, but it breaks what I use in shader to derive the world position from the depth for ...
0
votes
0answers
25 views

Shader Graph, HDRP, Decal Projector

I made my own shader using HDRP Decal Master Node. But there's a weird border around my decal. Couldn't find a fix for it. Does anyone know why this border is happening and how to get rid of it. I ...
0
votes
0answers
23 views

Fragment shader for lighting in isometric perspective

What I'm trying to do is to achieve basic lighting in 2D from an isometric perspective. Here I have 2 textures that are used as tiles for the ground: Color: Normal map: I have a fragment ...
0
votes
0answers
12 views

How to stop custom normals from breaking on deform in UE4?

Can anyone clarify how companies like CyberConnect2 and Arc System Works keep their normal edited meshes looking so clean even with skeletal and morph target deforms in UE4? I get clean normals for ...
0
votes
0answers
17 views

In Godot 3.2.1 stable beta, in the 2D sprite shaders, how do I import a new PNG to test out those shaders?

I am using Godot 3.2.1. on Steam on Linux Mint. How do I take a pixel art image I've made and import it for using in Godot? I couldn't find it under Project.
0
votes
0answers
13 views

How variance shadow maps moments fall into Chebyshev's inequality

I'm having hard time understanding how the moments fall into place into Chebyshev's inequality. I'm reading about the technique in the following article. In the article the following is written: ...
0
votes
0answers
15 views

How would I replicate a gradient opacity barrier?

I would like to implement a visual barrier to gracefully hand-wave away areas the player doesn't need to see, such as the interior of a building while a door is momentarily opened. I am trying to ...
0
votes
0answers
21 views

How can I apply a fullscreen shader on a specific layer?

How do I apply a full screen shader on one layer of objects using LWRP/URP and shader graph? I want to pixelate only my particlesystems, but nothing else. I want the effect of pixelcamera, but only on ...
0
votes
0answers
18 views

Grid base movement shader

I am currently working on a turn-based shooting game (X-Com Western Theme). I really like the shader effect used in X-com which highlights the edge of the movement zone. But I cannot think of an ...
0
votes
0answers
47 views

Discarding GLSL fragment values not working with stencil buffer

I am trying to make a system where I can outline sprites, but I can only get it to work correctly when I use a regular-shaped texture. Here is what an outlined regular texture looks like: However, ...
0
votes
1answer
31 views

How to make a brightness-inverting shader?

I have a stone texture that looks great, except for one thing: it's very dark and I want white stone. I don't want to mess with the texture, because it's used for other things in the same project. ...
0
votes
0answers
10 views

Unity - Shader graph - How to recreate fill function in UIImage

I am trying to create a circular health bar that would deplete on the Y-axis. This works fine on a normal image with Image type filled and fill method - vertical but I want the texture to be animated. ...
0
votes
0answers
12 views

Masking a 3d object (Unity)

I have a 3d model of a glass and I want to mask a cube so that I can emulate water filling the glass. Any ideas on how I can do this?
0
votes
1answer
20 views

Unity mesh shader for outlining colour changes

I've written a shader to change colour on a deformable mesh's Z position. This is to create the effect of topographic/contour maps where the colour changes based on the height of terrain of the mesh. ...
1
vote
0answers
26 views

How can I make a shader that renders only the scene's skybox?

I am trying to replicate the following image: There are a few ways about doing this that involve camera stacking, layers, etc. Is it possible to create a shader that will only render the skybox?
0
votes
1answer
24 views

Figuring out the exponent in a spotlight equation from the angle of a cone

I followed a tutorial on how to build a spotlight using DirectX. This tutorial uses a point light equation plus a line of code to limit the light to the shape of a cone. I have everything working, but ...
0
votes
0answers
80 views

Shader Graph, add color outline to 2D Sprite

I'm having trouble creating a shader in Unity Shader Graph (2D) that fills the image from the bottom to the top and adds a color outline along the visible part of the sprite. I can fill the image and ...
0
votes
1answer
56 views

Star glowing shader graph

How could I make a shader graph that makes spheres that look like on this image? I'm new to shaders and I don't know how to do this. Also, if it's possible I would like a property to change the ...
0
votes
0answers
31 views

Unity2D coloring a map

I have an image with a bunch of colored regions, with each region corresponding to a province in my game. Each province also has a nation owner, which has a respective color. I need to create a ...
0
votes
0answers
44 views

Shader works in Editor but not on iPhone

I am using the next script for a painting asset found on this website. As you render the faces of your mesh in the uv space of the mesh, you are reconstruction the islands one triangle at the time. ...
0
votes
1answer
77 views

Unity shader graph: Texturing optimized voxel terrain mesh

I'm new to shader programming, so I decided to use Unity's shader graph for that. I have 256x256 texture atlas(like minecraft) with 4 16x16 block textures aligned on X axis I can successfully assign ...
0
votes
0answers
20 views

Shader intersection radiate outwards

I've been working on a water shader for a project I'm currently working on and have been trying to work on the intersections between objects in the water to create a foam effect that radiates outwards....
24
votes
1answer
5k views

How can I create an exclusive asset for multiple clients who all want basically the same thing?

This is more of a legal question than for example a coding question, but I hope that it's allowed as well. I recently started working as a freelance VFX Artist and do a lot of work with shaders and ...
0
votes
1answer
208 views

Draw onto an object's texture based on a raycast hit position in world space

I am trying to get the world position of a pixel inside a fragmented shader. Let me explain. I have followed a tutorial for a fragmented shader that let's me paint on objects. Right now it works ...
0
votes
1answer
84 views

How should shader be structured? (GLSL)

I've been writing, deleting and rewriting OpenGL programs in C++ but usage of shaders confuse me. I don't know how it should be structured. Scenario A: (In a world we have a sun, the sun should ...
0
votes
0answers
23 views

Gamma adjustment slider implementation

Various online sources talk in sufficient detail about gamma correction. By following them, I achieved a rendering pipeline that looks somewhat like this: ...
0
votes
1answer
47 views

Combining cylindrical Billboarding and aligning with velocity (unity)

I'm trying to make a custom GPU particle solution on Unity to fullfill some needs on my project, using compute shaders and custom shader + Graphics.DrawProceduralNow() to draw them. While I managed ...

1
2 3 4 5
33