Questions tagged [glsl]

The OpenGL Shading Language (GLSL) is the standard programming language for shaders in OpenGL. There are many versions of the language, with each version corresponding to a version of OpenGL. OpenGL ES 2.0 and above have separate versions of GLSL.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

THREEJS GLSL: radial stripes on geometry?

So I've been working on trying to figure out how to combine shaders, essentially I want this shader that I wrote: https://www.shadertoy.com/view/stGBzW to appear across the surface of this flower () I'...
  • 42
-3 votes
0 answers
18 views

Understanding the sphere intersection (GLSL-shader)

I'm trying to implement the GLSL-shader (from oneshader.net) in C#. Can't understand the loop for SphereIntersect method. vec3 ro = vec3(0.0, 0.0, -2.0); for (float x = 0.0; x <= 1.0; x += 1.) {...
  • 1
-2 votes
0 answers
27 views

Irradiance map issues [closed]

I'm having errors when using using my irradiance map. I'm using Vulkan 1.2 Here's what the scene looks like: Scene If I just sample the irradiance map, by doing texture(u_irradiance, N).rgb, I'll get ...
0 votes
0 answers
28 views

THREEJS GLSL: can't write a function in fragment shader?

So I've been trying to edit this flower geometry to have some dots like this shader https://www.shadertoy.com/view/4tSXR1 and I am learning a lot about GLSL in the process. Basically, I was planning ...
  • 42
0 votes
1 answer
16 views

glsl conditionally assigning out_color

I'm trying to achieve blending by using a shader to conditionally assign the fragment color. Full shader code... #version 450 #pragma shader_stage(fragment) layout(binding = 1) uniform sampler2D ...
0 votes
0 answers
39 views

How to use a shader on a piece uv of a map?

I have been looking for a solution to my problem for a long time. I am learning to write shaders and I have a problem to color only the part of the uv map, from which I load the 3D model. Could ...
0 votes
0 answers
19 views

Pass textures to a sampler2D array in GLSL shader?

I want to pass multiple textures to the shader as an array, like this: layout(binding = 0) uniform sampler2D uTextures[8]; And how should I assign values ​​to the array above using glsl's binding ...
0 votes
0 answers
40 views

How can I optimize this compute shader?

I'm coding an N-body simulation in OpenGL. This is the best performance I could achieve in my GTX960 4GB (frame rate limited at 60fps) and using the compute shader I provided here. Num particles = ...
0 votes
1 answer
18 views

How to create a Points (Mesh) of TextGeometry?

I am creating a TextGeometry but not able to convert in Points like a sphere or like a detailed 3d object. In the below image I have created a sphere using var dotGeometry = new THREE....
0 votes
1 answer
17 views

Pixelshader: Feedback on whether anything rendered?

Is there any way to get feedback from a pixel shader on whether a pixel actually rendered (as opposed to being blocked by zbuffer or stencil buffer)? I'm using GLSL. I'm trying to determine if a ...
0 votes
1 answer
37 views

OpenGL compute shaders producing incorrect texture coordinates from invocation ID

I have a compute shader that samples a depth sampler2D, however when using texture() the result is weird with some jagged edges. If I use texelFetch() then it works fine, so I would guess its an issue ...
  • 23
0 votes
1 answer
30 views

OpenGL square does not render at all (or renders black if I add an error to shader)

I am struggling to figure out why my GLEW/GLFW application won't render a simple square, so I have dismantled it into a single file to try to figure out what's missing. The code below successfully ...
1 vote
0 answers
28 views

Accessing large amounts of memory from compute shader?

I need to access large amounts of data from a GLSL compute shader (read and write). For reference, I work with an nvidia A6000 gpu with 50GB of memory, the driver is up to date. Here is what I've ...
  • 11
0 votes
0 answers
15 views

How to deal with many shaders in a complex WebGL program?

I know that there are two main ways shaders can be used in a WebGL application: store them in HTML inside a <script type="x-shader"> tag like this <script type="x-shader/x-...
  • 491
0 votes
1 answer
42 views

Why does OpenGL ES not support geometry shaders?

I read here and there that OpenGL ES does not support geometry shaders. I just wanted to know if it will be added in the future and if not I'd be interested in why. Is it a technical limitation of ...
  • 21

15 30 50 per page
1
2 3 4 5
513