1,845 questions
2
votes
0
answers
53
views
How to render drop shadow like figma in Metal shader
I am new to Graphic programming and shaders and I am working on a Metal fragment shader that downscales a video frame by 20% and adds a soft drop shadow around it to create a depth effect. The shadow ...
0
votes
0
answers
71
views
Flutter shaders: aurora points blending
I have an application that displays the northern lights on a map.
I receive a lot of points that need to be rendered (2000+ points).
Here’s what the final result should look like:
Since this puts a ...
3
votes
1
answer
79
views
p5js filter shader causing graphics object transparency to turn black
I'm attempting to simulate wind blowing across plants on a p5js sketch and came across a lovely fragment shader that does pretty much what I want (// https://github.com/GameMakerDiscord/wind-shader
).
...
0
votes
0
answers
84
views
Using texture sample values in a critical section of WGSL fragment shader
I am getting errors when using a variable that is dependent on the value of a texture sample in the critical section of my fragment shader.
From what I understand, one should not sample textures in ...
0
votes
1
answer
86
views
How to check manually created depth buffer for higher point between two fragments
I am really new to shader programming and trying (maybe erroneously) to make a lighting system for a little game I am making. The engine is 2D, so I am trying to pull off a slightly weird trick for ...
0
votes
0
answers
106
views
Invert raster tiles with maplibre
I'm trying to invert raster tiles in maplibre (like in CSS filter: invert). I have the following code for a minimum example that doesn't show any errors but doesn't invert the tiles.
<!DOCTYPE html&...
0
votes
1
answer
43
views
How to prevent base color from changing when overlaying patterns?
I'm building a custom racing silks customizer using THREE.js. My app allows users to:
By the way it is something like this website here: https://hylandsportswear.com/kitbuilder/#/customise/80325870?...
0
votes
0
answers
62
views
Custom Webgl points layer, with vertex shader and fragment shader, want to distinguish two points with same latitude and longitude on Webgl Points Lyr
The goal of this code is to distinguish two overlapping points with identical coordinates using WebGL in OpenLayers. Two approaches have been attempted:
Approach 1: Implements a custom WebGL points ...
0
votes
0
answers
78
views
How can I take care of anti-aliasing/pixelation in QML when using a shader effect?
*Hi,
I'm using a shader effect for my speed gauge implementation, and it works perfectly on the desktop application without any anti-aliasing issues. However, when I run the same code on an embedded ...
0
votes
1
answer
129
views
Handling multiple render targets of differing sizes in Metal
I would like to use a fragment shader with multiple render targets to output YCbCr data from RGB input, where the Y data is written to one texture and the CbCr to another, smaller texture (due to ...
1
vote
0
answers
434
views
How to get shadow from additional light in Unity custom shader?
I’m working on a project in Unity where I’m using a compute shader to render grass. The rendering path is Forward+, and I’m trying to make the additional lights affect the grass. I want to achieve ...
1
vote
1
answer
207
views
Analog speedometer with QML shader
I am trying to develop an analog speedometer in QML using a ShaderEffect, but I have not been able to achieve the expected result.
The goal is for the fill shader (a red arc image, referred to as the ...
0
votes
1
answer
89
views
Modifying Color Alpha Based On Distance With Camera in Frag Shader (UNITY 3D)
I have the following shader code:
Shader "Ogxd/Wireframe"
{
Properties
{
_FadeDistance("Fade Distance", Float) = 3.0
_EdgeColor("Edge Color", Color) = (0 ,0 ,0 ,1)
...
2
votes
0
answers
413
views
ImGui custom shader using vulkan
Im making gui in imgui, using example from official repository(example_glfw_vulkan), and i encountered a problem, that i cant apply shader to my popup`s background.
expected result
in this image you ...
1
vote
1
answer
212
views
In Godot 4, Shader not shading the correct pixels
I have a TileSet and I'm trying to apply a custom Shader and ShaderMaterial to one of my tiles. However, it's not shading the right area. I'm a newbie to both Godot and game development, but ...
0
votes
1
answer
242
views
Fix Incorrect Colors on Godot4 Shader
Inconsistent Results for Grass Shader Sampling Ground Texture Between Different Renderers
I'm currently developing a Grass Shader that samples the ground texture in Godot 4. However, I've encountered ...
0
votes
1
answer
215
views
Issue with reading texture data inside RESHADE Pixel Shader
I am new to reshade, but not new to programming as a whole. I tried to implement a compute shader using modern re shade, who's information was then passed to a pixel shader that passed that data to ...
0
votes
1
answer
561
views
GLSL fragment shader Sine wave change the direction and color
I have glsl Fragment shader code need to change the line color, background color and, direction of the sine wave
eprecision mediump float;
#endif
uniform vec2 u_resolution;
uniform vec2 u_mouse;
...
1
vote
0
answers
63
views
Drawing text over a shader
I have been going through Ebitengine's great tutorial for Kage https://github.com/tinne26/kage-desk/blob/main/docs/tutorials/intro/00_introduction.md (it's own shading language), and haven't been able ...
1
vote
0
answers
207
views
Writing to a RWTexture2D in Fragment shaders
I'm new to this topic, and I know this sounds stupid, but I just really want to learn!
So I found out I can write to RWTexture2D from my fragment shader(according to forum), but I can't really find ...
1
vote
1
answer
87
views
Shadow casted from custom GLSL unity shade doesn't match "surf" method output
Problem:
I wrote a custom shader for making animated sprites from a sprite sheet (not going into why I'm doing that rather than use Unity's animation player for this project").
It works well, but ...
0
votes
1
answer
775
views
Godot Tilemap Tile Shader | Map pixel data to tile color
I've been trying to set the color of a tile based on a color in a texture. The texture's size is equivalent to the size of the tilemap, where each pixel represents one tile. I need this info because I ...
0
votes
1
answer
641
views
Deck.gl v9 custom fragment shader is broken (Error: Error during linking: Fragment shader is not compiled.)
I'm using deck.gl to visualise a text layer with rounded corners on the _TextBackground sublayer.
My code is basically a copy of the following example but it won't work with deck.gl v9 (works fine on ...
-1
votes
1
answer
144
views
Two problems in the pixel shader
My pixel shader is not working. I'm very bad at this so I couldn't solve this problem. Below is the pixel shader code:
cbuffer CBuf
{
float4 face_colors[6];
};
float4 main(uint tid : ...
0
votes
1
answer
53
views
GLSL Box with shadows has a "cross" effect near its corner
The following GLSL code:
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = fragCoord / iResolution.xy;
vec2 windowSize = iResolution.xy;
float border = 50.0;
vec2 ...