Skip to main content

All Questions

Tagged with
0 votes
1 answer
118 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
  • 269
2 votes
1 answer
67 views

I can't find what I'm doing wrong when rendering a point light that is clipped by the floor

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
0 votes
1 answer
104 views

Normal map lighting is just slightly off

I've been trying to implement normal mapping into my custom OpenGL shader. The result I'm getting is almost there, but it looks like the Point Light is not ...
Tom Tsagkatos's user avatar
2 votes
0 answers
324 views

Best practices for treating Light Volumes in Deferred Lighting pipeline

This topic is about ways to handle light volumes in a deferred lighting pipeline. I currently have a deferred lighting pipeline where spheres are sent to an openGL GLSL lighting shader. The sphere ...
slexov's user avatar
  • 21
-2 votes
1 answer
572 views

GL error GL_INVALID_OPERATION: mismatched type setting uniform of location "4" in program "1"

I get this error while trying to add lighting ...
user avatar
-1 votes
1 answer
698 views

How do I add light to my textures?

How do I add light to my textures using this? I have this GLfloat ka = 1.0; glm::vec3 ia = glm::vec3(0.5f, 0.5f, 0.5f); and in the fragment shader ...
Sara's user avatar
  • 1
0 votes
1 answer
930 views

How to calculate the shadow bounding box with a directional light

I'm trying to implement a directional light in my C++ / OpenGL engine, but I struggle to calculate the shadow bounding box (i.e the shadow frustum). The bounding box has to encompass the main frustum ...
user avatar
1 vote
0 answers
238 views

What is the best way to bake my own environment maps?

My engine has support for IBL by using pre-obtained HDRIs. It looks fine, but... I want the environment map to match the scene that is currently being rendered I want the environment map to take the ...
felipeek's user avatar
  • 131
3 votes
1 answer
733 views

Why should every light source have its own ambient light?

I'm currently learning how to use OpenGl, and I'm following a tutorial on learnOpenGL. I'm at the lightning chapter, and it has introduced basic lightning, ambient and diffuse with specular highlight. ...
Paul's user avatar
  • 165
0 votes
0 answers
1k views

How real time volumetric light beam effect could be achieved in opengl?

Here is 1.5 mins long video to give you an example of what I meant. From research that I did , regarding lighting effect, usually it is done offline (post-processing) using algorithms like "god ...
Elnur's user avatar
  • 1
5 votes
1 answer
905 views

Issue with specular light at highly oblique angles with Blinn-Phong

I'm having an issue with my basic Blinn-Phong renderer, when looking at objects at very oblique angles: I don't think this is an issue with my code, although I'll post my fragment's GLSL below. ...
D0SBoots's user avatar
  • 261
3 votes
0 answers
189 views

Help in understanding atmospheric scattering shading

I have a made a planet and wanted to make an atmosphere around it. So I was referring to this site: Click to visit site I don't understand this: As with the lookup table proposed in Nishita et al. ...
TheCodeDemon's user avatar
-1 votes
1 answer
53 views

Render output difference cause

There are two 3D applications compared side by side: I'm looking for difference cause. These might be the cause, but I'm not sure: Color Lighting Shading code (GLSL) ? Can anybody help me with ...
Megidd's user avatar
  • 141
0 votes
0 answers
228 views

Handling metallic roughness maps colour channels

I'm trying to use a metalness/roughness workflow and I'm not sure how to translate the colour channels into the different metalness and roughness attributes. I'm not sure if there's a standard on how ...
Sammi3's user avatar
  • 229
0 votes
1 answer
129 views

OpenGL object load in reverse

I am trying to load a model and it is loading it in reverse. When I am trying to rotate it 180 degrees it changes the lightning as well. I am not sure what I need to do to change the position that eh ...
T.ChD's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
9