Changes

342 bytes added ,  05:17, 5 December 2015
m
Line 6,428: Line 6,428:  
|}
 
|}
   −
These registers (along with _Z) represent the light position (for a positional light) or the light direction vector (for a directional light) of the corresponding light.
+
These registers (along with GPUREG_LIGHT''i''_Z) represent the light position (for a positional light) or the light direction vector (for a directional light) of the corresponding light.
    
=== GPUREG_LIGHT''i''_Z ===
 
=== GPUREG_LIGHT''i''_Z ===
Line 6,440: Line 6,440:  
|}
 
|}
   −
These registers (along with _XY) represent the light position (for a positional light) or the light direction vector (for a directional light) of the corresponding light.
+
These registers (along with GPUREG_LIGHT''i''_XY) represent the light position (for a positional light) or the light direction vector (for a directional light) of the corresponding light.
    
=== GPUREG_LIGHT''i''_SPOTDIR_XY ===
 
=== GPUREG_LIGHT''i''_SPOTDIR_XY ===
Line 6,449: Line 6,449:  
|-
 
|-
 
| 0-12
 
| 0-12
| fixed1.1.11, X coordinate (Usually the input value is negated)
+
| fixed1.1.11, X coordinate (negated)
 
|-
 
|-
 
| 16-28
 
| 16-28
| fixed1.1.11, Y coordinate (Usually the input value is negated)
+
| fixed1.1.11, Y coordinate (negated)
 
|}
 
|}
   −
These registers (along with _Z) represent the spot direction (unitary) vector of the corresponding light.
+
These registers (along with GPUREG_LIGHT''i''_SPOTDIR_Z) represent the spot direction (unitary) vector of the corresponding light.
    
=== GPUREG_LIGHT''i''_SPOTDIR_Z ===
 
=== GPUREG_LIGHT''i''_SPOTDIR_Z ===
Line 6,464: Line 6,464:  
|-
 
|-
 
| 0-12
 
| 0-12
| fixed1.1.11, Z coordinate (Usually the input value is negated)
+
| fixed1.1.11, Z coordinate (negated)
 
|}
 
|}
   −
These registers (along with _XY) represent the spot direction (unitary) vector of the corresponding light.
+
These registers (along with GPUREG_LIGHT''i''_SPOTDIR_XY) represent the spot direction (unitary) vector of the corresponding light.
    
=== GPUREG_LIGHT''i''_CONFIG ===
 
=== GPUREG_LIGHT''i''_CONFIG ===
Line 6,487: Line 6,487:  
| unsigned, Use geometric factor 1 (0 = don't use, 1 = use)
 
| unsigned, Use geometric factor 1 (0 = don't use, 1 = use)
 
|}
 
|}
 +
 +
This register configures a light's properties.
    
=== GPUREG_LIGHT''i''_ATTENUATION_BIAS ===
 
=== GPUREG_LIGHT''i''_ATTENUATION_BIAS ===
Line 6,498: Line 6,500:  
|}
 
|}
   −
These registers contain the distance attenuation bias value of the corresponding light. The attenuation factor is lut_DA(clip(bias + scale*distance, 0.0, 1.0)).
+
These registers contain the distance attenuation bias value of the corresponding light. The attenuation factor is DA(clip(bias + scale*distance, 0.0, 1.0)).
    
=== GPUREG_LIGHT''i''_ATTENUATION_SCALE ===
 
=== GPUREG_LIGHT''i''_ATTENUATION_SCALE ===
Line 6,510: Line 6,512:  
|}
 
|}
   −
These registers contain the distance attenuation scale value of the corresponding light. The attenuation factor is lut_DA(clip(bias + scale*distance, 0.0, 1.0)).
+
These registers contain the distance attenuation scale value of the corresponding light. The attenuation factor is DA(clip(bias + scale*distance, 0.0, 1.0)).
    
=== GPUREG_LIGHTING_AMBIENT ===
 
=== GPUREG_LIGHTING_AMBIENT ===
Line 6,539: Line 6,541:  
| unsigned, Number of active lights - 1
 
| unsigned, Number of active lights - 1
 
|}
 
|}
 +
 +
This register configures the number of active lights.
    
=== GPUREG_LIGHTING_CONFIG0 ===
 
=== GPUREG_LIGHTING_CONFIG0 ===
Line 6,588: Line 6,592:  
| 0x1
 
| 0x1
 
|}
 
|}
 +
 +
This register configures the light environment.
    
Fresnel selector values:
 
Fresnel selector values:
Line 6,765: Line 6,771:  
| unsigned, Fragment light source 7 distance attenuation disabled (0 = enabled, 1 = disabled)
 
| unsigned, Fragment light source 7 distance attenuation disabled (0 = enabled, 1 = disabled)
 
|}
 
|}
 +
 +
This register is used to disable various aspects of the light environment.
    
=== GPUREG_LIGHTING_LUT_INDEX ===
 
=== GPUREG_LIGHTING_LUT_INDEX ===
Line 6,779: Line 6,787:  
|}
 
|}
   −
This register controls which LUT and what offset into it the LUT_DATA register writes to.
+
This register controls which LUT and what offset into it the GPUREG_LIGHTING_LUT_DATA''i'' register writes to.
    
Lookup table values:
 
Lookup table values:
Line 6,910: Line 6,918:  
| unsigned, Input selector for RR
 
| unsigned, Input selector for RR
 
|}
 
|}
 +
 +
This register selects the input from LUTs.
    
Input selector values:
 
Input selector values:
Line 7,021: Line 7,031:  
| unsigned, ID of the 8th enabled light
 
| unsigned, ID of the 8th enabled light
 
|}
 
|}
 +
 +
This register sets the IDs of enabled light sources.
    
== Geometry pipeline registers ==
 
== Geometry pipeline registers ==
1,434

edits