Panda3D Manual: List of Possible Shader Inputs
<<prev | top | next>>
Shader parameters must have names that are recognized by panda. Here is a list of the allowable parameter names:
uniform sampler2D tex_0 | The model's first texture. This requires that the model be textured in the normal manner. You may also use tex_1, tex_2, and so forth, if the model is multitextured. If the model uses a 3D texture or a cubemap, you may also specify sampler3D or samplerCUBE.
uniform sampler2D tex_0_suffix | Obtain a texture by concatenating a hyphen and the suffix to the filename of the model's first texture. For example, if tex_0 is "woman.jpg", then tex_0_normalmap is "woman-normalmap.jpg", and tex_0_specular is "woman-specular.jpg". You may also use tex_1_suffix, tex_2_suffix, and so forth, if the model is multitextured. If the model uses a 3D texture or a cubemap, you may also specify sampler3D or samplerCUBE.
float3 vtx_position: POSITION | Vertex Position. Vertex shader only. You may also use float4, in which case (w==1).
float3 vtx_normal: NORMAL | Vertex Normal. Vertex shader only.
float2 vtx_texcoord0: TEXCOORD0 | Texture coordinate associated with the model's first texture. This requires that the model be textured in the normal manner. You may also use vtx_texcoord1, vtx_texcoord2, and so forth if the model is multitextured. Vertex shader only.
float3 vtx_tangent0 | Tangent vector associated with the model's first texture. This can only be used if the model has been textured in the normal manner, and if binormals have been precomputed. You may also use vtx_tangent1, vtx_tangent2, and so forth if the model is multitextured. Vertex shader only.
float3 vtx_binormal0 | Binormal vector associated with vtx_texcoord0. This can only be used if the model has been textured in the normal manner, and if binormals have been precomputed. You can also use vtx_binormal1, vtx_binormal2, and so forth if the model has been multitextured. Vertex shader only.
floatX vtx_anything | Panda makes it possible to store arbitrary data in the vertex array. You can access this data using this syntax. For example, vtx_chicken will look for a column named "chicken" in the vertex array. Vertex shader only.
uniform float4x4 trans_x_to_y | A matrix that transforms from coordinate system X to coordinate system Y. See the section on Shaders and Coordinate Spaces for more information.
uniform float4x4 tpose_x_to_y | Transpose of trans_x_to_y
uniform float4 row0_x_to_y | Row 0 of trans_x_to_y.
uniform float4 row1_x_to_y | Row 1 of trans_x_to_y.
uniform float4 row2_x_to_y | Row 2 of trans_x_to_y.
uniform float4 row3_x_to_y | Row 3 of trans_x_to_y.
uniform float4 col0_x_to_y | Col 0 of trans_x_to_y.
uniform float4 col1_x_to_y | Col 1 of trans_x_to_y.
uniform float4 col2_x_to_y | Col 2 of trans_x_to_y.
uniform float4 col3_x_to_y | Col 3 of trans_x_to_y.
uniform float4x4 mstrans_x | Model-Space Transform of X, aka trans_x_to_model
uniform float4x4 cstrans_x | Camera-Space Transform of X, aka trans_x_to_camera
uniform float4x4 wstrans_x | World-Space Transform of X, aka trans_x_to_world
uniform float4 mspos_x | Model-Space Position of X, aka row3_x_to_model
uniform float4 cspos_x | Camera-Space Position of X, aka row3_x_to_camera
uniform float4 wspos_x | World-Space Position of X, aka row3_x_to_world
uniform float4x4 mat_modelview | Modelview Matrix
uniform float4x4 inv_modelview | Inverse Modelview Matrix
uniform float4x4 tps_modelview | Transposed Modelview Matrix
uniform float4x4 itp_modelview | Inverse Transposed Modelview Matrix
uniform float4x4 mat_projection | Projection Matrix
uniform float4x4 inv_projection | Inverse Projection Matrix
uniform float4x4 tps_projection | Transposed Projection Matrix
uniform float4x4 itp_projection | Inverse Transposed Projection Matrix
uniform float4x4 mat_modelproj | Composed Modelview/Projection Matrix
uniform float4x4 inv_modelproj | Inverse ModelProj Matrix
uniform float4x4 tps_modelproj | Transposed ModelProj Matrix
uniform float4x4 itp_modelproj | Inverse Transposed ModelProj Matrix
uniform float4 k_anything | A constant vector that was stored using `setShaderInput`. Parameter k_anything would match data supplied by the call setShaderInput("anything", Vec4(x,y,z,w))
uniform sampler2d k_anything | A constant texture that was stored using `setShaderInput`. Parameter k_anything would match data supplied by the call setShaderInput("anything", myTex)
uniform float4x4 k_anything | A constant matrix that was stored using `setShaderInput`. Parameter k_anything would match data supplied by the call setShaderInput("anything", myNodePath). The matrix supplied is the nodepath's local transform.
uniform float2 sys_cardcenter | Texture coordinates of center of this window's texture card. To generate texture coords for this window's texture card, use (clipx,clipy) * cardcenter + cardcenter.
floatX l_position: POSITION | Linearly interpolated Position, as supplied by the vertex shader to the fragment shader. Declare "out" in the vertex shader, "in" in the fragment shader.
floatX l_color0: COLOR0 | Linearly interpolated Primary color, as supplied by the vertex shader to the fragment shader. Declare "out" in the vertex shader, "in" in the fragment shader.
floatX l_color1: COLOR1 | Linearly interpolated Secondary color, as supplied by the vertex shader to the fragment shader. Declare "out" in the vertex shader, "in" in the fragment shader.
floatX l_texcoord0: TEXCOORD0 | Linearly interpolated Texture Coordinate 0, as supplied by the vertex shader to the fragment shader. You may also use l_texcoord1, l_texcoord2, and so forth. Declare "out" in the vertex shader, "in" in the fragment shader.
out floatX o_color: COLOR | Output Color, as supplied by the fragment shader to the blending units. Fragment shader only.
<<prev | top | next>>