Library Shader Rendering Issue

Posted By: 3dworld

Library Shader Rendering Issue - 12/07/13 21:11

Hi guys, I'm working in a project and I'm using mtl_specBump from the default shader library for my block walls but after I compile the game I'm getting some weird effects. Basically, if I'm standing in facing one direction the shader displays well but then if I turn a few degrees to the left or the right is like if the shader disappear, or sometimes the wall shows white. I have no clue what could be happening. Please take a look at the picture below to see what I'm referring to. Any help/advice is more than welcome:
Posted By: Superku

Re: Library Shader Rendering Issue - 12/07/13 21:25

Have you checked the number of lights in range for each (problematic) mesh using mtl_lightcount (or whatever it is called)? mtl_specBump only supports 3 lights, and one of them may be for example the sun if sun_light != 0 and only two other dynamic lights are close (try setting that variable to 0 for the moment).
Posted By: 3dworld

Re: Library Shader Rendering Issue - 12/07/13 21:43

What about if I have more than 3 lights in the room but only 1 is affecting that surface. Will that cause the issue too?
Posted By: Kartoffel

Re: Library Shader Rendering Issue - 12/08/13 07:56

No, it's just a 8 (or 7 + sun) lights per entity limit... smirk
Posted By: 3dworld

Re: Library Shader Rendering Issue - 12/08/13 16:53

If I use only 3 lights is renders fine, but if I add a 4th light then problem appears again.
Posted By: Superku

Re: Library Shader Rendering Issue - 12/08/13 22:00

As I've written above:

Originally Posted By: Superku
mtl_specBump only supports 3 lights,[...]


See: http://www.conitec.net/beta/amaterial2.htm

You can of course try to change the shader and add more lights (you will probably then need to use PS3.0 instead), or alternatively do what I've said in my previous post.
Posted By: jenGs

Re: Library Shader Rendering Issue - 12/09/13 06:08

"light_view = NULL;"
Then write your own "light lod".
And increase the lights in the shader or make sure only three lights affecting the surface.
© 2024 lite-C Forums