Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
FlightReflectionProbe Class Reference

Creates and updates a reflection probe which will render a cubemap of the region surrounding the vessel so that the cubemap can be used for reflections on vessel parts. The cubemap can be used in all shaders that use a texture called _SpecMap that doesn't actually overwrite it in the material. More...

Inheritance diagram for FlightReflectionProbe:

Public Member Functions

void Enable (bool enable)
 Turns the reflection probe on or off. More...
 
void ForceRender ()
 Force the reflection probe to render a new cubemap. Won't work if the reflection probe is turned off. More...
 
virtual Color GetSkyColor ()
 Simulate the color of the sky for the background of the reflection probe More...
 
virtual void OnSettingsUpdate ()
 Update the reflection probe to match the game settings. More...
 

Static Public Member Functions

static FlightReflectionProbe Spawn ()
 Create a FlightReflectionProbe component attached to a game object. More...
 

Public Attributes

float angleDivisor = 2f
 We divide the angle between the point on the atmosphere right above the vessel and the point on the atmosphere at the height of the vessel by this number when simulating the colour of the sky. 1 means we simulate the colour at the same height as the vessel. 2 means the colour half way between the height of the vessel and the point above the vessel. A really large number means that that the colour will be close to the colour of the point in the atmosphere above the vessel. More...
 
ReflectionProbe probeComponent = null
 Reflection probe that captures the cube map. More...
 

Detailed Description

Creates and updates a reflection probe which will render a cubemap of the region surrounding the vessel so that the cubemap can be used for reflections on vessel parts. The cubemap can be used in all shaders that use a texture called _SpecMap that doesn't actually overwrite it in the material.

Member Function Documentation

void FlightReflectionProbe.Enable ( bool  enable)
inline

Turns the reflection probe on or off.

void FlightReflectionProbe.ForceRender ( )
inline

Force the reflection probe to render a new cubemap. Won't work if the reflection probe is turned off.

virtual Color FlightReflectionProbe.GetSkyColor ( )
inlinevirtual

Simulate the color of the sky for the background of the reflection probe

Returns
Color simulating the color of the sky.
virtual void FlightReflectionProbe.OnSettingsUpdate ( )
inlinevirtual

Update the reflection probe to match the game settings.

static FlightReflectionProbe FlightReflectionProbe.Spawn ( )
inlinestatic

Create a FlightReflectionProbe component attached to a game object.

Returns
A FlightReflectionProbe component attached to a game object.

Member Data Documentation

float FlightReflectionProbe.angleDivisor = 2f

We divide the angle between the point on the atmosphere right above the vessel and the point on the atmosphere at the height of the vessel by this number when simulating the colour of the sky. 1 means we simulate the colour at the same height as the vessel. 2 means the colour half way between the height of the vessel and the point above the vessel. A really large number means that that the colour will be close to the colour of the point in the atmosphere above the vessel.

ReflectionProbe FlightReflectionProbe.probeComponent = null

Reflection probe that captures the cube map.


The documentation for this class was generated from the following file: