1
vote
0answers
37 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 ...
0
votes
1answer
49 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
0answers
24 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 ...
2
votes
0answers
67 views

Surface shader with VertexLit causes black object

I wrote the simplest possible surface shader: Shader "SimpleSurf" { Properties { _MainTex ("Base (RGB)", 2D) = "white" {} } SubShader { Tags {"RenderType"="Opaque" } ...
1
vote
0answers
72 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
2answers
131 views

Voxel Lighting in Unity3D

I'm working on a Voxel project in Unity3D for fun and learning. I've been reading up on how this is done and have implemented a simple Voxel map in my project. My question is about the lighting. I've ...
2
votes
2answers
86 views

How can I calculate spotlight lighting in Vertex/Fragment shader in Unity?

I've written a vertex/fragment shader for my game. It uses 3 textures and represents a floating water on the wall (so I have 1 texture for water, 1 for geometry and the last one is mask) so it looks ...
0
votes
0answers
38 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 ...
0
votes
0answers
25 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 ...
2
votes
2answers
190 views

How can I support many point light sources in a dynamically-generated level in Unity?

I'm currently working with a dungeon game which is similar to Dungeon Keeper by Mythic Entertainment. I'm using Unity and developing this game for Ipad 2 and above. Player can modify his dungeon, and ...
1
vote
1answer
131 views

Spot and area lights inconsistent

Im having problems with area light and spotlight. When adjusting parameters the change is not consistent and sometimes the light grows tstronger and then dissapears and then reappears very strong, ...
4
votes
1answer
795 views

Faking 2d light using shader (Unity, Shaderlab)

Since the concept was difficult to explain in words for someone who's not quite familiar with shader, I described it in pictures. I'm currently using Unity and it seems Shaderlab is the best choice ...
0
votes
1answer
362 views

Directional light causes an FPS drop

I have only one object in the scene and it is lit with a directional light. It uses the mobile/diffuse shader. The issue is that on iPhone 4 the FPS drops from ~42FPS to ~11FPS when the directional ...
1
vote
0answers
151 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 ...
5
votes
1answer
303 views

Lightmapped prefabs for procedural content

I'm doing a game with procedural content from handmade prefabs, but I ran into a problem as Unity bakes the scene instead of objects when lightmapping with Beast. So when the prefabs are instanced ...
2
votes
1answer
216 views

Unity3D custom camera matrix breaking shadows/lights in deferred rendering

EDIT 1: So it seems this is a common issue with Unity, and it comes from a bug in which custom camera matrices break deferred lighting and shadows. This topic right here talks about it a bit, but the ...
2
votes
0answers
453 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 ...
6
votes
2answers
396 views

Detecting Light Intensity Around Characters

Later Edit Since there seemed to be a bit of confusion: I am asking this for purely didactic reasons, I'm not searching for the most efficient solution. Reformulated question: I'm working under ...
4
votes
2answers
944 views

Lights shining through walls

I'm currently having a problem with lights in Unity. They shine through walls for some reason. Point, directional, etc. If a light is next to a wall on one side, you can see it on the floor on the ...
0
votes
2answers
569 views

Why does my model render differently than its preview?

I've been importing .fbx files that I made with 3DS Max 2012 into Unity, and it's quite neat to see my models running around in game. However, I can't help but notice that the models, as they're ...
6
votes
3answers
365 views

Why doesn't light continuous on my model?

I created a basic textured cube model with Blender to practice modeling, and then I imported it into Unity. After I put up some lighting it looks pretty ugly. The light is not continuous on a row of ...
-1
votes
1answer
209 views

Tools need to for low poly model, texture making & lighting in unity3d (iOS) [closed]

I am new to unity3d, i want to create a 3d game i have a team of 3d designers and programmers. My question which software should we use for modelling, texture making and advanced lighting for mobile ...
2
votes
0answers
678 views

How can I use the dualforward parameter in my unity shader to use lightmaps and normal maps together? [closed]

I'm using the free version of unity and I would like to combine lightmaps with specularity and normal maps. After doing a -bunch- of research, I've figured out that there doesn't seem to be any easy ...
2
votes
1answer
754 views

How do I get light to go through a window texture in Unity?

I'm having trouble with the lighting (I have windows and the light wont go through). How do I get the light to proceed through the glass?
5
votes
3answers
3k views

How do I fix this weird lighting problem?

I'm making a small game in Unity, and some models are displaying very ugly shading. The shading usually looks funky along the edges between triangles. I'm pretty new to working in 3D; I bet this is ...