Classes | |
class | CC3GLSLVariableConfiguration |
class | CC3ShaderSemanticsBase |
class | CC3ShaderSemanticsByVarName |
category | CC3ShaderSemanticsByVarName(DefaultMappings) |
protocol | <CC3ShaderSemanticsDelegate> |
Macros | |
#define | CC3AssertBoneUniformForSkinSection(uniform, skinSection) |
Functions | |
NSString * | NSStringFromCC3Semantic (CC3Semantic semantic) |
#define CC3AssertBoneUniformForSkinSection | ( | uniform, | |
skinSection | |||
) |
Macro for asserting that the specified uniform is large enough to represent the number of bones in the specified skin section.
enum CC3Semantic |
Indicates the semantic usage for scene content.
Under OpenGL ES 2, these values are used to match an GLSL program variable to its semantic usage within a GLSL shader.
The semantic value kCC3SemanticAppBase and kCC3SemanticMax define a range of values that can be used by the application to define and match custom app-specific semantics. The framework will not automatically assign or use values within this range, so it can be used by the app to indicate an app-specific semantic usage.
Enumerator | |
---|---|
kCC3SemanticNone |
No defined semantic usage. |
kCC3SemanticRedundant |
Semantic usage is redundant. Typically used to identify repeated or redundant GLSL variables. |
kCC3SemanticVertexLocation |
Vertex location. |
kCC3SemanticVertexNormal |
Vertex normal. |
kCC3SemanticVertexTangent |
Vertex tangent. |
kCC3SemanticVertexBitangent |
Vertex bitangent (aka binormals). |
kCC3SemanticVertexColor |
Vertex color. |
kCC3SemanticVertexBoneWeights |
Vertex skinning bone weights. |
kCC3SemanticVertexBoneIndices |
Vertex skinning bone indices. |
kCC3SemanticVertexPointSize |
Vertex point size. |
kCC3SemanticVertexTexture |
Vertex texture coordinate for one texture unit. |
kCC3SemanticHasVertexNormal |
(bool) Whether a vertex normal is available. |
kCC3SemanticShouldNormalizeVertexNormal |
(bool) Whether vertex normals should be normalized. |
kCC3SemanticShouldRescaleVertexNormal |
(bool) Whether vertex normals should be rescaled. |
kCC3SemanticHasVertexTangent |
(bool) Whether a vertex tangent is available. |
kCC3SemanticHasVertexBitangent |
(bool) Whether a vertex bitangent is available. |
kCC3SemanticHasVertexColor |
(bool) Whether a vertex color is available. |
kCC3SemanticHasVertexWeight |
(bool) Whether a vertex weight is available. |
kCC3SemanticHasVertexMatrixIndex |
(bool) Whether a vertex matrix index is available. |
kCC3SemanticHasVertexTextureCoordinate |
(bool) Whether a vertex texture coordinate is available. |
kCC3SemanticHasVertexPointSize |
(bool) Whether a vertex point size is available. |
kCC3SemanticIsDrawingPoints |
(bool) Whether the vertices are being drawn as points. |
kCC3SemanticShouldDrawFrontFaces |
(bool) Whether the front side of each face is to be drawn. |
kCC3SemanticShouldDrawBackFaces |
(bool) Whether the back side of each face is to be drawn. |
kCC3SemanticModelLocalMatrix |
(mat4) Current model-to-parent matrix. |
kCC3SemanticModelLocalMatrixInv |
(mat4) Inverse of current model-to-parent matrix. |
kCC3SemanticModelLocalMatrixInvTran |
(mat3) Inverse-transpose of current model-to-parent matrix. |
kCC3SemanticModelMatrix |
(mat4) Current model-to-world matrix. |
kCC3SemanticModelMatrixInv |
(mat4) Inverse of current model-to-world matrix. |
kCC3SemanticModelMatrixInvTran |
(mat3) Inverse-transpose of current model-to-world matrix. |
kCC3SemanticViewMatrix |
(mat4) Camera view matrix. |
kCC3SemanticViewMatrixInv |
(mat4) Inverse of camera view matrix. |
kCC3SemanticViewMatrixInvTran |
(mat3) Inverse-transpose of camera view matrix. |
kCC3SemanticModelViewMatrix |
(mat4) Current model-view matrix. |
kCC3SemanticModelViewMatrixInv |
(mat4) Inverse of current model-view matrix. |
kCC3SemanticModelViewMatrixInvTran |
(mat3) Inverse-transpose of current model-view matrix. |
kCC3SemanticProjMatrix |
(mat4) Camera projection matrix. |
kCC3SemanticProjMatrixInv |
(mat4) Inverse of camera projection matrix. |
kCC3SemanticProjMatrixInvTran |
(mat3) Inverse-transpose of camera projection matrix. |
kCC3SemanticViewProjMatrix |
(mat4) Camera view and projection matrix. |
kCC3SemanticViewProjMatrixInv |
(mat4) Inverse of camera view and projection matrix. |
kCC3SemanticViewProjMatrixInvTran |
(mat3) Inverse-transpose of camera view and projection matrix. |
kCC3SemanticModelViewProjMatrix |
(mat4) Current model-view-projection matrix. |
kCC3SemanticModelViewProjMatrixInv |
(mat4) Inverse of current model-view-projection matrix. |
kCC3SemanticModelViewProjMatrixInvTran |
(mat3) Inverse-transpose of current model-view-projection matrix. |
kCC3SemanticVertexBoneCount |
(int) Number of bones influencing each vertex (ie- number of weights/matrices specified on each vertex) |
kCC3SemanticBatchBoneCount |
(int) Length of the bone arrays for the current skin section. |
kCC3SemanticBoneMatricesGlobal |
(mat4[]) Array of bone matrices in the current mesh skin section in global coordinates (length of array is specified by kCC3SemanticBatchBoneCount). |
kCC3SemanticBoneMatricesInvTranGlobal |
(mat3[]) Array of inverse-transposes of the bone matrices in the current mesh skin section in global coordinates (length of array is specified by kCC3SemanticBatchBoneCount). |
kCC3SemanticBoneMatricesEyeSpace |
(mat4[]) Array of bone matrices in the current mesh skin section in eye space (length of array is specified by kCC3SemanticBatchBoneCount). |
kCC3SemanticBoneMatricesInvTranEyeSpace |
(mat3[]) Array of inverse-transposes of the bone matrices in the current mesh skin section in eye space (length of array is specified by kCC3SemanticBatchBoneCount). |
kCC3SemanticBoneMatricesModelSpace |
(mat4[]) Array of bone matrices in the current mesh skin section in local coordinates of model (length of array is specified by kCC3SemanticBatchBoneCount). |
kCC3SemanticBoneMatricesInvTranModelSpace |
(mat3[]) Array of inverse-transposes of the bone matrices in the current mesh skin section in local coordinates of model (length of array is specified by kCC3SemanticBatchBoneCount). |
kCC3SemanticBoneQuaternionsGlobal |
(vec4[]) Array of bone quaternions in the current mesh skin section in global coordinates (length of array is specified by kCC3SemanticBatchBoneCount). |
kCC3SemanticBoneTranslationsGlobal |
(vec3[]) Array of bone translations in the current mesh skin section in global coordinates (length of array is specified by kCC3SemanticBatchBoneCount). |
kCC3SemanticBoneScalesGlobal |
(vec3[]) Array of bone scales in the current mesh skin section in global coordinates (length of array is specified by kCC3SemanticBatchBoneCount). |
kCC3SemanticBoneQuaternionsEyeSpace |
(vec4[]) Array of bone quaternions in the current mesh skin section in eye space (length of array is specified by kCC3SemanticBatchBoneCount). |
kCC3SemanticBoneTranslationsEyeSpace |
(vec3[]) Array of bone translations in the current mesh skin section in eye space (length of array is specified by kCC3SemanticBatchBoneCount). |
kCC3SemanticBoneScalesEyeSpace |
(vec3[]) Array of bone scales in the current mesh skin section in eye space (length of array is specified by kCC3SemanticBatchBoneCount). |
kCC3SemanticBoneQuaternionsModelSpace |
(vec4[]) Array of bone quaternions in the current mesh skin section in local coordinates of model (length of array is specified by kCC3SemanticBatchBoneCount). |
kCC3SemanticBoneTranslationsModelSpace |
(vec3[]) Array of bone translations in the current mesh skin section in local coordinates of model (length of array is specified by kCC3SemanticBatchBoneCount). |
kCC3SemanticBoneScalesModelSpace |
(vec3[]) Array of bone scales in the current mesh skin section in local coordinates of model (length of array is specified by kCC3SemanticBatchBoneCount). |
kCC3SemanticCameraLocationGlobal |
(vec3) Location of the camera in global coordinates. |
kCC3SemanticCameraLocationModelSpace |
(vec3) Location of the camera in local coordinates of model (not camera). |
kCC3SemanticCameraFrustum |
(vec4) Dimensions of the camera frustum (FOV width (radians), FOV height (radians), near clip, far clip). |
kCC3SemanticCameraFrustumDepth |
(vec4) The depth of the camera frustum (far clip, near clip, -(f+n)/(f-n), -2nf/(f-n)). |
kCC3SemanticViewport |
(vec4 or ivec4) The viewport rectangle in pixels (x, y, width, height). |
kCC3SemanticColor |
(vec4) Color when lighting & materials are not in use. |
kCC3SemanticMaterialColorAmbient |
(vec4) Ambient color of the material. |
kCC3SemanticMaterialColorDiffuse |
(vec4) Diffuse color of the material. |
kCC3SemanticMaterialColorSpecular |
(vec4) Specular color of the material. |
kCC3SemanticMaterialColorEmission |
(vec4) Emission color of the material. |
kCC3SemanticMaterialOpacity |
(float) Opacity of the material (0.0 - 1.0). |
kCC3SemanticMaterialShininess |
(float) Shininess of the material (0 <> 128). |
kCC3SemanticMaterialReflectivity |
(float) Reflectivity of the material (0 <> 1). |
kCC3SemanticMinimumDrawnAlpha |
(float) Minimum alpha value to be drawn, otherwise will be discarded. |
kCC3SemanticIsUsingLighting |
(bool) Whether the model will interact with scene lighting (either lights or light probes). |
kCC3SemanticSceneLightColorAmbient |
(vec4) Ambient light color of the scene. |
kCC3SemanticLightIsEnabled |
(bool[]) Whether each light is enabled. |
kCC3SemanticLightPositionGlobal |
(vec4[]) Homogeneous position (location or direction) of each light in global coordinates. |
kCC3SemanticLightPositionEyeSpace |
(vec4[]) Homogeneous position (location or direction) of each light in eye space. |
kCC3SemanticLightPositionModelSpace |
(vec4[]) Homogeneous position (location or direction) of each light in local coordinates of model (not light). |
kCC3SemanticLightInvertedPositionGlobal |
(vec4[]) Inverted homogeneous position (from opposite direction) of each light in global coordinates. |
kCC3SemanticLightInvertedPositionEyeSpace |
(vec4[]) Inverted homogeneous position (from opposite direction) of each light in eye space. |
kCC3SemanticLightInvertedPositionModelSpace |
(vec4[]) Inverted homogeneous position (from opposite direction) of each light in local coordinates of model (not light). |
kCC3SemanticLightColorAmbient |
(vec4[]) Ambient color of each light. |
kCC3SemanticLightColorDiffuse |
(vec4[]) Diffuse color of each light. |
kCC3SemanticLightColorSpecular |
(vec4[]) Specular color of each light. |
kCC3SemanticLightAttenuation |
(vec3[]) Distance attenuation coefficients for each light. |
kCC3SemanticLightSpotDirectionGlobal |
(vec3[]) Direction of each spotlight in global coordinates. |
kCC3SemanticLightSpotDirectionEyeSpace |
(vec3[]) Direction of each spotlight in eye space. |
kCC3SemanticLightSpotDirectionModelSpace |
(vec3[]) Direction of each spotlight in local coordinates of the model (not light). |
kCC3SemanticLightSpotExponent |
(float[]) Fade-off exponent of each spotlight. |
kCC3SemanticLightSpotCutoffAngle |
(float[]) Cutoff angle of each spotlight. |
kCC3SemanticLightSpotCutoffAngleCosine |
(float[]) Cosine of cutoff angle of each spotlight. |
kCC3SemanticIsUsingLightProbes |
(bool) Whether the model is using light probes for lighting, instead of lights. |
kCC3SemanticLightProbeCount |
(int) Min of number of active light probes in the scene, and the number used by the shader program. |
kCC3SemanticLightProbeIsEnabled |
(bool[]) Whether each light probe is available and enabled. |
kCC3SemanticLightProbeLocationGlobal |
(vec3[]) Location of each light probe in global coordinates. |
kCC3SemanticLightProbeLocationEyeSpace |
(vec3[]) Location of each light probe in eye space. |
kCC3SemanticLightProbeLocationModelSpace |
(vec3[]) Location of each light probe in local coordinates of the model (not light probe). |
kCC3SemanticLightProbeColorDiffuse |
(vec4) Diffuse color of each light probe. |
kCC3SemanticFogIsEnabled |
(bool) Whether scene fogging is enabled. |
kCC3SemanticFogColor |
(vec4) Fog color. |
kCC3SemanticFogAttenuationMode |
(int) Fog attenuation mode (one of GL_LINEAR, GL_EXP or GL_EXP2). |
kCC3SemanticFogDensity |
(float) Fog density. |
kCC3SemanticFogStartDistance |
(float) Distance from camera at which fogging effect starts. |
kCC3SemanticFogEndDistance |
(float) Distance from camera at which fogging effect ends. |
kCC3SemanticTextureCount |
(int) Number of active textures of any types on current model. |
kCC3SemanticTextureSampler |
(sampler2D[]/sampler3D[]) Array of texture samplers of any type. |
kCC3SemanticTexture2DCount |
(int) Number of active 2D textures on the current model. |
kCC3SemanticTexture2DSampler |
(sampler2D[]) Array of 2D texture samplers. |
kCC3SemanticTextureCubeCount |
(int) Number of active cube-map textures on the current model. |
kCC3SemanticTextureCubeSampler |
(samplerCube[]) Array of cube-map texture samplers. |
kCC3SemanticTextureLightProbeSampler |
(samplerCube[]/sampler2D[]) Array of light probe texture samplers. |
kCC3SemanticTexUnitConstantColor |
(vec4) Constant color of a texture unit. |
kCC3SemanticTexUnitMode |
(int) Environment mode of a texture unit. |
kCC3SemanticTexUnitCombineRGBFunction |
(int) RBG combiner function of a texture unit. |
kCC3SemanticTexUnitSource0RGB |
(int) RGB of source 0 of a texture unit. |
kCC3SemanticTexUnitSource1RGB |
(int) RGB of source 1 of a texture unit. |
kCC3SemanticTexUnitSource2RGB |
(int) RGB of source 2 of a texture unit. |
kCC3SemanticTexUnitOperand0RGB |
(int) RGB combining operand of source 0 of a texture unit. |
kCC3SemanticTexUnitOperand1RGB |
(int) RGB combining operand of source 1 of a texture unit. |
kCC3SemanticTexUnitOperand2RGB |
(int) RGB combining operand of source 2 of a texture unit. |
kCC3SemanticTexUnitCombineAlphaFunction |
(int) Alpha combiner function of a texture unit. |
kCC3SemanticTexUnitSource0Alpha |
(int) Alpha of source 0 of a texture unit. |
kCC3SemanticTexUnitSource1Alpha |
(int) Alpha of source 1 of a texture unit. |
kCC3SemanticTexUnitSource2Alpha |
(int) Alpha of source 2 of a texture unit. |
kCC3SemanticTexUnitOperand0Alpha |
(int) Alpha combining operand of source 0 of a texture unit. |
kCC3SemanticTexUnitOperand1Alpha |
(int) Alpha combining operand of source 1 of a texture unit. |
kCC3SemanticTexUnitOperand2Alpha |
(int) Alpha combining operand of source 2 of a texture unit. |
kCC3SemanticCenterOfGeometry |
(vec3) Center of geometry of the model in the model's local coordinates. |
kCC3SemanticBoundingBoxMin |
(vec3) Minimum corner of the model's bounding box in the model's local coordinates. |
kCC3SemanticBoundingBoxMax |
(vec3) Maximum corner of the model's bounding box in the model's local coordinates. |
kCC3SemanticBoundingBoxSize |
(vec3) Dimensions of the model's bounding box in the model's local coordinates. |
kCC3SemanticBoundingRadius |
(float) Radius of the model's bounding sphere in the model's local coordinates. |
kCC3SemanticAnimationFraction |
(float) Fraction of the model's animation that has been viewed (range 0-1). |
kCC3SemanticPointSize |
(float) Default size of points, if not specified per-vertex in a vertex attribute array. |
kCC3SemanticPointSizeAttenuation |
(vec3) Point size distance attenuation coefficients. |
kCC3SemanticPointSizeMinimum |
(float) Minimum size points will be allowed to shrink to. |
kCC3SemanticPointSizeMaximum |
(float) Maximum size points will be allowed to grow to. |
kCC3SemanticPointSpritesIsEnabled |
(bool) Whether points should be interpeted as textured sprites. |
kCC3SemanticFrameTime |
(float) Time in seconds since the last frame. |
kCC3SemanticSceneTime |
(vec2) The real time, in seconds, since the scene was opened, and the fractional part of that time (T, fmod(T, 1)). |
kCC3SemanticSceneTimeSine |
(vec4) Sine of the scene time (sin(T), sin(T/2), sin(T/4), sin(T/8)). |
kCC3SemanticSceneTimeCosine |
(vec4) Cosine of the scene time (cos(T), cos(T/2), cos(T/4), cos(T/8)). |
kCC3SemanticSceneTimeTangent |
(vec4) Tangent of the scene time (tan(T), tan(T/2), tan(T/4), tan(T/8)). |
kCC3SemanticDrawCountCurrentFrame |
(int) Number of draw calls so far in this frame. |
kCC3SemanticRandomNumber |
(float) A random number between 0 and 1. |
kCC3SemanticAppBase |
First semantic of app-specific custom semantics. |
kCC3SemanticMax |
Maximum value for an app-specific custom semantic. |
__deprecated |
|
__deprecated |
|
__deprecated |
|
__deprecated |
|
NSString* NSStringFromCC3Semantic | ( | CC3Semantic | semantic) |
Returns a string representation of the specified semantic.