이전 오류를 수정했지만 다른 두 가지 오류가 발견되었습니다.Unity - 숫자 형 생성자에 대한 인수의 수가 올바르지 않습니다.
는는 '게임/왜곡 (양면)'에서쉐이더 오류 : 정점 프로그램 플랫폼을 컴파일 (D3D11)에 라인 179에서 숫자 형 생성자에 인수
의 잘못된 수를 정의합니다 UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1을 코드에서 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA
:
half4 frag (v2f i) : COLOR
{
// Screen space texture coordinates
float2 screenPos = i.screenPos.xy/i.screenPos.w;
screenPos = screenPos * 0.5 + 0.5;
screenPos.y = 1.0 - screenPos.y;
// Time-based movement
screenPos = screenPos * float2(4.0, 12.0) + float2(_Time.w * 3.0);
half4 col = _Color * (0.25 * tex2D(_MainTex, screenPos).b + 0.5);
col.a *= i.screenPos.z;
return col;
}
라인에서 :
screenPos = screenPos * float2(4.0, 12.0) + float2(_Time.w * 3.0);
그리고 또 하나
에서쉐이더 오류 '게임/왜곡 (양면 하나)' 인수의 잘못된 수 숫자 형 생성자에 179 줄에 (d3d11에)
컴파일 정점 프로그램 플랫폼 정의 UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA
을 코드에서 :
screenPos = screenPos * float2(4.0, 12.0) + float2(_Time.w * 3.0);
:
half4 frag (v2f i) : COLOR
{
// Screen space texture coordinates
float2 screenPos = i.screenPos.xy/i.screenPos.w;
screenPos = screenPos * 0.5 + 0.5;
screenPos.y = 1.0 - screenPos.y;
// Time-based movement
screenPos = screenPos * float2(4.0, 12.0) + float2(_Time.w * 3.0);
half4 col = _Color * (0.25 * tex2D(_MainTex, screenPos).b + 0.5);
col.a *= i.screenPos.z;
return col;
}
라인에서
실제로 같은 오류가 발생합니다. 모든 도움을 주셔서 감사합니다.
또는 아마도'float2 (_Time.w * 3.0, _Time.w * 3.0);' – Draco18s