Questions tagged [lighting]

The simulation of light and illumination in games, including its interaction with the environment. A core element of games that can bring out vivacity into otherwise static worlds.

Filter by
Sorted by
Tagged with
1
vote
0answers
18 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 ...
0
votes
1answer
44 views

Improving performance of lighting on mobile

I'm trying to make a 3D game for mobile. When rendering a very simple scene, my performance drops from 60 fps to 30 fps when I use fragment shader lighting instead of vertex shader lighting. I really ...
-3
votes
1answer
34 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 ...
-2
votes
1answer
41 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 ...
2
votes
0answers
16 views

Tweak brightness of widget in UE4

I would like to make an interactable monitor in Unreal Engine 4.26. I am using the default material for widgets as you can see in the image below: The texture I would like to show is: When I drive ...
0
votes
0answers
42 views

Lights do not fully respect SortingLayers in Universal Render Pipeline

I just installed Universal Render Pipeline (10.5.1) into my Unity (2020.3.15f2) 2D project and believe I have everything configured correctly. I created a new RenderPipeline asset I deleted the ...
0
votes
0answers
69 views

Have object accept shadows cast from other objects without receiving lighting (Unity)

I have a map object with textures (including lighting) baked in. I want to have a realtime directional light shining on my character walking on the terrain such that the character shadow is cast on ...
2
votes
2answers
97 views

How can I create a shader which makes an object transparent in bright light and opaque in low light?

I'm trying to set up a shader that, as the title says, functions similarly to the effect appearing in the "Lights Out" horror short film. Cut down to the very basics, I'm looking for advice ...
0
votes
0answers
15 views

Fade in / Show unity lights only at a specific distance from a camera

I noticed that in URP point / spotlights are not initially visible at a distance and then they sort of fade in the closer they get to the camera. I am wondering if I can control this behaviour somehow?...
0
votes
1answer
97 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 ...
0
votes
0answers
16 views

Shadows issue in Unity

I am using Unity Built-in render pipeline 2020.3.5 I have a weird shadow projection when pointing at game objects with my flashlight (spotlight). It looks like the shadow is floating or is another ...
0
votes
1answer
44 views

How to lerp between diferent spot angles

I have this code that Change spot angle randomly between 'minAngle' and 'maxAngle' each 'interval' seconds: ...
0
votes
0answers
12 views

When dealing with Image based lighting, are the generated irradiance map and specular ibl dynamic?

I have been reading about IBLs, trying to understand how they work; so, I can implement them in my engine. I have understood the general concept and the calculation for the diffuse but I am still a ...
0
votes
0answers
24 views

Is there a technique to properly illuminate a PBR material when using directional light?

I use the following formula to calculate PBR color for each light source. For the sake of this post, let's assume that there is only one directional light. I am using Vulkan; so, +Y is "down"...
1
vote
0answers
90 views

Unreal 4 - Static mesh has strange, glitchy shadows?

The first image below shows my mesh in Blender with the Blender lighting, and the second image from inside UE4 has this weird shading on it. Is there any way to help it look like the first image? I've ...
1
vote
1answer
41 views

Unity Light Bugs in Android

I was testing my game, so I made a build to test it on my phone. I noticed that when I play in an android build, it is so darker than when I play in the editor or in a PC build. It looks like this in ...
0
votes
0answers
69 views

How to make a shadow-casting day/night system in 2D URP?

I am trying to achieve a day/night lighting system similar to the game RimWorld. Short preview of what I want can be seen here: https://giphy.com/gifs/VgzcwtjueP7BrYSrXe Instead of using Global Light ...
1
vote
0answers
25 views

Perspective of a Point Light

I'm trying to calculate shadows by projecting the silhouette of each object seen by the light source. (The shadows are just going to go on planes.) To get each silhouette I take a snapshot from the ...
0
votes
0answers
28 views

Unity Light Bug

I saw this while testing my game. I have a light situated behind the Main Camera. All is working perfect, until I get a Game Over, and changes to the Game Over scene. From then, all lights have no ...
0
votes
1answer
40 views

Lights beyond the fourth do not appear?

In my scene there are 6 point lights. But 2 of them do not illuminate my floor plane. If I disable any of the working lights, then one of the non-working lights starts working. It's like my level can'...
0
votes
0answers
16 views

Are global lighting settings meant to be changed at runtime? Unity

I would like to influence things such as daycycle. Yet it seems that the global lighting settings are meant to be permanent. Can this be done, or is there another way of creating large lighting ...
0
votes
1answer
59 views

Unity baked light messes up a set of objects

On a few objects I use a technique where instead of using geometry, I place planes with a Cutout Material on top of each other, creating a 3D illusion with minimal cost. The thing is, it looks great ...
5
votes
1answer
1k views

How is this lantern glow effect achieved?

I was wondering if anyone knows how this lighting effect is achieved. It's clearly not a bloom shader. My best guess right now is that it's a billboarded transparent sprite, which is animated to give ...
0
votes
0answers
19 views

Ray tracing Bug with Diffuse material

I am trying to do ray tracing in python (following the tutorial given in Ray Tracing in a weekend). Basically I am shooting rays from eye and the recursively bounce around, each time they hit ...
0
votes
0answers
34 views

The scene becomes dark when reloaded

I have a prototype of a simple game. When I hit a spike, the game restarts, but when it does the whole scene becomes dark. The light intensity level stays the same. ...
5
votes
1answer
890 views

Invert the colour of pixels where 1 bit sprites are overlapping

I have a simple scene in Unity that makes use of some simple art that uses either white or transparent colours to create a 1-bit art design. The image below shows this. I want to have a that if two ...
0
votes
0answers
15 views

Updated Unity project from 2020.2.1f to 2021.1.7: lighting is messed up, scenes are brighter

I've updated my project from 2020.2.1f to 2021.1.7 (also tried 2020.3.8), and now my scenes are much brighter for some reason: Any tips? Current I use the standard pipeline I think, because the ...
1
vote
1answer
47 views

How to use a normal map for light effects with an AnimatedSrpite?

I am trying to add light effects with normal map on an AnimatedSprite. I was following that tutorial but with no success. I am using a Ligth2D, this sprite sheet: ...
0
votes
1answer
105 views

How to get light level (brightness) of a particular location?

I'm making a 2D top-down survival game similar to Rimworld, I'm trying to emulate a day-night system. Many features depend on whether any tile is light (or dark) ...
2
votes
2answers
254 views

How to implement pixel art lighting as in the game Project Eastward?

Project Eastward Lighting Demo Can somebody point me to the right direction as to how this lighting is done to recreate this lighting effect? The game is 2D but uses a 3D lighting system.
1
vote
0answers
229 views

Baked lightmap: Parts of scene appear too dark

I'm having trouble setting up global illumination in my Unity 2021.1.1 URP project Parts of my scene are appearing completely dark, I'm only using directional light and area light on the windows, here'...
0
votes
1answer
22 views

Lights not displayed on Sprite

I have a scene that contains 3 elements: Main Camera A 2D Sprite that renders a single white pixel image, scaled to 2000 x 1000 A point light with a yellow color What should be done so that the ...
0
votes
1answer
67 views

How can I make 3D lighting smooth?

I'm trying to view 3D objects in a terminal. Everything was looking good until I implemented lighting. I'm using shadow rays to determine where the object should be lit. Although it's working I don't ...
0
votes
0answers
49 views

How can I get my physically based sky to be blue all the way down?

I'm rendering with a physically based sky. I want to get a very simple light blue background but below the horizon the sky becomes grey/brown. How can I get it so that the sky is blue all the way down?...
1
vote
1answer
752 views

Weird blue shine on URP Lit shader Unity

I recently started to use URP and I am noticing a weird blue like tint on shiny objects that use the URP/lot shader and I can't understand what it is and how can i remove it.
1
vote
1answer
29 views

How do you simulate UV light and materials with UV-reflective/fluorescent properties within a PBR renderer?

I have a PBR setup, say, in Unity (or Unreal, doesn't really matter, I'm asking about the general principle, not specific implementation), and I would like to add a UV light source, and have control ...
0
votes
0answers
16 views

Adding lighting to custom vertex shader in Unity

What's the simplest way to add shadow functionality based on the modified vertices, nothing I've found online seems to work ...
1
vote
0answers
44 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 ...
1
vote
1answer
299 views

How to make 2D lighting in JavaScript

I am making a recreation of the 2D voxel game Terraria in JavaScript. Like most sandbox games, Terraria has lighting, but because I am using JavaScript, performance is going to be an issue. I have ...
0
votes
0answers
55 views

How to make a point light cast shadows in realtime?

I have a solar system... The central star has a point light attached to it. However, objects don't cast shadows on each other... Planets are < 20 units from the star, so it's not a light falloff ...
0
votes
0answers
13 views

Difference in light between Unity 5.5.2f1 and Unity 2019

The lighting is different between Unity 5.5.2f1 and Unity 2019. Please see the attached image. I dislike the way the lighting is done in the 2019 version. Both verions are installed out of the box, ...
1
vote
1answer
166 views

Issues with referencing experimental light class

I am trying to reference a Light2D component on a GameObject but I get the following error: ...
1
vote
1answer
171 views

Why real time lightning fails to show shadows on terrain in Unity?

I'm using the TerrainTools unity package to create a simple 500x500 terrain, and placing a simple character that moves around, however, by default, the lightning is at real time mode, and the shadows ...
1
vote
0answers
25 views

Trouble with Normal Matrix and Point Lighting

I'm having issues with lighting in my game. For some reason, no matter what I try, point lights appear to cut off halfway through the center of the light. I'm trying to render this light on a quad. ...
0
votes
0answers
20 views

Draw Ordering with Glowing Objects

This is mostly a general design theory question, but for reference the bulk of my game is in JavaScript. I can draw images to the screen that layer on top of each other in the order that I please. One ...
0
votes
1answer
38 views

Unity: What does the green line gizmo signify?

When I place a point light it shows this green gizmo that ends in the terrain. What's the name of this gizmo? What does it signify?
0
votes
1answer
132 views

UNITY : how to pause baking and quit project?

How to pause the lighting bake and quit the project ? so when i re-open the scene it will continue baking without have to start the bake from beginning ? I need to take a break to do other job on my ...
0
votes
0answers
67 views

Implementing DirectX 7 light attenuation in Unity's Universal Render Pipeline

I am create a modern Unity based client of an old MMO from 2000, and I am working on implementing their lighting system. Based on the data I have reverse engineered, it looks like they used a custom ...
3
votes
1answer
145 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. ...
0
votes
1answer
67 views

Unity Unable to blend 2D Light renderers

I've followed the documentation on Unity regarding 2D lighting. It said to turn on Alpha blending in the options. But this is how it turns out: If Alpha blending is off: If Alpha blending is on: I'm ...

1
2 3 4 5
14