Author Topic: Refractive shader Win8  (Read 2275 times)

Livealot

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 17
    • View Profile
Refractive shader Win8
« on: August 25, 2014, 03:13:53 PM »
I attended the Windows Porting Event at Unite last week and ran into one problem with NGUI.  My project UI used the basic Refractive atlas provided in the NGUI example folder and the Transparent/Refractive shader.  But the project would not compile to WinPhone8 and threw an error related to the shader. 

The helpful Microsoft staff at the porting lab could not figure out a solution, so I'm passing it along in case it can be fixed on the NGUI side.  I hope that helps.

Thanks!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Refractive shader Win8
« Reply #1 on: August 26, 2014, 03:12:33 AM »
What was the error?

Livealot

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: Refractive shader Win8
« Reply #2 on: August 27, 2014, 10:47:42 AM »
Shader error in 'Transparent/Refractive': 'vert': output parameter 'o' not completely initialized at line 64

When the Microsoft shader looked at it, he didn't see anything obvious, but thought there might be an issue with how the Windows platform needs "four zeros, not just two".  That's all over my head but passing along what he said.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Refractive shader Win8
« Reply #3 on: August 28, 2014, 08:29:04 PM »
Ah. Looking at it, it seems to be wrapped in a define. Remove the #if lines, and it should work fine.