/usr/share/oce-0.15/src/Shaders/Declarations.glsl is in liboce-visualization8 0.15-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | // This files includes definition of common uniform variables in OCCT GLSL programs
#define THE_MAX_LIGHTS 8
#define THE_MAX_CLIP_PLANES 8
// Vertex attributes
// Note: At the moment, we just 'rename' the default OpenGL
// vertex attributes from compatibility profile. In the next
// release old functionality will be removed from shader API.
#ifdef VERTEX_SHADER
#define occColor gl_Color //!< Vertex color
#define occNormal gl_Normal //!< Normal coordinates
#define occVertex gl_Vertex //!< Vertex coordinates
#define occTexCoord gl_MultiTexCoord0 //!< Texture coordinates
#endif
// Matrix state
uniform mat4 occWorldViewMatrix; //!< World-view matrix
uniform mat4 occProjectionMatrix; //!< Projection matrix
uniform mat4 occModelWorldMatrix; //!< Model-world matrix
uniform mat4 occWorldViewMatrixInverse; //!< Inverse of the world-view matrix
uniform mat4 occProjectionMatrixInverse; //!< Inverse of the projection matrix
uniform mat4 occModelWorldMatrixInverse; //!< Inverse of the model-world matrix
uniform mat4 occWorldViewMatrixTranspose; //!< Transpose of the world-view matrix
uniform mat4 occProjectionMatrixTranspose; //!< Transpose of the projection matrix
uniform mat4 occModelWorldMatrixTranspose; //!< Transpose of the model-world matrix
uniform mat4 occWorldViewMatrixInverseTranspose; //!< Transpose of the inverse of the world-view matrix
uniform mat4 occProjectionMatrixInverseTranspose; //!< Transpose of the inverse of the projection matrix
uniform mat4 occModelWorldMatrixInverseTranspose; //!< Transpose of the inverse of the model-world matrix
// light type enumeration
const int OccLightType_Direct = 1; //!< directional light source
const int OccLightType_Point = 2; //!< isotropic point light source
const int OccLightType_Spot = 3; //!< spot light source
// Light sources
uniform vec4 occLightAmbient; //!< Cumulative ambient color
uniform int occLightSourcesCount; //!< Total number of light sources
int occLight_Type (in int theId); //!< Type of light source
int occLight_IsHeadlight (in int theId); //!< Is light a headlight?
vec4 occLight_Diffuse (in int theId); //!< Diffuse intensity for specified light source
vec4 occLight_Specular (in int theId); //!< Specular intensity (currently - equals to diffuse intencity)
vec4 occLight_Position (in int theId); //!< Position of specified light source
vec4 occLight_SpotDirection (in int theId); //!< Direction of specified spot light source
float occLight_ConstAttenuation (in int theId); //!< Const attenuation factor of positional light source
float occLight_LinearAttenuation (in int theId); //!< Linear attenuation factor of positional light source
float occLight_SpotCutOff (in int theId); //!< Maximum spread angle of the spot light (in radians)
float occLight_SpotExponent (in int theId); //!< Attenuation of the spot light intensity (from 0 to 1)
// Front material properties accessors
vec4 occFrontMaterial_Emission(void); //!< Emission color
vec4 occFrontMaterial_Ambient(void); //!< Ambient reflection
vec4 occFrontMaterial_Diffuse(void); //!< Diffuse reflection
vec4 occFrontMaterial_Specular(void); //!< Specular reflection
float occFrontMaterial_Shininess(void); //!< Specular exponent
float occFrontMaterial_Transparency(void); //!< Transparency coefficient
// Front material properties accessors
vec4 occBackMaterial_Emission(void); //!< Emission color
vec4 occBackMaterial_Ambient(void); //!< Ambient reflection
vec4 occBackMaterial_Diffuse(void); //!< Diffuse reflection
vec4 occBackMaterial_Specular(void); //!< Specular reflection
float occBackMaterial_Shininess(void); //!< Specular exponent
float occBackMaterial_Transparency(void); //!< Transparency coefficient
uniform int occDistinguishingMode; //!< Are front and back faces distinguished?
uniform int occTextureEnable; //!< Is texture enabled?
uniform sampler2D occActiveSampler; //!< Current active sampler
// clipping planes state
const int OccEquationCoords_View = 0; //!< view-space clipping plane
const int OccEquationCoords_World = 1; //!< world-space clipping plane
//! Parameters of clipping planes
uniform vec4 occClipPlaneEquations[THE_MAX_CLIP_PLANES];
uniform int occClipPlaneSpaces [THE_MAX_CLIP_PLANES];
|