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
0
votes
1answer
13 views

How can I tint the color of a decal in Unity?

For my game, I want some sort of indicator of if a space is walkable or not. To achieve this I figured I would create a decal projector and have it follow the mouse cursor around, displaying a decal ...
0
votes
0answers
16 views

Parallax mapping issue

Can anyone guess why this shader is only working from a top down view position (0.0, -1.0, 0.0). The parallax mapping calculation in the shader below is basically copied directly from learnopengl.com ...
0
votes
1answer
27 views

Why is the Unity pixel color read from RenderTexture bigger than 1?

The pixel color component read from the Unity renderTexture is bigger than 1.0 without HDR environment map. I'm writing a mini program to test the reflectance of Unity PBS. I use six pure white (1,1,1,...
0
votes
0answers
50 views

Rotate a texture around its center

I am tryna developing a little game library in C++ with OpenGl. I got stuck on the texture rendering step. My achieve is that to rotate the texture around its center. Now, I already know that the ...
0
votes
0answers
11 views

Why do we still see infinity vector space after normalizing World space? ( Unity Shader Graph)

Why do we still see infinity space after normalizing vector space? I assumed that some kind of effect would be obtained. As I see what happens to the space after it is normalized and how this ...
1
vote
0answers
31 views

How to make a cloudy looking planet?

In my game you navigate in space and you can come across planets. You can approach the planet and then land on it. At first I wanted the planets to be spheres, but then I realised how unpractical this ...
0
votes
0answers
7 views

Why do we see such effect after Normalize X value from Position Node ( in World Space )? ( Unity Shader Graph ) [duplicate]

Why do we see such effect after normalize X coordiante from Position Node ( in World Space )? How does it works? What Normalize node do with X Coordinate? Do we normalize X value of vector or length ...
0
votes
0answers
25 views

Adding transparency without losing the lighting to this shader

How does one have transparency without losing the lighting in this shader? Seems when I enable pragma alpha, the lighting is lost ...
0
votes
0answers
13 views

How to check output value in Remap Node?

I started to deal with Shader Graf in Unity. I make test shaders, understand how nodes work. Sometimes I want to check the value that I get after a series of operations. I would like to see, for ...
0
votes
1answer
26 views

How to send SDF equation to GPU shader?

I am working on a sandbox app that model stuff using SDF and its operators. I want to do the actual rendering on GPU. So once the SDF is defined (ex. box union with sphere, etc.) how do I push it to ...
1
vote
0answers
29 views

How to debug UVs exported straight from Blender

I have a model in Blender 2.93. I am exporting it to JSON using landon I am then importing the JSON into a WebGL rendering layer and feeding directly to shaders The JSON UV export is an array of ...
0
votes
0answers
27 views

Why is the back layer sometimes rendering in front?

I have a layer rendering issue, where the top layer of content will sometimes not render to screen as it appears that the bottom layer is rendering on top (even though it's behind in world space). It ...
1
vote
1answer
66 views

Blender`s assign material to face analog in Godot

I am very new to Godot. I am using version 3.4 stable on Windows 10. I made a building in Blender and I wanted to make interior mapping instead of poor 2d windows textures. I found a material for that,...
1
vote
0answers
53 views

Unity3d - Tile-based "Slippy" map rendered on a sphere (earth)

Scenario I'm creating a spherical version of a slippy map using osm tiles and my luck has been limited thus far. I'm starting to think my strategy has lead me astray and that I need to start from ...
1
vote
0answers
96 views

1Bit Bayer Ordered Dithering Shader

I’m having a problem trying to fix my 1bit ordered dithering shader. This shader is going to be perfect to be used but there is some detail that I would like to fix. First of all, this shader is not ...
0
votes
1answer
50 views

Improving performance of lighting on mobile

I'm trying to make a 3D game for mobile. When rendering a very simple scene, my performance drops from 60 fps to 30 fps when I use fragment shader lighting instead of vertex shader lighting. I really ...
0
votes
1answer
32 views

If I want to use textures and colors, how do I put them into my fragment shader?

I have many mesh objects in my scene and I have applied an image texture to some objects but I want to set different colors for the other objects. How do I do that? This is my fragment shader ...
0
votes
0answers
40 views

Opengl. A single texture is applied to all my objects. glTextureStorage2D Error faced

I can't seem to figure out why a single texture is applied to all my objects. I have three objects - fence, ground and cone but they get weirdly placed textures or a single texture on all of them. ...
0
votes
0answers
31 views

Is there any debugging facility for DXR ray tracing shaders available?

Quick question: Is there currently any debugging facility for DXR ray tracing shaders available? Neither PIX, nor RenderDoc do currently support debugging of such shaders ...
2
votes
0answers
34 views

How can I modify the TMP Text shader to add a Venetian blinds effect in Unity?

Is there a way to modify a TMP shader so it has Venetian Blinds effect (text appearing in like blinds pattern) like in Adobe after effects.I found a shader that does that the problem is how do I get ...
0
votes
0answers
35 views

Very basic question: Passing data in fragment shader to next frame (Metal)

I am casually trying to learn a bit about writing simple fragment shaders, in particular using Metal API. I have been experimenting in KodeLife. As a simple example, I am trying to remake the Double ...
0
votes
0answers
18 views

How to change the color of the overlapped object when it overlaps with an transparent object

i use 2019.4.32f ,unity shader graph in urp I was refered to that url. https://forum.unity.com/threads/highlight-intersection-shader.731177/ With reference to it, intersection applied in opaque ...
0
votes
0answers
43 views

ComputeBuffer Values messed up when calling the dispatch many times in a row

I'm having a RWStructuredBuffer called AffectedVertices give me random data instead of 1 simple value to resultAffectedVertices, ...
0
votes
0answers
88 views

Alternative of PBR Master Node in Lit Graph Shader in Unity 2020.3+

I am using Unity 2020.3+ and there, according to this forum, the PBR Shader is replaced by Lit Shader Graph so I used the Lit Shader Graph instead of PBR shader for making water in Unity. I was ...
0
votes
0answers
70 views

How do I change the color of the surface where the collided object overlaps in unity?

How do I change the color of the surface where the collided object overlaps in unity? Let's take the board of directors as an example. I want to change the color of the surface superimposed on the ...
0
votes
0answers
18 views

How to use texture tiling with UNITY_SAMPLE_TEX2D_SAMPLER

I am trying to implement UNITY_SAMPLE_TEX2D_SAMPLER into my shader in order to use over 16 textures. I think everything is working except the tiling of the tile texture.In my old shader I used this... ...
2
votes
2answers
105 views

How can I create a shader which makes an object transparent in bright light and opaque in low light?

I'm trying to set up a shader that, as the title says, functions similarly to the effect appearing in the "Lights Out" horror short film. Cut down to the very basics, I'm looking for advice ...
0
votes
1answer
45 views

Why is my shader's call to UnityObjectToClipPos() causing my *other* shaders to be invisible?

I created a shader via a node-based shader tool called Shadero Sprite, and I'm trying to debug an issue with it. Since the code was generated by the node-based tool, I'm not entirely sure what the ...
0
votes
0answers
19 views

Ensuring world curving shader is not affected by object scale

I've made a shader shown below which essentially acts as a "world bend / curve" shader by "bending" objects depending on their position from camera. It's a subgraph that outputs ...
0
votes
0answers
31 views

How to generate a randomly-positioned leaf quads with a geometry shader?

Does anyone have any idea how to implement a shader that manages to make this effect in Unity? I found a post that explains, but I'm still learning shaders so I didn't really understood how to go ...
0
votes
1answer
34 views

Unity world curve shader graph, how to start curving from a specific distance?

I've made simple world curving shader following some online tutorials and cleaning few things up. It's doing its job, however I have small issue where it curves objects that are very close to a camera....
1
vote
1answer
177 views

What is a efficient way for adding and removing vertices and indices in C++?

So I have this middle-large mesh that is composed from vertices and respective indices. At some point I need to add new ones and remove some. But that brings me into trouble. Because if I have, for ...
1
vote
0answers
67 views

How to create a seamlessly wrapping procedural brick material with a shader?

How do you create a shader that seamlessly wraps a brick pattern around the whole object, so that there are no "Stitches" at any edges/corners? Take this screenshot for example: On the left ...
0
votes
0answers
52 views

Render 3 textures into an RGB texture?

Flutter has support for external textures, but they have to be RGB. I want to render YUV video to Flutter. On OpenGL I used to create 3 textures, and upload Y,U,V to each corresponding texture. Then I'...
2
votes
1answer
36 views

LIBGDX ShaderProgram not passing uniforms

I'm trying to implement a Shader that turns any RGB values below 190 into black. LIBGDX code: ...
1
vote
0answers
43 views

Faster Alternatives to Jacobi Pressure Solving in Navier Stokes Simulation

While Jacobi itself is quite simple it needs at least 10 iterations to produce acceptable results. However that results in a higher total time cost than the rest of the Navier Stokes Simulation ...
0
votes
0answers
36 views

Why my output image is not seamless?

I offset a region of an image but when I tried to restore it using same method it doesn't look right. here is my input and output: And this is the code I used to restore : ...
0
votes
0answers
25 views

Is there a technique to properly illuminate a PBR material when using directional light?

I use the following formula to calculate PBR color for each light source. For the sake of this post, let's assume that there is only one directional light. I am using Vulkan; so, +Y is "down"...
0
votes
0answers
42 views

In a shader, what is the meaning of l()?

For instance, l(2.000000) or l(1.000000, 1.000000, 1.000000, 1.000000). This is in HLSL. Example in use: ...
0
votes
1answer
35 views

Relocate texture regions with pixel shader

I'm new to DirectX and pixel shader development. I want to know how to relocate region of input image in post processing. What I want to achieve is to divide my image into 4 pieces and then relocate ...
0
votes
1answer
93 views

OpenGL Vertex Shader "joint matrix * weight" multiplication performance

Trying to implement animation on my engine. I'm at the first stage, rendering default pose of skinned meshes. Working as expected but very slow. With the below calculation, the shader takes 6ms to run....
0
votes
0answers
43 views

Spawning noise-based fire effect with code, no prefabs

i'm a beginner in Unity, and I'm taking a Graphics course about algorithms of procedural textures/modeling. I would like to write a noise-based fire shader like this one: I would like to then be able ...
1
vote
0answers
32 views

Given a point, create a triangle with it through shaders in Stride

Need help in writing shaders in Stride. I have a vertex list. I need to create triangle from each of the vertex. For each vertex, it will be considered as a center point and three new points are ...
0
votes
0answers
18 views

How Do I Get A Shader To Stop Glowing

I am trying to make a top down game. Sometimes the enemys are invisible to the camera if they go behind objects, and I want to be able to always see those enemies. I followed this tutorial to get to ...
0
votes
0answers
18 views

Particles look different in scene view and game view?

I'm rendering particles and I'm not happy how it looks in the game view. Why is there a yellow outline in the game view (right) instead of fading nicely into the background like the scene view (left)? ...
0
votes
0answers
32 views

How to split an object in half with vertex shader?

I have a mesh of a house with roof and interior. I'd like to use a vertex shader to cut the roof off and move it over so I can see inside. However, when I do this: ...
0
votes
0answers
32 views

How to have different world states on each client but treat them as though they were the same?

I've got a voxel-based, Minecraft-like, 3rd-person isometric multiplayer game with camera rotation. Roofs are always the same height. Players can walk on roofs, and shoot or be shot while standing on ...
0
votes
0answers
13 views

How to show a marker (aka secondary texture) on a sphere at a specific location using shader?

I have a 3D Earth and I would like to show some specific marker at a specific location based of latitude and longitude. I figured out how to calculated world coordinates from Lat|Long and pass it to ...
0
votes
0answers
36 views

How to map 2d point on grid/plane mesh to 3d point on sphere with minimal distortion?

I have a grid of voxels that I want to "bend" into a sphere via a vertex shader with minimal distortion. I've tried 2 approaches so far, both of which don't quite give me the desired effect. ...
0
votes
0answers
51 views

How to make under-construction sprites have blueprint graphics?

In my game, every placeable object and structure will only be placed as a blueprint, which the characters will then automatically build. An example from "RimWorld": Objects placed as ...

1
2 3 4 5
37