Questions tagged [fragment-shader]
A GPU program used in rendering. It is executed for each sample taken from a rasterized primitive. The output of this process is a number of values and a floating-point depth.
fragment-shader
1,541
questions
0
votes
1
answer
10
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
0
answers
12
views
Sync issue for gl_InstanceIndex between vertex and fragment shader
I'm trying to implement this OpenGL text-rendering tutorial in Vulkan:
https://learnopengl.com/In-Practice/Text-Rendering
and the improvements in this video:
https://www.youtube.com/watch?v=...
0
votes
0
answers
21
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
15
views
When using points in ThreeJS there is a black background on each point if using depth writing
I have a scene where I use points, like so
<points ref={gPoints} position={position}>
<bufferGeometry attach="geometry">
<bufferAttribute
...
0
votes
0
answers
80
views
+200
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
votes
0
answers
40
views
Planetary rendreing in unity and shader performance
I'm doing a personal project in unity (URP) about generating a large entire planet that allows the player/viewer to approach the planet without loading and in a dynamic way (for example like in the ...
4
votes
1
answer
71
views
OpenGL depth test with unclamped range
I'm using a OpenGL pipeline with a vertex and fragment shader, which is such that early fragment tests need to be enabled.
So the depth test is always done with the vertex shader output gl_Position.z ...
-2
votes
0
answers
58
views
How do I make 2D shadow cones in GLSL fragment shader?
I'm trying to make a 2D renderer in OpenGL with lights and shadows, and the lights work pretty well. But the shadows are not cones, they project the object as it is onto an object with a lower z-...
-1
votes
0
answers
34
views
A Godot shader to scroll a sprite along a turn
I am making a factory game in Godot 4 and I am trying to have a scrolling effect of the arrows in corners (bent) belts.
For straight belts I am using this shader which works great, but how can I ...
1
vote
0
answers
27
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 ...
0
votes
0
answers
59
views
How can i use GLSL shaders with raylib-rust?
Right now i'm trying to use a simple shader in my raylib app.
This is my simple_shader.fs file
#version 330
out vec4 fragColor;
void main()
{
fragColor = vec4(0.0, 0.0, 1.0, 1.0);
}
This is my ...
1
vote
0
answers
35
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 ...
0
votes
1
answer
46
views
GLSL input/output variables with same name in different sources
I have a GLSL program that contains 3 fragment shader sources that would get linked together, like this:
1.
#version 460 core
void RunA();
void RunB();
void main() {
RunA();
RunB();
}
#version ...
1
vote
0
answers
49
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
0
answers
35
views
Finding x/y screen position of a Metal fragment shader modifier for custom ARKit/SceneKit occlusion
I have a simple ARKit/SceneKit app that draws a cube in front of the camera. Using the depth map, I want to hide the cube pixels that are occluded by an object. RealityKit supports occlusion, but ...