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.

learn more… | top users | synonyms

3
votes
1answer
409 views

Changing Ogre3D terrain lighting in real time

I'm looking at the Ogre 3D library and I'm browsing through some examples / tutorials. My question is about terrain. There are a few examples showing how great the terrain system is, but I think that ...
2
votes
1answer
755 views

Has anyone got the Krypton Lighting Engine working in MonoGame for Windows 8?

I've converted the core of the Krypton Lighting Engine so that it's compatible with Windows 8. The trouble I'm having when actually using it is that it can't load the KryptonEffect.xnb file. I'm ...
1
vote
1answer
79 views

XNA Diffuse Shader Issue. Edge lighting problem. Image Attached

As you can see in this image the diffuse shading is working correctly in some places but in other places such as the the bottom of the sphere you can see the squares/triangles of the mesh. Any ...
0
votes
1answer
98 views

Surface shader ignores lighting in vertexLit path

I want to use a surface shader in VertexLit(not Forward) rendering path. I caused a problem that the compiled shader completely ingnores lighting from the light sources on the scene. Here's the code: ...
0
votes
1answer
90 views

VertexColor shader is not working correctly in built application

I want to change the vertex colors of my mesh. The light sources must not affect the objects with this shader, its lighting must be determined only by its vertices colors, so I turned the Lighting ...
2
votes
0answers
111 views

Libgdx - IsometricTiledMapRenderer and light shading

I am wondering if there is any way to simulate light shading in Libgdx using an IsometricTiledMapRenderer. Here is my code to draw an isometric map, it's able to be moved around with the mouse and ...
2
votes
0answers
59 views

Using sky for indirect lighting - should I remove the sun?

I'm attempting to achieve slightly more realistic ambient lighting in outdoor scenes using the sky cubemap. When rendering an object, I first calculate the direct lighting contribution using ...
2
votes
0answers
220 views

Monogame working with Krypton

I am trying to make a simple 2D game engine using Monogame and the Krypton 2.0 lighting engine. So far I have succeeded in rendering a light but I am unable to generate any shadows from any hull's. ...
2
votes
0answers
531 views

How to occlude lights in Unity3D?

First off, I own Unity Pro. I've been looking in to occluding lights when they aren't being viewed for a while now to improve performance. The main methods I ran in to were using BecameVisible() and ...
2
votes
0answers
284 views

Per fragment lighting with OpenGL 4.x tessellated model

I'm experienced with OpenGL 3+. I'm dabbling with tessellation shaders and have now got to a point where I have a nicely tessellated teapot/plane demo (quick look here) As can be seen from the ...
1
vote
0answers
19 views

Trouble with Lightmaps When Meshes Intersect

I've been working on making lightmaps for a game on mobile devices (meaning that individual texture sizes cannot exceed 2048 and that file size needs to be as small as possible), but I'm running into ...
1
vote
0answers
30 views

How can I perform a masked erase in SDL2?

I'm trying to implement some shadow/lighting effects in my 2D-project, and I've concluded that if there is an easy way to perform a masked erase on an SDL_Texture, it would make the drawing operations ...
1
vote
0answers
63 views

SpotLight in ForwardBase pass using forward rendering

Is there anyway I can force Unity to allow me using a custom shader to render spotlights in a ForwardBase pass (using Forward Rendering Path)? For what I could see since now: Unity use and ...
1
vote
0answers
172 views

Unity : shader that uses mesh.uv to tile texture atlas and mesh.uv2 to tile light atlas

I'm using a texture atlas and a light atlas to tile a mesh. I have the texture atlas working fine. I can apply textures and create a sort of tile map on my coded mesh. At the moment I'm using the ...
1
vote
0answers
33 views

Implementing Light Volume Front Faces

I recently read an article about light indexed deferred rendering from here: http://code.google.com/p/lightindexed-deferredrender/ It explains its ideas in a clear way, but there was one point that ...
1
vote
0answers
186 views

Unity Pro - Shadow rendering issue

I am using Unity Pro 4.2.1f4 and I always have this sort of glitch. This is due to the shadows and the bias. Even with a low bias this is happening. I've found a thread that talks about that ...
1
vote
0answers
130 views

Light on every model and not in the whole scene

I am using a custom shader and try to pass the effect on my Models like that: foreach (ModelMesh mesh in Model.Meshes) { foreach (ModelMeshPart part in mesh.MeshParts) { ...
1
vote
0answers
341 views

Dynamic 2D soft shadows with concave polygons?

I've implemented dynamic 2D soft shadows from this article on gamedev.net. It uses an image for the penubmra and is fast, physically accurate and looks good in most situations, so I really like the ...
0
votes
0answers
26 views

Get light positions from an environment map

As the title says, I was wondering if there's a way, in a preprocessing step, to infer the position of a some light sources starting from an environment map. I think I saw lights inferred from an ...
0
votes
0answers
37 views

How to add a flashlight in libgdx?

So I want to add a flashlight to the game when the game starts to get darker which I already have working. I bound a light texture to the batch and the first problem is that for some reason the ...
0
votes
0answers
26 views

Light shaped like a line

I am trying to figure out how line-shaped lights fit into the standard point light/spotlight/directional light scheme. The way I see it, there are two options: Seed the line with regular point ...
0
votes
0answers
26 views

How to draw a spotlight in 3D

To be clear, I am not talking about the light result (the lit area) but the spotlight itself, like this The two common suggestions that I tried are 2D image and a 3D cone. The problem with the ...
0
votes
0answers
48 views

box2dlights conelight rotation is off

I'm using libgdx/box2dlights for my game~ I have a conelight set up as such: ConeLight cl = new ConeLight(rh, 32, new Color(0f, 0.0f, 0.0f, 1.0f), 3, 0, 0, 0, 1); where "rh" is a RayHandler set to ...
0
votes
0answers
46 views

Cone Lighting formula for 2D projection space?

There is a good formula for a 3d cone lighting: float angleCos = dot(lightVector.rgb, lightDirection.rgb); attenuation = saturate((angleCos-coneCos)*coneCos); What if I want to compute whether my ...
0
votes
0answers
31 views

Checking if a object is blocking my view of a light (it's between light and camera)

I'm trying to determine, from a list of objects, which ones are blocking my view of a light. In other words: which ones are between the light and the camera. Coding in C++, using HPL1Engine. This is ...
0
votes
0answers
75 views

Cast shadow without rendering object

I'm new to UDK, and am using it to develop a survival-horror game based heavily on shadows. My question is short: is there a way to create an actor that, when rendered, ONLY renders its shadow (not ...
0
votes
0answers
56 views

Unity3d: Lines in Android build

I have a directional light pointing at the 3d objects. For some reasons, when I build to Android, the lighting produces multiple horizontal lines. It does not happen in other builds such as the ...
0
votes
0answers
51 views

ColorMaterial:AmbientAndDiffuse equivalent for CG\HLSL

I have this shader written on shaderlab, which replaces Ambient and Diffuse values of the material, because I need to tweak vertices colors from the script. Shader "VertexSimple" { Properties ...
0
votes
0answers
54 views

Simultanious RenderTarget use in XNA

I am currently grappling with the idea of lighting a 2D scene as a 3D one and i need to clear up a couple of things. I have so far figured out that i am going to use a differed lighting system where ...
0
votes
0answers
95 views

Normal mapping and translation, lighting not displaying correctly

I got a normal mapping issue. I have a texture and a normal texture on each model loaded via the ASSIMP library. I am calculating the tangent vectors on each object with the help of the ASSIMP ...