Elvas Tower: Sun size - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Sun size Rate Topic: -----

#1 User is offline   singleman74 

  • Apprentice
  • Group: Status: Dispatcher
  • Posts: 19
  • Joined: 26-May 15
  • Gender:Male
  • Simulator:open rails.....(msts)
  • Country:

Posted 20 February 2024 - 09:05 AM

I was wondering if there is a way to make the sun a little bit smaller to make it look more realistic. Cause in my opinion I think the sun is too big in size especially midday when the sun is at its highest part of the day. Any help would be appreciated

#2 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,985
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 20 February 2024 - 09:09 AM

Hello.
All i know, the Sun is a shader in ORTS.
But I still haven't learn the language of shaders - to modify them.

#3 User is offline   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,447
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 20 February 2024 - 09:20 AM

If I remember correctly the sun size is hardcoded into OR. If you know how you could try to modify skyshader.fx found in OR's content folder.
This thread over at TrainSim.com may also provide some help >>> SunSize


Portion of skyshader.fx >>> some of these settings affect size of sun? Not in my field of knowledge!
    // Sun glow
    // Coefficients selected by the author to achieve the desired appearance - fot limits the effect
    skyColor += angleRcp * Fog.y;
    
    // increase orange at sunset and yellow at sunrise - fog limits the effect
    if (LightVector.x < 0)
    {
    	// These if-statements prevent the yellow-flash effect
    	if (LightVector.y > 0.13)
    	{
    		skyColor.rg += SkyColor.z*2 * angleRcp * Fog.z;
    		skyColor.r += SkyColor.z*2 * angleRcp * Fog.z;
    	}
    
    	else
    	{
    		skyColor.rg += angleRcp * 0.075 * SkyColor.y;
    		skyColor.r += angleRcp * 0.075 * SkyColor.y;
    	}
    }
    else
    {
    	if (LightVector.y > 0.15)
    	{
    		skyColor.rg += SkyColor.z*3 * angleRcp * Fog.z;
    		skyColor.r += SkyColor.z * angleRcp * Fog.z;
    	}
    
    	else
    	{
    		skyColor.rg += angleRcp * 0.075 * SkyColor.y;
    		skyColor.r += pow(angleRcp * 0.075 * SkyColor.y,2);
    	}
    }
    
    // Keep alpha opague
    skyColor.a = 1.0;
    return skyColor;
}


#4 User is offline   pschlik 

  • Conductor
  • Group: Status: Active Member
  • Posts: 350
  • Joined: 04-March 15
  • Gender:Male
  • Simulator:OpenRails - Unstable
  • Country:

Posted 20 February 2024 - 09:35 AM

I think some shader changes with the changes to support the glTF 3D file format have made the sun look more sensible. That won't escape from the unstable version for some time, but maybe the sun shader could be copied from an unstable version to any other version?

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users