fixes bug when setting projection matrix
This commit is contained in:
parent
f52c294a74
commit
e37d723695
|
@ -424,9 +424,12 @@ void main() {
|
|||
|
||||
#endif
|
||||
|
||||
mat4 local_projection_matrix = projection_matrix;
|
||||
|
||||
mat4 modelview = camera_inverse_matrix * world_matrix;
|
||||
float roughness = 1.0;
|
||||
|
||||
#define projection_matrix local_projection_matrix
|
||||
#define world_transform world_matrix
|
||||
|
||||
{
|
||||
|
|
|
@ -76,7 +76,7 @@ ShaderTypes::ShaderTypes() {
|
|||
shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["CAMERA_MATRIX"] = constt(ShaderLanguage::TYPE_MAT4);
|
||||
shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["PROJECTION_MATRIX"] = ShaderLanguage::TYPE_MAT4;
|
||||
shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["MODELVIEW_MATRIX"] = ShaderLanguage::TYPE_MAT4;
|
||||
shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["INV_PROJECTION_MATRIX"] = ShaderLanguage::TYPE_MAT4;
|
||||
shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["INV_PROJECTION_MATRIX"] = constt(ShaderLanguage::TYPE_MAT4);
|
||||
shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["TIME"] = constt(ShaderLanguage::TYPE_FLOAT);
|
||||
shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["VIEWPORT_SIZE"] = constt(ShaderLanguage::TYPE_VEC2);
|
||||
shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["OUTPUT_IS_SRGB"] = constt(ShaderLanguage::TYPE_BOOL);
|
||||
|
|
Loading…
Reference in New Issue