Search Issue Tracker

By Design

Votes

0

Found in

5.1.0b3

Issue ID

691125

Regression

No

Unnecessary uniforms from surface shaders generated to OpenGL ES 3.0

Shaders

-

I noticed very strange behavior in unity 5.1b3 that compiled shaders for OpenGL ES 3.0, have lots of unnecessary uniforms, see screenshot (Graphics_GLES3_UnnecessaryUniforms.png). It did not happen in unity 5.1b2, So I have reason to believe its regression.

1. Open shader (5.1b3 Compiled-Fixed4Shader.shader).
2. And you should see in vertex function part:
uniform vec4 _Time;
uniform vec4 _SinTime;
............................. (Lots of unfiroms)
uniform mediump vec4 _Half;
uniform lowp vec4 _Fixed;
3. Open shader (5.1b2 Compiled-Fixed4Shader.shader).
4. This time you should see in vertex function part:
uniform mat4 glstate_matrix_mvp;
(only one uniforms that is ussed)

Shaders 5.1b3 Compiled-Fixed4Shader.shader and 5.1b2 Compiled-Fixed4Shader.shader generated from same shader (Fixed4Shader.shader) just on different unity versions.

Reproduced: 5.1.0b3
Regression: 5.1.0b3 (Works in 5.1.0b2 as should be)

Add comment

Log in to post comment