When I compile my shaders in Unity 3.5.6 results are fine. I use #pragma glsl and ddx/ddy functions which are correctly translated into dFdx/dFdy calls. Unfortunately, when Unity4 compiles the same shader the resultant GLSL code lacks of dFdx/dFdy calls… So - what happened to nice working GLSL optimizer from Unity3.5.6 ?
EDIT: What’s (not) going on is that texture2DGradARB is not translated from tex2D(sampler, uv, dx,dy) (or tex2Dgrad) Cg calls - no matter what I do…
actually there is much better solution. Really.
Submit bug report with repro case and post case number here.
P.S. Like really - i cant think of better solution regarding unity bug apart from reporting it
In long run - you’re absolutely right. When you have to get solution immediately -see my post
BTW. Cg->GLSL shaders compile ages for more advanced (longer) code.
um… you reported it 4 days ago. Considering it was gdc week, and easter holiday, and, well, sunday and saturday - i dont see how would you expect resolution? I’ve prettified it and assigned to graphics team to look at
I didn’t get any feedback so far, would be cool if this won’t be forgotten. At least I’d like a response if this problem could be reproduced by the graphics department, and if so, if they’re working on it.