MaterialShaderAutoParameter()
Syntaxe
MaterialShaderAutoParameter(#Matiere, TypeProgramme, NomParametre$, TypeParametre, Extra.f)Description
Définit une valeur de paramètre pour la matière basée sur le shader créé précédemment avec CreateShaderMaterial().
Arguments
#Matiere La matière à utiliser. TypeProgramme Type de programme. Il peut s'agir de l'une des valeurs suivantes : #PB_Shader_Vertex : Utiliser le programme vertex. #PB_Shader_Fragment: Utiliser le programme vertex de fragment.NomParametre$ Nom du paramètre à utiliser avec le programme GLSL. TypeParametre Type de paramètre. Il peut s'agir de l'une des valeurs suivantes : #PB_Shader_AmbientLightColour #PB_Shader_AnimationParametric #PB_Shader_CameraPosition #PB_Shader_CameraPositionObjectSpace #PB_Shader_Costime02pi #PB_Shader_Costime0X #PB_Shader_Custom #PB_Shader_DerivedAmbientLightColour #PB_Shader_DerivedLightDiffuseColour #PB_Shader_DerivedLightDiffuseColourArray #PB_Shader_DerivedLightSpecularColour #PB_Shader_DerivedLightSpecularColourArray #PB_Shader_DerivedSceneColour #PB_Shader_FarClipDistance #PB_Shader_FogColour #PB_Shader_Fov #PB_Shader_Fps #PB_Shader_Fragment #PB_Shader_Integer #PB_Shader_InverseProjectionMatrix #PB_Shader_InverseTextureSize #PB_Shader_InverseTransposeProjectionMatrix #PB_Shader_InverseTransposeViewMatrix #PB_Shader_InverseTransposeViewprojMatrix #PB_Shader_InverseTransposeWorldMatrix #PB_Shader_InverseTransposeWorldviewMatrix #PB_Shader_InverseTransposeWorldviewprojMatrix #PB_Shader_InverseViewMatrix #PB_Shader_InverseViewportHeight #PB_Shader_InverseViewportWidth #PB_Shader_InverseViewprojMatrix #PB_Shader_InverseWorldMatrix #PB_Shader_InverseWorldviewMatrix #PB_Shader_InverseWorldviewprojMatrix #PB_Shader_LightAttenuation #PB_Shader_LightAttenuationArray #PB_Shader_LightCastsShadows #PB_Shader_LightCount #PB_Shader_LightCustom #PB_Shader_LightDiffuseColour #PB_Shader_LightDiffuseColourArray #PB_Shader_LightDiffuseColourPowerScaled #PB_Shader_LightDiffuseColourPowerScaledArray #PB_Shader_LightDirection #PB_Shader_LightDirectionArray #PB_Shader_LightDirectionObjectSpace #PB_Shader_LightDirectionObjectSpaceArray #PB_Shader_LightDirectionViewSpace #PB_Shader_LightDirectionViewSpaceArray #PB_Shader_LightDistanceObjectSpace #PB_Shader_LightDistanceObjectSpaceArray #PB_Shader_LightNumber #PB_Shader_LightPosition #PB_Shader_LightPositionArray #PB_Shader_LightPositionObjectSpace #PB_Shader_LightPositionObjectSpaceArray #PB_Shader_LightPositionViewSpace #PB_Shader_LightPositionViewSpaceArray #PB_Shader_LightPowerScale #PB_Shader_LightPowerScaleArray #PB_Shader_LightSpecularColour #PB_Shader_LightSpecularColourArray #PB_Shader_LightSpecularColourPowerScaled #PB_Shader_LightSpecularColourPowerScaledArray #PB_Shader_LodCameraPosition #PB_Shader_LodCameraPositionObjectSpace #PB_Shader_NearClipDistance #PB_Shader_PackedTextureSize #PB_Shader_PassIterationNumber #PB_Shader_PassNumber #PB_Shader_ProjectionMatrix #PB_Shader_SceneDepthRange #PB_Shader_ShadowColour #PB_Shader_ShadowExtrusionDistance #PB_Shader_ShadowSceneDepthRange #PB_Shader_Sintime01 #PB_Shader_Sintime02pi #PB_Shader_Sintime0X #PB_Shader_SpotlightParams #PB_Shader_SpotlightParamsArray #PB_Shader_SpotlightViewprojMatrix #PB_Shader_SpotlightViewprojMatrixArray #PB_Shader_SpotlightWorldviewprojMatrix #PB_Shader_SurfaceAmbientColour #PB_Shader_SurfaceDiffuseColour #PB_Shader_SurfaceEmissiveColour #PB_Shader_SurfaceShininess #PB_Shader_SurfaceSpecularColour #PB_Shader_Tantime01 #PB_Shader_Tantime02pi #PB_Shader_Tantime0X #PB_Shader_TexelOffsets #PB_Shader_TextureMatrix #PB_Shader_TextureSize #PB_Shader_TextureViewprojMatrix #PB_Shader_TextureViewprojMatrixArray #PB_Shader_TextureWorldviewprojMatrixArray #PB_Shader_Time #PB_Shader_Time01 #PB_Shader_Time01Packed #PB_Shader_Time02pi #PB_Shader_Time02piPacked #PB_Shader_Time0X #PB_Shader_Time0XPacked #PB_Shader_TransposeProjectionMatrix #PB_Shader_TransposeViewMatrix #PB_Shader_TransposeViewprojMatrix #PB_Shader_TransposeWorldMatrix #PB_Shader_TransposeWorldviewMatrix #PB_Shader_TransposeWorldviewprojMatrix #PB_Shader_Vector3 #PB_Shader_Vector4 #PB_Shader_Vertex #PB_Shader_VertexWinding #PB_Shader_ViewDirection #PB_Shader_ViewMatrix #PB_Shader_ViewportSize #PB_Shader_ViewportWidth #PB_Shader_ViewprojMatrix #PB_Shader_ViewSideVector #PB_Shader_ViewUpVector #PB_Shader_WorldDualquaternionArray2x4 #PB_Shader_WorldMatrix #PB_Shader_WorldMatrixArray #PB_Shader_WorldMatrixArray3x4 #PB_Shader_WorldviewMatrix #PB_Shader_WorldviewprojMatrixExtra.f Valeur supplémentaire transmise au paramètre de programme.
Valeur de retour
Aucune.
Remarques
Les paramètres automatiques correspondent aux paramètres du moteur 3D (positions de la caméra, lumières, couleur du matériau, brouillard...) cette fonction permet de faire le lien entre la variable 'uniform' du shader et ces paramètres.
Exemple
MaterialShaderAutoParameter(#Matiere, #PB_Shader_Fragment, #PB_Shader_CameraPosition, "camerapos", 0)
Voir aussi
CreateShaderMaterial()
OS Supportés
Tous