Specbump randomly glitching

Posted By: Stansmedia

Specbump randomly glitching - 08/03/14 20:39

I load up my game...


I close the engine and restart it.


This is happening randomly to just about every model with the specBump shader applied.
Posted By: FEL

Re: Specbump randomly glitching - 08/03/14 20:56

Are there more models in the level?
Posted By: Stansmedia

Re: Specbump randomly glitching - 08/03/14 21:04

Yes. The terrain (which is an mdl), trees, and characters. All randomly glitch out like the first photo.
Posted By: DLively

Re: Specbump randomly glitching - 08/03/14 22:28

is this custom shaders or shade-c?
Posted By: Stansmedia

Re: Specbump randomly glitching - 08/03/14 23:41

specbump.fx included with game studio.
Posted By: DLively

Re: Specbump randomly glitching - 08/04/14 04:03

You said randomly, but for debugging reasons - Is it always in the same spot that this happens?
Posted By: txesmi

Re: Specbump randomly glitching - 08/04/14 07:30

It seems the wrong picture lacks on ambient light and only shows the specular reflection light. Maybe the terrain is lighted by more than the three lights supported by the specBump shader and the first three lights are far enough to be darken near to black so there is no ambient lighting. I am not sure about the following but probably the light list is sortered by the distance to the entitys origin each frame, so in the case of a model used as a terrain the origin can be pretty far and the lights near its origin are the ones passed to the shader. Probably the terrains light list is sorted by the distance to the rendered view: a good reason for the existence of terrains (in addittion to a better polygon culling by chunks)

Salud!
Posted By: txesmi

Re: Specbump randomly glitching - 08/07/14 19:54

Any thoughts about this?
Posted By: sivan

Re: Specbump randomly glitching - 08/07/14 20:08

when a shader can handle limited number of lights strange things can happen. I had problems with it e.g. in case of terrains, chunks can become totally black (I use no, or very low ambient). finally I separated the Sun light which is always the last dynamic light, by the help of iLights (I had also problems with the iLights for loop discussed with Jcl, now I use it differently than in 3dgs shaders). in theory it can be done with specbump.fx. but my solution uses a very different normal/specular mapping shader approach.
Posted By: Stansmedia

Re: Specbump randomly glitching - 08/08/14 01:39

Thing is, there are only two lights. Sun/Moon light and the lighter. It came out of no where. When too many lights were on a surface, it would simply turn black or kinda spaz out between lights. Not this. It's kind of like textures are getting garbled up or something. Possibly something to do with preload mode? Or MAYBE my graphics card just sucks ass. But like I said, this has not happened before in the 3 or so months of developing.
Posted By: Stansmedia

Re: Specbump randomly glitching - 09/03/14 19:18

I thought I got away with this magically, but it is happening randomly still. I'm hoping this is a problem with my graphics card. Nobody has had this problem before?
© 2024 lite-C Forums