Skip to main content

Questions tagged [glsl]

A programming language for OpenGL shaders.

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

I've reached normal maps as I was learning OpenGL, and I decided to calculate the tangents on the CPU. The issue is that my lighting uses custom structs and it ...
Grinding For Reputation's user avatar
1 vote
1 answer
172 views

I'm programming a Ray Tracer using Rust and OpenGL, I've already made Ray Tracing work in the basics by converting the data to an SSBO and sending it to the Shader in a basic way... The problem is ...
Arthur Sally's user avatar
0 votes
1 answer
87 views

I'm trying to import 3D models into OpenGL using Rust and GLFT models, the problem is that this function used to work... Now it doesn't work at all! It's working to load the 3D model, with the texture ...
Arthur Sally's user avatar
2 votes
1 answer
325 views

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
0 answers
705 views

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
1 answer
185 views

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
  • 279
0 votes
1 answer
160 views

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
  • 279
0 votes
1 answer
71 views

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
0 votes
0 answers
103 views

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
1 vote
1 answer
159 views

I'm trying to recreate the following shader from shadertoy using Phaser 3: https://www.shadertoy.com/view/wdG3Rz I managed to fix the errors I was getting but it just loads an empty black square when ...
Javier Villanueva's user avatar
2 votes
1 answer
87 views

I have a top down camera on my game, and I'm rendering a point light on my opengl fragment shader. When the point light is far away from the floor it looks like I would expect it should look, like a ...
ellipticaldoor's user avatar
1 vote
1 answer
202 views

For some time now I have been trying to do skeleton animation using Rust and OpenGL(specifically the gl library), I loaded the animation information correctly(with the gltf library), the bone ids and ...
Arthur Sally's user avatar
0 votes
0 answers
92 views

I'm working on a mod for a game and trying to add my own shader. I know practically nothing about shaders, but another similar shader exists and with their modding teams permission im using it as a ...
JoshB's user avatar
  • 1
2 votes
1 answer
319 views

I am experiencing some weird shadow artifacts. I suspect it to be some sort of self shadowing/depth bias thing. My shader for the shadow map is quite simple: ...
Symlink's user avatar
  • 133
0 votes
1 answer
868 views

I'm re-writing my Unity game in Raylib and are trying to recreate a path/road-shader I made with Shader Graph. The first picture is how it looks in Unity, with faded/blurred edges. The path is a 2D ...
Johan Tovesson's user avatar
1 vote
1 answer
5k views

This question is a continuation of this post on How To Make Seamless Custom CubeMap? The idea is to create a cube map with procedurally generated noise, extract the noise and a normal map of the noise ...
Miguel Myers's user avatar
0 votes
1 answer
137 views

This is my first attempt in implementing shadow mapping. I am using right hand coordinate system and my projection matrices are producing z values from 0 to 1. I've decided first to use orthogonal ...
Zhukov Artem's user avatar
0 votes
1 answer
201 views

I'm currently making a planet and for that, I added noise, to create terrain on the surface. The method I'm using is creating simplex noise (that ends up looking like the image below) And I write ...
Chillzy's user avatar
  • 47
1 vote
1 answer
125 views

I tried sampling equirectangular texture as a reflection. It simply does not work as intended. The texture is moving with my camera in a weird manner. Here is what I tried to do. Fragment shader: <...
Eskimo Joe's user avatar
0 votes
1 answer
773 views

I need help understanding what am I doing wrong with transformation/calculation of tangents and binormals using GLSL. I'm using Willems' PBR demo shaders as a reference: https://github.com/...
krz's user avatar
  • 1
1 vote
1 answer
767 views

For a game I'm making, I have to tessellate an octahedron into a sphere on the GPU (shaders). What I've done is I've successfully tessellated the faces, but I'm having trouble subdividing more spaces, ...
Chillzy's user avatar
  • 47
1 vote
1 answer
1k views

I tried asking this on reddit but I didn't get any answers so I might as well try here So I'm making a program to generate some terrain and it's not giving me the results I expected. It's drawing ...
Chillzy's user avatar
  • 47
-1 votes
1 answer
420 views

I'm working on a batch renderer. I'm limited to using one shader per batch (one draw call for everything). I want to use a TBN matrix for my lighting. To calculate the TBN matrix for each object I ...
J. Doe's user avatar
  • 101
13 votes
1 answer
4k views

In a WebGL 2 GLSL fragment shader, one can not access the pre-existing color value of the current pixel, i.e. the color that is already there in the framebuffer before the pixel that is currently ...
Anders's user avatar
  • 243
0 votes
1 answer
583 views

I am working on a voxel game, and I approached the point where I need to add day/night in my world. Apparently, I should just be able to pass the torch and sunlight values into my shader and multiply ...
Lightning323's user avatar

1
2 3 4 5
20