ShaderMan icon indicating copy to clipboard operation
ShaderMan copied to clipboard

type mismatch (metal)

Open yosun opened this issue 6 years ago • 4 comments

Tried converting the shader below in Unity 2018.1.2 and received this error -

Shader error in 'ShaderMan/Seascape': type mismatch at line 125 (on metal)

Compiling Vertex program Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING

https://www.shadertoy.com/view/Ms2SD1

yosun avatar Jul 03 '18 00:07 yosun

Are there specific shader types that this works with?

yosun avatar Jul 03 '18 00:07 yosun

Tried that on the default build mode in editor - Mac/Win

also tried converting to iOS - I suppose this isn't supported there yet?

yosun avatar Jul 03 '18 01:07 yosun

Hi thanks for your feedback It's common problem and you can solve It easily change uv *= octave_m; to uv = mul(octave_m,uv); this is formula : A *= B to A = mul(B,A)

smkplus avatar Jul 03 '18 01:07 smkplus

my friend coverted this shader you can use his code : https://github.com/przemyslawzaworski/Unity3D-CG-programming/blob/master/ocean.cs https://github.com/przemyslawzaworski/Unity3D-CG-programming/blob/master/ocean.shader

capture

smkplus avatar Jul 03 '18 01:07 smkplus