Skip to main content
The 2024 Developer Survey results are live! See the results

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.

0 votes
0 answers
5 views

Julia Sets code along with p5.js and shaders not working

This is my julia.frag #ifdef GL_ES precision mediump float; #endif varying vec2 pos; const float MAX_ITEARTIONS = 1000.0; float calculateEscapeRadius(float power, vec2 c) { // Compute the ...
Augusta Bhardwaj's user avatar
0 votes
0 answers
35 views

Reaction diffusion with shaders on WEBGL

I'm writing a reaction diffusion simulation with p5js based on a video and this tutorial. The code so far is this: var vertSrc = ` #ifdef GL_ES precision mediump float; #endif attribute vec3 ...
SandWood Jones's user avatar
0 votes
0 answers
20 views

How To Let ShaderMaterial Receive/Cast Shadows

So, I have been playing around with vertex and fragment shaders, and wanted to know if there was a way to add shadows to the fragment shaders? I have tried many unsuccessful attempts, and researched a ...
LeftClickMage's user avatar
-1 votes
1 answer
50 views

GLSL bouncing ball issue

#ifdef GL_ES precision mediump float; #endif uniform vec2 u_resolution; uniform vec2 u_mouse; uniform float u_time; vec3 color_bg = vec3(1.0); vec3 circle_color = vec3(0.0, 0.0, 0.0); void circle(...
David's user avatar
  • 1
0 votes
1 answer
23 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 ...
ilies's user avatar
  • 85
0 votes
0 answers
30 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=...
rgos's user avatar
  • 89
0 votes
1 answer
28 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 ...
The Armored Panda's user avatar
0 votes
1 answer
16 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 ...
user25766836's user avatar
0 votes
1 answer
175 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; ...
Wimal Weerawansa's user avatar
4 votes
1 answer
73 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 ...
tmlen's user avatar
  • 8,907
1 vote
0 answers
29 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 ...
Ethan Leonard's user avatar
0 votes
0 answers
71 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 ...
Dennis K.'s user avatar
1 vote
0 answers
38 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 ...
phal5's user avatar
  • 11
0 votes
1 answer
47 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 ...
tmlen's user avatar
  • 8,907
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 ...
Marco Flores's user avatar

15 30 50 per page
1
2 3 4 5
103