Home | History | Annotate | Download | only in shader
      1 /*
      2  * Copyright (c) 2009-2010 jMonkeyEngine
      3  * All rights reserved.
      4  *
      5  * Redistribution and use in source and binary forms, with or without
      6  * modification, are permitted provided that the following conditions are
      7  * met:
      8  *
      9  * * Redistributions of source code must retain the above copyright
     10  *   notice, this list of conditions and the following disclaimer.
     11  *
     12  * * Redistributions in binary form must reproduce the above copyright
     13  *   notice, this list of conditions and the following disclaimer in the
     14  *   documentation and/or other materials provided with the distribution.
     15  *
     16  * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
     17  *   may be used to endorse or promote products derived from this software
     18  *   without specific prior written permission.
     19  *
     20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     22  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
     27  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
     28  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     29  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     30  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     31  */
     32 
     33 package com.jme3.shader;
     34 
     35 public enum UniformBinding {
     36 
     37     /**
     38      * The world matrix. Converts Model space to World space.
     39      * Type: mat4
     40      */
     41     WorldMatrix,
     42 
     43     /**
     44      * The view matrix. Converts World space to View space.
     45      * Type: mat4
     46      */
     47     ViewMatrix,
     48 
     49     /**
     50      * The projection matrix. Converts View space to Clip/Projection space.
     51      * Type: mat4
     52      */
     53     ProjectionMatrix,
     54 
     55     /**
     56      * The world view matrix. Converts Model space to View space.
     57      * Type: mat4
     58      */
     59     WorldViewMatrix,
     60 
     61     /**
     62      * The normal matrix. The inverse transpose of the worldview matrix.
     63      * Converts normals from model space to view space.
     64      * Type: mat3
     65      */
     66     NormalMatrix,
     67 
     68     /**
     69      * The world view projection matrix. Converts Model space to Clip/Projection
     70      * space.
     71      * Type: mat4
     72      */
     73     WorldViewProjectionMatrix,
     74 
     75     /**
     76      * The view projection matrix. Converts World space to Clip/Projection
     77      * space.
     78      * Type: mat4
     79      */
     80     ViewProjectionMatrix,
     81 
     82     /**
     83      * The world matrix inverse transpose. Converts a normals from Model space
     84      * to world space.
     85      * Type: mat3
     86      */
     87     WorldMatrixInverseTranspose,
     88 
     89 
     90 
     91     WorldMatrixInverse,
     92     ViewMatrixInverse,
     93     ProjectionMatrixInverse,
     94     ViewProjectionMatrixInverse,
     95     WorldViewMatrixInverse,
     96     NormalMatrixInverse,
     97     WorldViewProjectionMatrixInverse,
     98 
     99     /**
    100      * Contains the four viewport parameters in this order:
    101      * X = Left,
    102      * Y = Top,
    103      * Z = Right,
    104      * W = Bottom.
    105      * Type: vec4
    106      */
    107     ViewPort,
    108 
    109     /**
    110      * The near and far values for the camera frustum.
    111      * X = Near
    112      * Y = Far.
    113      * Type: vec2
    114      */
    115     FrustumNearFar,
    116 
    117     /**
    118      * The width and height of the camera.
    119      * Type: vec2
    120      */
    121     Resolution,
    122 
    123     /**
    124      * The inverse of the resolution, 1/width and 1/height.
    125      * Type: vec2
    126      */
    127     ResolutionInverse,
    128 
    129     /**
    130      * Aspect ratio of the resolution currently set. Width/Height.
    131      * Type: float
    132      */
    133     Aspect,
    134 
    135     /**
    136      * Camera position in world space.
    137      * Type: vec3
    138      */
    139     CameraPosition,
    140 
    141     /**
    142      * Direction of the camera.
    143      * Type: vec3
    144      */
    145     CameraDirection,
    146 
    147     /**
    148      * Left vector of the camera.
    149      * Type: vec3
    150      */
    151     CameraLeft,
    152 
    153     /**
    154      * Up vector of the camera.
    155      * Type: vec3
    156      */
    157     CameraUp,
    158 
    159     /**
    160      * Time in seconds since the application was started.
    161      * Type: float
    162      */
    163     Time,
    164 
    165     /**
    166      * Time in seconds that the last frame took.
    167      * Type: float
    168      */
    169     Tpf,
    170 
    171     /**
    172      * Frames per second.
    173      * Type: float
    174      */
    175     FrameRate,
    176 }
    177