What happened to Cg -> GLSL optimizer in Unity 4 ???

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… :frowning: :frowning: :frowning:

Tom

Any word on this? I encountered this, too, and now I am baffled that noone seems to care about this …

The only solution I could think about is compiling shader under U3 and porting compiled shader to U4. Or modify compiled GLSL shader in U4.

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 :wink:

Case number 534839

In long run - you’re absolutely right. When you have to get solution immediately -see my post :wink:
BTW. Cg->GLSL shaders compile ages for more advanced (longer) code.

Will my case ever be worked on? (Case number 534839) Or should I send the bug report again?

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

Thanks.

Hi,

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.

Patience young Jedi, patience. Yes it is being fixed.

Cool!
BTW, I wouldn’t have to pester you all if I would have gotten a positive response on FogBugz, like I got it for case 513904.

He has a point. It’s only good customer service to provide feedback to free quality assurance :wink: