문제

I'm seeing issues on iOS builds for code that works fine on my Mac. With fog turned on, I'm seeing unpredictable, generally undesired rendering results, but only when writing to gl_FragColor.a at the end of my shaders. If I work with a temporary variable, and assign to all four channels of gl_FragColor with it, I see what I expect. Is this to be expected, or is it a problem with Unity? (With these problem shaders, I'm getting different results if I delete, as opposed to commenting out, fragment shader code, so I bet it's the latter, but if you feel comfortable answering, you hopefully know better than I do.)

도움이 되었습니까?

해결책

Fog? You're using an OpenGL shader; there is no fog, unless the shader defines how it works. Are you relying on some per-vertex value passed to the fragment shader to do fog for you?

Unless Unity is amplifying or altering your shader in some way, fog is not something that should be out of your control.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top