User Tools

Site Tools


assets:shader

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
assets:shader [2017-08-26 19:58]
skyjake [Built-in variables]
assets:shader [2017-08-26 19:58]
skyjake [Model renderer uniforms]
Line 40: Line 40:
 ^ Variable ^ Type ^ Description | ^ Variable ^ Type ^ Description |
 | ''​uMapTime''​| float | Time in the current map, in seconds since the map was started. Does not increase while the game is paused. | | ''​uMapTime''​| float | Time in the current map, in seconds since the map was started. Does not increase while the game is paused. |
-| ''​uProjectionMatrix''​ | mat4 | Transformation from 3D view space (eye origin) to 2D screen space. The value of the uniform is updated once per frame/eye. |+| ''​uProjectionMatrix''​ | mat4 | Transformation from 3D view space (eye at origin) to 2D screen space. The value of the uniform is updated once per frame/eye. |
 | ''​uViewMatrix''​ | mat4 | Transforms from world space to view space. VGA aspect correction is included. The value of the uniform is updated once per frame/eye. | | ''​uViewMatrix''​ | mat4 | Transforms from world space to view space. VGA aspect correction is included. The value of the uniform is updated once per frame/eye. |
  
Line 48: Line 48:
  
 ^ Uniform ^ Type ^ Description | ^ Uniform ^ Type ^ Description |
-| uMvpMatrix | mat4 | The combined model-view-projection matrix. | +''​uMvpMatrix'' ​| mat4 | The combined model-view-projection matrix. | 
-| uWorldMatrix | mat4 | Transforms from model space to world space. | +''​uWorldMatrix'' ​| mat4 | Transforms from model space to world space. | 
-| uReflectionMatrix | mat4 | Rotation-only matrix for orienting a reflection cube map around the model. | +''​uReflectionMatrix'' ​| mat4 | Rotation-only matrix for orienting a reflection cube map around the model. | 
-| uEyePos | vec3 | Model space eye position. | +''​uEyePos'' ​| vec3 | Model space eye position. | 
-| uAmbientLight | vec3 | Ambient light intensity (RGB). | +''​uAmbientLight'' ​| vec3 | Ambient light intensity (RGB). | 
-| uLightDirs | vec3[4] | Model space light directions. | +''​uLightDirs'' ​| vec3[4] | Model space light directions. | 
-| uLightIntensities | vec4[4] | Light intensities (RGBA). A is the maximum of the R, G and B components. |+''​uLightIntensities'' ​| vec4[4] | Light intensities (RGBA). A is the maximum of the R, G and B components. |
  
 ===== Preprocessor definitions ===== ===== Preprocessor definitions =====
assets/shader.txt · Last modified: 2017-08-26 19:58 by skyjake