Hello,
I have a question regarding a problem of an application I was doing in Unity. I am using programmable shaders for my model to make some interactive slicing.
I did the app on Powerbook Mac with Unity3D free version. It works like a charm on my MAC, but I have a problem displaying the shader(the famous magenta color on my model) on PC!
Any idea how to fix this?
It’s generally best to work with the latest version of Unity, but if you’re programming in GLSL, then the update won’t help. You will either need to write in Cg, or add the -force-opengl parameter when running the player on Windows.
Very helpful link… As it states “Note that GLSL shaders cannot be used in Unity applications running in web browser on Windows.”
Does this mean that GLSL shaders will run on Windows in Unity stand alone apps? Do you know any work around the problem of running it in the web browser?
Thanks in advance,
M
Write in Cg, and put a GLSL SubShader before the Cg one, if the autogenerated GLSL isn’t good enough. Then, report a bug, because it’s intended to always be good enough.
Write in Cg, and put a GLSL SubShader before the Cg one, if the autogenerated GLSL isn’t good enough. Then, report a bug, because it’s intended to always be good enough.
Can you write a little more on the line above? What do you mean write CG and put GLSL SubShader before the CG one?
You can see the GLSL that the Cg->GLSL converter barfs up by hitting the “Open compiled shader” button in the Inspector, with the shader selected. It is unreadably ugly, with a lot of redundant assignments, parentheses, and the worst variable names ever. However, you can refactor it if you can’t tell what it’s doing.