Search Issue Tracker

Fixed in 2022.1.X

Fix In Review for 2020.3.X, 2021.2.X

Votes

0

Found in

2019.4

2020.3

2020.3.14f1

2021.1

2021.2

2022.1

Issue ID

1352016

Regression

No

Shader compilation fails with "implicit cast from "float" to "vec2"" error when using OpenGL/Vulkan

Shader System

-

How to reproduce:
1. Open the user's attached project
2. Select Edit/Project Settings/Player/Other Settings and set OpenGLCore as Graphics API
3. Restart the Editor and reimport the Preview_DeltaTime Shader
4. Observe the Console window

Expected result: there are no errors
Actual result: two errors appear

Reproducible with: 2019.4.29f1, 2020.3.14f1, 2021.1.16f1, 2021.2.0b5, 2022.1.0a4

Notes:
1. Not reproducible with Direct3D11, Direct3D12
2. Reproducible with OpenGLCore, OpenGLES2, OpenGLES3
3. With OpenGL, the errors appear only in the Console window. Errors:
- "GLSL compilation failed: 0(28) : error C7011: implicit cast from "float" to "vec2""
4. With Vulkan, the errors appear in the Console window and on Shader. Errors:
- "Shader error in 'Hidden/DeltaTime': '' : compilation terminated at line 28 (on vulkan)",
- "Shader error in 'Hidden/DeltaTime': 'assign' : cannot convert from ' global highp float' to ' temp highp 2-component vector of float' at line 28 (on vulkan)"

  1. Response avatar

    Resolution Note (fix version 2022.1):

    Fixed in: 2022.1.0a16

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.