mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-10-31 20:26:48 +00:00 
			
		
		
		
	Merge pull request #1580
This commit is contained in:
		
						commit
						dd5ebe225b
					
				
					 3 changed files with 26 additions and 0 deletions
				
			
		|  | @ -272,6 +272,12 @@ public: | |||
| 
 | ||||
|     void setWaterLevel(float waterLevel) | ||||
|     { | ||||
|         const float refractionScale = std::min(1.0f,std::max(0.0f, | ||||
|             Settings::Manager::getFloat("refraction scale", "Water"))); | ||||
| 
 | ||||
|         setViewMatrix(osg::Matrix::scale(1,1,refractionScale) * | ||||
|             osg::Matrix::translate(0,0,(1.0 - refractionScale) * waterLevel)); | ||||
| 
 | ||||
|         mClipCullNode->setPlane(osg::Plane(osg::Vec3d(0,0,-1), osg::Vec3d(0,0, waterLevel))); | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -88,3 +88,20 @@ This setting will have no effect if the shader setting is false, | |||
| or the 'small feature culling' (in the 'Camera' section) is disabled. | ||||
| 
 | ||||
| This setting can only be configured by editing the settings configuration file. | ||||
| 
 | ||||
| refraction scale | ||||
| ---------------- | ||||
| 
 | ||||
| :Type:		floating point | ||||
| :Range:		0 to 1 | ||||
| :Default:	1.0 | ||||
| 
 | ||||
| Simulates light rays refracting when transitioning from air to water, which causes the space under water look scaled down | ||||
| in height when viewed from above the water surface. Though adding realism, the setting can cause distortion which can | ||||
| make for example aiming at enemies in water more challenging, so it is off by default (i.e. set to 1.0). To get a realistic | ||||
| look of real-life water, set the value to 0.75. | ||||
| 
 | ||||
| This setting only applies if water shader is on and refractions are enabled. Note that if refractions are enabled and this | ||||
| setting if off, there will still be small refractions caused by the water waves, which however do not cause such significant | ||||
| distortion. | ||||
| 
 | ||||
|  |  | |||
|  | @ -376,6 +376,9 @@ reflect actors = false | |||
| # Overrides the value in '[Camera] small feature culling pixel size' specifically for water reflection/refraction textures. | ||||
| small feature culling pixel size = 20.0 | ||||
| 
 | ||||
| # By what factor water downscales objects. Only works with water shader and refractions on.  | ||||
| refraction scale = 1.0 | ||||
| 
 | ||||
| [Windows] | ||||
| 
 | ||||
| # Location and sizes of windows as a fraction of the OpenMW window or | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue