Headlights in OR was Awaiting OR v1.0
#41
Posted 13 December 2014 - 08:39 AM
Sorry, but I give it up. I see I should learn from scratch how to handle .fx files, and that's too much for me :lol2: .
#42
Posted 13 December 2014 - 08:55 AM
Csantucci, on 13 December 2014 - 08:39 AM, said:
Sorry, but I give it up. I see I should learn from scratch how to handle .fx files, and that's too much for me :lol2: .
.fx files can be thought of as a derivative of C, so pretty similar to C# in terms of basic syntax, but the most annoying bit is learning the available functions. You're welcome to ask questions in the forum if you'd like help learning them.
If you want to try another approach, adjusting the code in SharedMaterialManager.UpdateShaders and SceneryShader.SetHeadlight to pass a different lighting value in to the shader (see headlightPosition.SetValue in Shaders.cs on line 155) is an option. It's probably better than doing it in the shader. If you'd rather not try that, let me know and I'll give it a go. :)
#43
Posted 13 December 2014 - 01:10 PM
#44
Posted 13 December 2014 - 01:44 PM
#45
Posted 13 December 2014 - 02:01 PM
Csantucci, on 13 December 2014 - 01:44 PM, said:
:lol2:
I think something's up with the interpolation, e.g. if you speed the game up to ~12,000% and watch the light during sunrise or sunset. At least for me, it doesn't seem to transition smoothly at all, instead jumping between a few different brightness levels. Not entirely sure why it jumps so much, but looking at the code I think the interpolation might be backwards. :)
#47
Posted 14 December 2014 - 12:18 AM
I think I will do some further test involving also distance when in daylight.
#48
Posted 14 December 2014 - 12:34 PM
End of daytime (not yet twilight), long shadows, no headlight:
End of daytime (not yet twilight), long shadows, headlight: the headlight is able to increase brightness of near shadowed terrain, without influencing unshadowed terrain:
Twilight, no headlight:
Twilight, headlight: the headlight effect now arrives at longer (but not yet maximum) distance
Nighttime, headlight: effect as usual
#49
Posted 14 December 2014 - 12:48 PM
Cheers, Markus
#50
Posted 14 December 2014 - 02:20 PM