RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
237 stars 29 forks source link

[Windows] Shader errors when building for Windows #2061

Open RuudvanReenen opened 3 weeks ago

RuudvanReenen commented 3 weeks ago

Unity version

2021.3.24f1

Unity editor platform

Windows

AVPro Video edition

Trial

AVPro Video version

3.1.2

Device hardware

Windows 10 Pro PC

Which Windows version are you using?

10 Pro

Graphics API

D3D 11

Video API

Media Foundation

Audio output

System Direct

Any other Media Player component configuration required to reproduce the issue.

No response

Which output component(s) are you using?

No response

Any other component configuration required to reproduce the issue.

No response

The issue

When trying to build for Windows, 2 shader errors occur: Shader error in 'AVProVideo/Unlit/Opaque (texture+color+fog+stereo support)': cannot use casts on l-values at line 148 (on d3d11) Shader error in 'AVProVideo/VR/InsideSphere Unlit (stereo+fog)': cannot use casts on l-values at line 210 (on d3d11)

Media information

No response

Log output

Shader error in 'AVProVideo/Unlit/Opaque (texture+color+fog+stereo support)': cannot use casts on l-values at line 148 (on d3d11)

Compiling Subshader: 0, Pass: , Fragment program with FORCEEYE_NONE STEREO_TWO_TEXTURES USE_YPCBCR
Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: APPLY_GAMMA FOG_EXP FOG_EXP2 FOG_LINEAR FORCEEYE_LEFT FORCEEYE_RIGHT MONOSCOPIC SHADER_API_GLES30 STEREO_CUSTOM_UV STEREO_DEBUG STEREO_LEFT_RIGHT STEREO_TOP_BOTTOM UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING

Shader error in 'AVProVideo/VR/InsideSphere Unlit (stereo+fog)': cannot use casts on l-values at line 210 (on d3d11)

Compiling Subshader: 0, Pass: , Fragment program with FORCEEYE_NONE STEREO_DEBUG STEREO_TWO_TEXTURES USE_YPCBCR
Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: APPLY_GAMMA FOG_EXP FOG_EXP2 FOG_LINEAR FORCEEYE_LEFT FORCEEYE_RIGHT HIGH_QUALITY LAYOUT_EQUIRECT180 MONOSCOPIC SHADER_API_GLES30 STEREO_CUSTOM_UV STEREO_LEFT_RIGHT STEREO_TOP_BOTTOM UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING
Chris-RH commented 2 weeks ago

Hi @RuudvanReenen

We're going to fix this in the next update. In the meantime, you can resolve it by opening AVProVideo-VR-InsideSphere.shader, going to line 186 and making the following change: shader

Chris-RH commented 6 days ago

AVPro Video version 3.1.3 has been released. Please let us know if it has not fixed your issue.