Skip to main content

Questions tagged [glsl]

A programming language for OpenGL shaders.

1 vote
1 answer
45 views

Strange scaling on my textures when they are upscaled or zoomed into

I am having a strange issue with my sprites, which is kind of difficult to describe, but hopefully the attached images will illustrate. I have drawn two 1 pixel lines on my sprite to help with this, ...
starrider's user avatar
2 votes
0 answers
105 views

9 Slicing in OpenGL, want to have the center of the texture repeat instead of stretch

I have some sprites in my game, mostly though not entirely UI related, that I would like to be able to scale to different sizes without warping the borders of the sprite. Looking around I was able to ...
starrider's user avatar
0 votes
1 answer
42 views

Rotating SDF rectangle with Matrix4

Hei I'm trying to create my own UI renderer from scratch using SDF functions, got it working pretty good without any transformations, but now I would like to add ...
Tonis's user avatar
  • 31
0 votes
0 answers
143 views

When compiling shaders in OpenGL, I get random error messages

I am trying to follow LearnOpenGL while coding in the Zig language, and something that is very odd is that sometimes my shader compilation fails even though I changed nothing between executing the app....
user avatar
0 votes
0 answers
57 views

Pyglet - How can I add a bloom postprocessing step to my scene?

I have a simple Pyglet scene below. I would like to apply a postprocessing step to add bloom to the scene. How can this be done using pyglet? I've tried looking through all the documentation for ...
Ray Larone's user avatar
0 votes
0 answers
37 views

Compute Shader - Buffer Output Size Differs From Input Image Dimensions

I am trying to build a compute shader to retrieve pixel color values from a noise-generated image using GLSL and Godot 4.2. The image itself is a 3840 x 2160 and formatted in RG8. I would expect ...
Haruto Kaito's user avatar
0 votes
0 answers
86 views

SSAO Looks Like Depth Buffer

I have problem with ssao, i'm using vulkan and follow Sascha Willems vulkan ssao example here: https://github.com/SaschaWillems/Vulkan/blob/master/examples/ssao/ssao.cpp my ssao result looks exactly ...
Karim Hamdallah's user avatar
0 votes
1 answer
86 views

How do I interpolate light intensity for tilemap's lightmap?

I implemented lightmap creation for a tilemap, but I cannot figure out how do I interpolate light intensity values. For now, my lighted tiles create an obvious grid-like structure. It was pretty easy ...
Steyrix's user avatar
  • 225
0 votes
1 answer
87 views

GLSL ported shader not working in HLSL

I have been working on an Infinity Grid shader for my engine. It was already implemented to Vulkan’s GLSL, so it worked great with OpenGL’s (4.6) GLSL. Here's a reference. This basic shader with ...
Kenny Tutorials's user avatar
0 votes
0 answers
56 views

How to render two different meshlets at two different LODs in a Mesh Shader?

I would like to know how to render two different meshlet at two different LOD values. So, for example, I render the meshletA at LOD1 and I render the mesheletB at LOD2. Please let me know if this is ...
Giuseppe's user avatar
0 votes
1 answer
102 views

How to setup gradient lighting in OpenGL shader?

I setup simple single light source lighting around campfire object. However, as can be seen, the transition between lightened area and unlighted one is sharp. The GLSL fragment shader code: ...
Steyrix's user avatar
  • 225
0 votes
1 answer
74 views

GLSL limit uniform sampler2D to 4 for some reason

I'm writing a deferred rendering pipeline and my fragment shader looks like this: ...
Ronen Ness's user avatar
0 votes
1 answer
29 views

Uniforms management

I wanted to know if there is any special optimization going on with uniforms and shaders. The issue I'm facing is that when increasing an uniform which is clamped to an option by a modulo, it only ...
Yvain's user avatar
  • 135
3 votes
2 answers
1k views

It's possible to use more than 4 channels of a texture in GLSL?

I have a Texture with 6 channels. Each channel store a mask that is used to change a color of a part of my player's sprite. When the texture only had 3 channels it was easy to implement this color ...
NotAlmostGauss's user avatar
0 votes
0 answers
42 views

How do I pick terrain in GLSL/OpenGL by picking 2D vertices positions?

Presumably the problem is with the internal formats and my understanding of that, but I've been stuck a while, got this sort of approaching working fine on a more straight forward colour picker, but ...
Paul's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
64