Since the shader source was open, sometimes I need to access some variables that are not in the original shader.
For example original shader contains:
So which registers contain world, view, model and other matrices and variables that can be accessed?
This question is addressed to Scawen, because I suppose no one else can answer.
EDIT:
Model * view * projection matrix.
Model * view matrix.
View matrix.
Projection matrix.
View * projection matrix.
Transpose of model * view matrix.
Inverse transpose of model * view matrix.
Model matrix.
Inverse of current world matrix.
World space position of the camera.
World normal.
For example original shader contains:
// Global variables
float4x4 lightinfo_mat : register(c0);
float4 sun_col : register(c6);
float4 up_dir : register(c7);
float4 basecolamb : register(c8);
float4 diffcolamb : register(c9);
float4 light_dir : register(c10);
float4x4 local_to_texel : register(c12);
float4 fog_info : register(c90);
float4 clampmin : register(c16);
float4 clampmax : register(c17);
#ifdef SHINY
float4 eye_local : register(c30);
float4x4 local_to_view : register(c31);
float4 envmaplevel : register(c36);
#endif
So which registers contain world, view, model and other matrices and variables that can be accessed?
This question is addressed to Scawen, because I suppose no one else can answer.
EDIT:
Model * view * projection matrix.
Model * view matrix.
View matrix.
Projection matrix.
View * projection matrix.
Transpose of model * view matrix.
Inverse transpose of model * view matrix.
Model matrix.
Inverse of current world matrix.
World space position of the camera.
World normal.