Merge pull request #27798 from clayjohn/gles2-proj-mat-bug
Fixes bug when setting projection matrix in shader GLES2
This commit is contained in:
commit
86a74e2cb3
2 changed files with 4 additions and 1 deletions
|
@ -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 a new issue